QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#487522#8790. First Billionucup-team4435#AC ✓1418ms501752kbC++208.2kb2024-07-22 22:58:132024-07-22 22:58:14

Judging History

你现在查看的是最新测评结果

  • [2024-07-22 22:58:14]
  • 评测
  • 测评结果:AC
  • 用时:1418ms
  • 内存:501752kb
  • [2024-07-22 22:58:13]
  • 提交

answer

#pragma GCC optimize("Ofast")

#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using ld = long double;

#define all(a) begin(a), end(a)
#define len(a) int((a).size())

constexpr int S = 1'000'000'000;

template<int N>
void solve(int n, vector<int> w) {
    mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
    using bs = bitset<N>;
    // static bs dp[51][51];
    vector<vector<bs>> dp(n / 2 + 1, vector<bs>(n / 2 + 1));

    while (true) {
        vector<int> a;
        vector<int> b;
        ll sum_a = 0;
        ll sum_b = 0;

        vector<int> p(n);
        iota(all(p), 0);
        shuffle(all(p), rng);

        for (int i = 0; i < n / 2; i++) {
            a.push_back(p[i]);
            sum_a += w[a.back()];
            b.push_back(p[n / 2 + i]);
            sum_b += w[b.back()];
        }

        for (int it = 0; it < 100; it++) {
            bool found = false;
            for (int r = 0; r < len(a); r++) {
                // ll nsum_a = sum_a - w[a[r]];
                // if (abs(S - sum_a) > abs(S - nsum_a)) {
                //     b.push_back(a[r]);
                //     a.erase(a.begin() + r);

                //     sum_a = nsum_a;
                //     sum_b = 2 * S - sum_a;
                //     found = true;
                // }

                for (int q = 0; q < len(b); q++) {
                    // {
                    //     ll nsum_a = sum_a + w[b[q]];
                    //     if (abs(S - sum_a) > abs(S - nsum_a)) {
                    //         a.push_back(b[q]);
                    //         b.erase(b.begin() + q);

                    //         sum_a = nsum_a;
                    //         sum_b = 2 * S - sum_a;
                    //         found = true;
                    //     }
                    // }

                    {
                        ll nsum_a = sum_a - w[a[r]] + w[b[q]];
                        if (abs(S - sum_a) > abs(S - nsum_a)) {
                            int i = a[r];
                            int j = b[q];
                            a.erase(a.begin() + r);
                            b.erase(b.begin() + q);
                            a.push_back(j);
                            b.push_back(i);

                            sum_a = nsum_a;
                            sum_b = 2 * S - sum_a;
                            found = true;
                        }
                    }
                }
            }

            if (!found) {
                break;
            }
        }

        if (a.empty() || b.empty() || abs(sum_a - S) >= N) {
            continue;
        }

        if (sum_a < sum_b) {
            swap(sum_a, sum_b);
            swap(a, b);
        }

        auto cmp = [&](int i, int j) {
            return w[i] < w[j];
        };

        sort(all(a), cmp);
        sort(all(b), cmp);

        for (int i = 0; i <= len(a); i++) {
            for (int j = 0; j <= len(b); j++) {
                dp[i][j].reset();
            }
        }
        dp[0][0][N / 2] = true;

        for (int i = 0; i <= len(a); i++) {
            for (int j = 0; j <= len(b); j++) {
                if (i + 1 <= len(a)) {
                    dp[i + 1][j] |= dp[i][j];
                }
                if (j + 1 <= len(b)) {
                    dp[i][j + 1] |= dp[i][j];
                }
                if (i + 1 <= len(a) && j + 1 <= len(b)) {
                    int diff = w[a[i]] - w[b[j]];
                    if (diff >= 0) {
                        dp[i + 1][j + 1] |= dp[i][j] << diff;
                    } else {
                        dp[i + 1][j + 1] |= dp[i][j] >> (-diff);
                    }
                }
            }
        }

        int res = N / 2 + (S - sum_b);
        if (res >= 0 && res < N && dp[len(a)][len(b)][res]) {
            set<int> ans(all(a));
            for (int i = len(a), j = len(b); i + j > 0;) {
                if (i > 0 && dp[i - 1][j][res]) {
                    i--;
                    continue;
                }
                if (j > 0 && dp[i][j - 1][res]) {
                    j--;
                    continue;
                }
                res -= w[a[i - 1]] - w[b[j - 1]];
                ans.erase(a[i - 1]);
                ans.insert(b[j - 1]);
                i--;
                j--;
            }

            cout << len(ans) << ' ';
            ll real_sum = 0;
            for (auto x : ans) {
                real_sum += w[x];
                cout << x + 1 << ' ';
            }
            assert(real_sum == S);
            cout << '\n';
            return;
        }
        // cout << "WRONG" << endl;

        // auto solve = [&](const vector<int> &st) {
        //     int n = len(st);
        //     vector<bs> possible(n + 1);
        //     possible[0][0] = 1;
        //     for (int i = 0; i < n; i++) {
        //         possible[i + 1] = possible[i] | (possible[i] << w[st[i]]);
        //     }
        //     return possible;
        // };

        // auto pa = solve(a);
        // auto pb = solve(b);

        // for (int d = 0; d < N; d++) {
        //     if (!pa.back()[d]) {
        //         continue;
        //     }

        //     ll need = S - (sum_a - d);
        //     if (0 <= need && need < N && pb.back()[need]) {
        //         cout << "SIIUU" << endl;
        //         return 0;
        //     }
        // }
        // cout << "Wrong" << endl;
    }
}

int main() {
    cin.tie(nullptr)->sync_with_stdio(false);

    int n;
    cin >> n;
    vector<int> w(n);
    for (auto &x : w) {
        cin >> x;
    }

    if (n <= 23) {
        for (int mask = 0; mask < (1 << n); mask++) {
            ll cur_sum = 0;
            for (int i = 0; i < n; i++) {
                if (mask >> i & 1) {
                    cur_sum += w[i];
                }
            }

            if (cur_sum == S) {
                cout << __builtin_popcount(mask) << ' ';
                ll real_sum = 0;
                for (int i = 0; i < n; i++) {
                    if (mask >> i & 1) {
                        cout << i + 1 << ' ';
                    }
                }
                cout << '\n';
                return 0;
            }
        }
        assert(false);
    }

    if (n <= 44) {
        unordered_set<ll> st;

        const int HALF = n / 2;
        for (int mask = 0; mask < (1 << HALF); mask++) {
            ll sum = 0;
            for (int i = 0; i < HALF; i++) {
                if (mask >> i & 1) {
                    sum += w[i];
                }
            }
            st.insert(sum);
        }

        vector<int> v;
        for (int mask = 0; mask < (1 << (n - HALF)); mask++) {
            ll sum = 0;
            v.clear();
            for (int i = HALF; i < n; i++) {
                if (mask >> (i - HALF) & 1) {
                    sum += w[i];
                    v.push_back(i);
                }
            }

            if (st.count(S - sum)) {
                for (int mask = 0; mask < (1 << HALF); mask++) {
                   ll cur = 0;
                    for (int i = 0; i < HALF; i++) {
                        if (mask >> i & 1) {
                            cur += w[i];
                        }
                    }
                    if (cur + sum == S) {
                        for (int i = 0; i < HALF; i++) {
                            if (mask >> i & 1) {
                                v.push_back(i);
                            }
                        }
                    }
                }

                cout << len(v) << ' ';
                sort(all(v));
                for (auto x : v) {
                    cout << x + 1 << ' ';
                }
                cout << '\n';
                return 0;
            }
        }
        assert(false);
    }

    if (n <= 50) {
        solve<5'800'000>(n, w);
    } else if (n <= 60) {
        solve<4'000'000>(n, w);
    } else if (n <= 70) {
        solve<3'000'000>(n, w);
    } else if (n <= 80) {
        solve<2'000'000>(n, w);
    } else {
        solve<1'000'000 * 2 / 3>(n, w);
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3696kb

input:

10
386413329 88494216 245947398 316438989 192751270 204627269 65749456 3938400 150458676 345180997

output:

5 1 5 6 7 9 

result:

ok OK (n = 10)

Test #2:

score: 0
Accepted
time: 0ms
memory: 3692kb

input:

10
119486233 299942886 169540407 349937991 597883752 32230162 140514533 57341098 12602102 220520836

output:

5 2 5 6 8 9 

result:

ok OK (n = 10)

Test #3:

score: 0
Accepted
time: 1ms
memory: 3852kb

input:

14
384615281 84612238 83310504 54746763 142296081 56775470 128760350 343006424 177232390 214368720 67220468 21895072 16352717 224807522

output:

7 1 6 7 9 10 12 13 

result:

ok OK (n = 14)

Test #4:

score: 0
Accepted
time: 1ms
memory: 3924kb

input:

14
270208635 14270307 89661499 113578022 47687195 101043954 38775146 208193324 650676076 351701957 3427619 59535626 24230888 27009752

output:

7 1 2 3 4 6 10 12 

result:

ok OK (n = 14)

Test #5:

score: 0
Accepted
time: 5ms
memory: 3688kb

input:

20
61638928 106712373 5946815 178135484 4937573 111395400 15504655 67139983 101814514 312223647 130341028 43244171 37671364 54108486 337181317 37924824 153793862 70383750 102917244 66984582

output:

10 4 5 8 9 10 11 12 13 14 18 

result:

ok OK (n = 20)

Test #6:

score: 0
Accepted
time: 5ms
memory: 3924kb

input:

20
67858098 61231428 99398662 1883806 82465954 303619377 87516412 154956240 94872199 76508350 13276828 136541811 203282099 99160366 127539385 13364660 141176136 39751629 67888657 127707903

output:

10 1 3 4 5 8 11 12 13 14 17 

result:

ok OK (n = 20)

Test #7:

score: 0
Accepted
time: 1ms
memory: 4100kb

input:

24
17125795 281143405 10375259 196293002 158174864 34520650 52919232 87393970 99085271 62281508 67168428 55174991 54533464 51393059 89276370 41441658 72793517 30466999 73758332 97064918 111541434 142047546 12934221 101092107

output:

12 3 4 5 10 13 15 17 18 19 20 22 23 

result:

ok OK (n = 24)

Test #8:

score: 0
Accepted
time: 1ms
memory: 4100kb

input:

24
70224368 148769600 36654748 23404220 15009825 57449487 46896672 6065662 10377031 133719710 23220853 184445684 8462667 88501546 155244839 229323557 140109402 52520271 78995771 75721556 87987586 118427778 107013825 101453342

output:

12 1 3 5 7 10 11 12 17 19 20 21 23 

result:

ok OK (n = 24)

Test #9:

score: 0
Accepted
time: 3ms
memory: 4200kb

input:

28
122321206 60841271 22767116 183943582 6247754 32767541 19129802 21313874 144503909 59360441 12259051 19044256 50267333 25766572 133411289 32253746 102412217 46186594 55413161 39907615 52325783 86862071 185310732 138228874 22000146 149813853 98156445 77183766

output:

14 3 7 9 10 13 14 19 20 21 22 23 24 25 27 

result:

ok OK (n = 28)

Test #10:

score: 0
Accepted
time: 3ms
memory: 4200kb

input:

28
213829745 40823140 14876795 22548901 35958464 159026037 106482651 52655603 76733934 102794554 100713772 80174862 125840182 3619651 74158077 27699586 14743901 68385227 55117143 39623241 67325444 95072408 46052588 46086093 11650160 66077724 149558313 102371804

output:

14 3 5 6 10 11 13 16 17 19 20 21 22 25 27 

result:

ok OK (n = 28)

Test #11:

score: 0
Accepted
time: 3ms
memory: 4720kb

input:

30
38319400 42378812 172927254 71697590 118171420 5615707 8117586 107362865 18142211 89646810 51847201 37450061 138487251 116358215 15432103 13621837 15084921 15012145 42848714 71166566 37074067 11354748 10702902 244865332 41244161 102695984 217681174 21564320 89607508 33521135

output:

13 3 5 6 8 9 12 14 16 18 21 23 24 26 

result:

ok OK (n = 30)

Test #12:

score: 0
Accepted
time: 0ms
memory: 4752kb

input:

30
239221492 41835739 80260950 47743386 50052259 31410042 1676838 63813733 47622772 150506632 188312503 190432229 6783832 111319580 122183547 37258127 12116231 29322396 58095114 47089744 9262724 204673438 11840273 64585542 11797425 4134848 56164171 30717831 46921664 2844938

output:

15 4 5 7 8 11 12 14 15 16 17 18 20 25 27 28 

result:

ok OK (n = 30)

Test #13:

score: 0
Accepted
time: 6ms
memory: 4652kb

input:

30
52710609 39033241 15723499 29898108 62692739 138885388 137151511 90118964 15492963 61261380 35071118 195401367 64471367 39372151 70235925 114596786 27917908 29285928 11044525 11941155 12716377 1533910 24799365 265236184 104128755 17709404 4856890 204911218 17131655 104669610

output:

15 1 2 3 7 9 10 12 14 15 16 17 20 21 22 28 

result:

ok OK (n = 30)

Test #14:

score: 0
Accepted
time: 6ms
memory: 4716kb

input:

30
71176974 17279544 55258168 53966156 72625891 26990484 32947301 24238341 23523054 74032236 11115471 37748780 197790571 37391026 97632202 141185045 78244645 55562875 112526424 172476633 23788890 38112613 43056490 59434820 126859036 3192138 33541518 45692823 37948025 194661826

output:

15 2 6 7 8 10 13 14 16 17 18 20 24 26 27 28 

result:

ok OK (n = 30)

Test #15:

score: 0
Accepted
time: 3ms
memory: 4716kb

input:

30
14207343 153611578 16683105 27989436 25086738 33243492 111638179 47972430 19637539 35808627 12134813 60480737 68270077 122259678 37288938 86244354 36408417 58808264 33320672 9412909 176141849 93548029 55980295 128091293 13973554 27108753 77442637 246155003 18397254 152654007

output:

13 2 5 6 9 11 15 17 19 21 22 23 27 28 

result:

ok OK (n = 30)

Test #16:

score: 0
Accepted
time: 20ms
memory: 8796kb

input:

34
56158267 5346691 37606439 26760105 123601340 44674017 43239382 23064728 175228414 72881379 25027579 73516264 13748174 69400907 47140260 105416679 45175827 129325284 14737537 147069844 84833847 91264478 15805185 5872801 60910166 8127595 87459162 153141045 24930343 27343635 11563194 56545951 773088...

output:

16 1 2 3 8 10 11 12 14 18 19 20 22 24 26 27 28 

result:

ok OK (n = 34)

Test #17:

score: 0
Accepted
time: 25ms
memory: 8612kb

input:

34
6553507 21827844 163114470 285889880 111444346 91096849 9875033 155790401 48814749 32707381 4390111 3512692 227551194 24852373 35077911 52304487 14043961 21718427 153749785 10890230 81276988 24039619 19484842 19224458 60528342 80892446 43482284 3024810 18734584 44556796 18825186 16762113 91529698...

output:

17 1 2 3 4 7 9 10 12 14 17 19 20 21 22 24 26 29 

result:

ok OK (n = 34)

Test #18:

score: 0
Accepted
time: 20ms
memory: 8772kb

input:

34
6510953 149563269 90208590 17087264 54154081 48557639 30119336 148147082 30167332 41026594 23352774 7503341 127871531 56098411 30309985 90903962 20775544 12444200 23139566 173775423 39698044 23256886 32599474 19795212 62981178 43614848 71114165 138887136 8874281 1542445 96191893 14339496 11492279...

output:

18 2 5 6 9 10 11 12 13 15 17 19 20 21 23 24 25 26 27 

result:

ok OK (n = 34)

Test #19:

score: 0
Accepted
time: 25ms
memory: 8612kb

input:

34
76165834 52107905 64590881 31631692 6704569 151480738 146750957 43792305 11263200 3762351 55603212 9648993 8323006 63561211 39768967 5565808 18484315 47155971 95389177 39661235 158388679 115049517 90536356 16230 36970573 69805600 69394080 162875090 33332306 141161983 59599679 47506416 36779765 71...

output:

17 2 4 5 6 8 11 15 16 17 18 19 20 21 22 24 26 27 

result:

ok OK (n = 34)

Test #20:

score: 0
Accepted
time: 25ms
memory: 8676kb

input:

34
54830390 113752786 1256295 65643133 17997234 93531549 17982160 52907635 60890541 46120250 33991135 36315875 125481200 21717043 2931945 204316378 34997684 89844853 71646618 44706963 444743 16090084 221143946 50917758 48030413 93143102 2161608 69130708 43539172 92362195 26368947 33556321 68574624 4...

output:

17 3 5 6 7 9 10 12 13 14 15 16 18 19 21 25 28 30 

result:

ok OK (n = 34)

Test #21:

score: 0
Accepted
time: 106ms
memory: 25120kb

input:

38
61295704 120959759 13190535 82400573 19952027 65933932 6386901 31702075 26739290 8114929 40114285 36513729 14021915 36412926 103842230 23073744 64285890 7726874 7069826 11026974 112061519 86593033 24948152 31660315 58256958 56241422 21694304 2454321 4008850 145718408 71162340 18472714 32541051 17...

output:

23 2 5 6 7 10 11 13 14 15 16 17 18 19 20 22 23 25 26 27 28 29 30 31 

result:

ok OK (n = 38)

Test #22:

score: 0
Accepted
time: 99ms
memory: 25140kb

input:

38
6041181 60606547 25009256 67510442 13154279 42254607 13913303 70468898 83661964 9693776 14673029 65391499 20900136 70775729 232451283 120308939 8000114 57176181 37323456 8856486 83542977 169853088 65998342 73938927 89977321 33127725 18524012 98889224 37672769 64174135 84811684 35339006 11678853 4...

output:

17 3 5 8 9 11 12 13 14 15 16 17 19 20 24 27 28 29 

result:

ok OK (n = 38)

Test #23:

score: 0
Accepted
time: 100ms
memory: 25092kb

input:

38
18362326 19090432 36949939 201073371 81787520 9144779 12700980 106084822 215335010 131147703 22973034 43876431 9268739 137958148 6855146 15674059 42021492 40619493 3662247 36558198 231081433 21696469 10761956 35417110 18250457 42223480 7356242 104352860 4479650 98688233 20581514 59307013 47254982...

output:

16 1 2 4 9 11 15 17 18 19 20 21 23 24 27 28 29 

result:

ok OK (n = 38)

Test #24:

score: 0
Accepted
time: 106ms
memory: 25112kb

input:

38
104562951 26015894 3145542 123734324 14548111 105001982 102528865 56074111 16743701 102313381 78956994 13474659 65680616 24114824 12197913 111320556 7216879 11175792 7992693 1413099 101341761 27655187 3017819 4970522 3562488 106653156 111044688 1609530 32741939 35813979 25952252 72341688 22966055...

output:

17 1 4 6 8 10 11 15 16 17 18 19 21 22 23 24 26 30 

result:

ok OK (n = 38)

Test #25:

score: 0
Accepted
time: 103ms
memory: 25172kb

input:

38
170912121 22871446 35334264 15023151 4773792 1434560 32319430 37415290 39242013 16597189 6001330 55658237 36180315 18572198 19827812 35336501 31560303 54548994 74446747 46057860 173191453 54272395 24146280 193702375 56678360 36796796 18193466 8637372 135630383 27032823 12505468 150627916 2582369 ...

output:

17 1 3 7 10 12 13 14 15 16 17 18 21 23 24 25 26 28 

result:

ok OK (n = 38)

Test #26:

score: 0
Accepted
time: 225ms
memory: 47228kb

input:

40
1864672 53270952 1031984 2509194 87644337 5654703 35444518 97736603 4840437 55730665 64535977 101111649 9875388 4664481 144584267 8792304 117354393 23125256 32473404 39262639 22801665 117751347 11198973 27861810 6885619 46509857 106429773 38309950 102577045 69246894 25937400 2327839 121605468 155...

output:

15 3 5 10 11 12 15 16 17 22 23 24 25 26 27 29 

result:

ok OK (n = 40)

Test #27:

score: 0
Accepted
time: 226ms
memory: 47152kb

input:

40
48771913 9129806 177363060 455674 12879500 192650028 93455081 19668836 211467728 14824960 13014697 6530918 39372683 20221308 52776225 56685533 47137737 197020 15094742 59067671 83795802 29969719 1837235 54389050 16664663 25235647 47705412 44743329 27308190 66642142 109012392 67396894 148619638 11...

output:

17 3 4 6 7 8 9 10 15 18 19 22 23 24 25 26 29 30 

result:

ok OK (n = 40)

Test #28:

score: 0
Accepted
time: 215ms
memory: 47248kb

input:

40
3847423 74340777 1968440 17333797 152135028 69048270 19520806 1207492 27990457 6544118 80120921 49824698 5907494 6867941 56511477 33635519 27676574 80629489 222022166 1849181 25549872 50258158 144175108 19577032 98014197 44381051 49966978 17359335 85777156 8823906 67372725 119341332 17598763 2698...

output:

15 1 3 4 5 9 10 12 15 17 18 19 21 23 25 29 

result:

ok OK (n = 40)

Test #29:

score: 0
Accepted
time: 255ms
memory: 47244kb

input:

40
70289203 45090506 161197383 21510064 125673016 63538876 47305368 49305316 2510761 5146406 26631860 55860877 15095987 2271318 55839532 14605949 77636166 24146355 32457833 73089790 12848725 34138293 5768962 82151119 132170164 2321922 50481614 199414029 11609733 26109944 81032279 40256858 15623974 1...

output:

18 1 2 4 5 6 9 11 14 15 16 19 20 21 22 23 24 25 28 

result:

ok OK (n = 40)

Test #30:

score: 0
Accepted
time: 241ms
memory: 47260kb

input:

40
50698578 52509261 34701613 14769490 122660551 51335198 70661495 113289 23389673 20640581 37159828 1697548 107785221 18796024 70668417 205241387 15984923 2347466 7581277 39033594 27046441 44026606 150172337 157493651 41726524 92782285 15747483 53863062 169771205 50898487 1306634 33332634 13633700 ...

output:

18 1 2 3 5 7 9 11 12 13 14 15 18 20 21 22 23 26 28 

result:

ok OK (n = 40)

Test #31:

score: 0
Accepted
time: 542ms
memory: 91624kb

input:

42
69453942 23942799 81784994 7352590 24577372 69640200 24360181 55921752 108546910 25594960 45933757 108263848 12364508 8615303 3110278 1269663 40281207 65088368 17987759 18754784 26312341 22877900 27531243 54918076 48904554 65605137 33804965 33663032 34409100 10298071 77680002 28439127 4801961 171...

output:

23 1 2 3 6 7 8 9 11 12 13 16 17 19 21 23 24 25 26 27 28 29 30 33 

result:

ok OK (n = 42)

Test #32:

score: 0
Accepted
time: 550ms
memory: 91320kb

input:

42
33147210 87848986 44109088 55076705 115162485 20523291 16035388 80739425 47872090 118179619 42914602 22948541 51041919 13528447 4465039 84265262 22325618 42068909 37281025 50938480 31805906 13054839 2354885 704391 31985626 38832019 26733097 60439196 11875988 33815351 14927657 179118961 58839825 6...

output:

21 1 2 3 4 6 7 8 10 11 13 14 17 19 20 21 22 23 24 26 28 32 

result:

ok OK (n = 42)

Test #33:

score: 0
Accepted
time: 549ms
memory: 91312kb

input:

42
6405235 82687858 68706201 43265453 11098503 62558624 53477307 26439538 16968971 19290958 2106562 16555376 245005349 62311346 7725570 4615166 112366210 9405713 38742494 26203113 119586896 17969044 25605367 36960268 75964238 4896492 26306831 160657228 1184799 165128315 20806306 95266720 21351500 46...

output:

18 1 3 4 6 8 9 10 13 15 16 20 22 23 25 27 28 29 30 

result:

ok OK (n = 42)

Test #34:

score: 0
Accepted
time: 529ms
memory: 91592kb

input:

42
7719596 20464537 55394343 515437 111816412 70673026 106404588 17015566 19909805 11160230 25085020 342418169 63941624 54582568 14198561 25897674 8620912 10738707 11272855 67721915 64717 262297824 609310 1550859 5707725 17493804 76277176 21800824 40345769 169587849 37637786 27877165 23964163 763559...

output:

17 2 3 4 5 6 7 9 10 11 15 16 19 22 24 26 27 30 

result:

ok OK (n = 42)

Test #35:

score: 0
Accepted
time: 545ms
memory: 91708kb

input:

42
23541697 81911058 77056862 89499316 75427976 70819486 26346900 36445046 47136885 21834193 44134648 30594632 43165367 93522397 12347302 97032940 104145295 9404509 18079210 80695915 20569192 25296748 42802655 52302054 39057271 70960744 61510071 68682235 90106517 66851507 32716260 10744345 23218730 ...

output:

17 3 4 5 6 8 9 11 12 15 16 17 19 20 21 25 29 30 

result:

ok OK (n = 42)

Test #36:

score: 0
Accepted
time: 1401ms
memory: 180016kb

input:

44
93811735 3111432 284344444 9300996 8023026 39151821 12117747 70352373 5382875 39141424 4378226 24087612 49852035 2623871 48398472 13668940 2731871 73193567 12735177 26483377 25605749 11339775 993595 57465334 33038087 1419349 26767049 96543488 51358779 108099632 16277256 66520206 49872124 10149388...

output:

22 1 2 3 4 5 7 8 11 12 14 15 16 18 20 21 22 23 24 28 29 31 32 

result:

ok OK (n = 44)

Test #37:

score: 0
Accepted
time: 1367ms
memory: 180352kb

input:

44
66137407 31610128 42105930 57108997 89529388 15835364 4693363 92291299 20385523 177620767 14462056 64034996 10359992 80402330 122234872 56000958 23388168 57268027 36699089 80313974 10436216 10164043 113475 35986642 107374006 74722691 23759146 11444485 18099673 62106923 3003623 21720528 13883250 6...

output:

18 5 6 8 10 11 13 14 15 16 17 19 20 22 23 25 29 30 31 

result:

ok OK (n = 44)

Test #38:

score: 0
Accepted
time: 1378ms
memory: 180036kb

input:

44
91257989 17057943 34994463 44347188 32997943 68615889 42133474 5199699 9943421 73666869 27933416 14613 60130717 88059112 72449799 234519371 31557086 54704131 42185598 43829168 51801071 104369369 18130495 87921499 6678430 6677092 6184648 15712590 27655028 3011880 90096039 25045709 6657595 14839280...

output:

16 1 2 4 5 6 9 10 11 13 14 15 16 17 20 24 28 

result:

ok OK (n = 44)

Test #39:

score: 0
Accepted
time: 1353ms
memory: 180188kb

input:

44
16092516 54651504 14202053 58530591 38704521 47519701 14717657 32055109 37902201 23310884 67694167 31437105 25997900 66231942 13017646 44784154 49548262 37285959 46600212 89680346 23109223 101928121 10680806 62375327 75350537 24803800 113701921 19482051 7738038 2057493 14661544 95018055 4590757 1...

output:

21 1 2 4 6 7 11 12 13 14 17 18 19 20 21 24 25 27 29 30 31 32 

result:

ok OK (n = 44)

Test #40:

score: 0
Accepted
time: 1360ms
memory: 180552kb

input:

44
51201530 34924162 53213398 57661602 2311008 25318043 33681641 25432058 70669002 8083600 89650430 8831594 11377975 31719372 73351588 35370172 91536174 71256145 46481617 147963778 34515242 82637058 34682985 140301818 15954574 31689864 36582004 33877215 37326238 29925921 22258357 2070697 50111503 12...

output:

18 2 4 6 7 8 9 13 14 15 16 17 18 19 20 23 24 26 27 

result:

ok OK (n = 44)

Test #41:

score: 0
Accepted
time: 1418ms
memory: 429696kb

input:

46
81439419 22913495 35601700 58463206 13888052 21580918 395855 10579508 5953278 8645068 142880202 66966043 4233129 11757484 6677961 48938953 23744620 98649593 44484445 14473257 66100999 76519231 21480567 68609711 2713942 41098733 33540238 6506468 73728115 14804134 69194289 58414181 3710133 19432392...

output:

23 1 5 6 7 8 11 13 14 17 18 20 21 22 24 27 28 32 35 37 38 39 41 45 

result:

ok OK (n = 46)

Test #42:

score: 0
Accepted
time: 926ms
memory: 429556kb

input:

46
1049683 101843873 23661090 119417330 10227286 14360799 66627050 6374497 13030424 31483047 65007194 74831048 30480144 18196645 64953778 48729713 32284369 100337540 66435001 43115036 32144402 4050020 58893069 41371897 13212335 33558032 21528248 7919278 14163764 6155694 14046493 14298644 11270643 31...

output:

23 7 8 9 11 16 22 24 25 26 28 31 32 33 34 35 36 37 38 39 40 43 44 46 

result:

ok OK (n = 46)

Test #43:

score: 0
Accepted
time: 581ms
memory: 429724kb

input:

46
1517131 26218073 87872511 45577728 39949660 589449 10612376 75206555 56054 32340553 44498689 3232066 24520493 60305655 123652716 65885611 27161093 21155584 31549777 16465574 6728154 37228556 98134407 128016564 12238060 23290779 44869837 62308080 29754967 33029042 33053435 95235888 83232965 441928...

output:

23 1 2 3 4 5 6 7 8 12 13 18 19 20 21 24 26 28 29 31 36 39 40 41 

result:

ok OK (n = 46)

Test #44:

score: 0
Accepted
time: 385ms
memory: 429716kb

input:

46
25424150 65614405 29076374 94906969 23336920 70187708 99336120 44563267 39754183 13657063 26310565 3965691 60117900 145893547 19503530 88173392 27867911 73658282 205128 38164742 2944575 3902800 15471334 73568367 39160982 1974080 33026423 81871847 43401153 51549338 47257872 34953878 5453223 362447...

output:

23 4 5 6 8 13 14 15 17 20 21 22 23 26 27 28 29 31 37 38 40 41 42 43 

result:

ok OK (n = 46)

Test #45:

score: 0
Accepted
time: 759ms
memory: 429600kb

input:

46
170618727 27164057 1854183 83065581 34116365 48372687 50461795 29804627 38592232 36354510 43960609 1040243 35527458 629198 145384918 69203714 31660845 571631 44115565 7397305 56981183 9474782 1315361 145802072 34488138 37270183 5632582 16746447 97994892 205505446 7544286 443206 20846172 6713049 4...

output:

23 1 4 5 6 9 11 13 15 22 25 27 28 29 31 32 35 36 37 38 39 40 42 44 

result:

ok OK (n = 46)

Test #46:

score: 0
Accepted
time: 1041ms
memory: 465188kb

input:

48
78259397 36083346 61167190 26363297 95923422 31066105 20502058 81571243 21740968 72841349 29981365 57020342 2315171 105800575 33006407 1932617 107504113 9634627 92505220 55972880 136933737 22063298 7829790 41634644 16421399 10652999 755596 4226037 52260033 41035663 69610087 9954774 36962531 98808...

output:

24 2 4 5 8 9 10 13 14 15 19 20 21 22 24 28 30 32 37 38 40 42 43 46 48 

result:

ok OK (n = 48)

Test #47:

score: 0
Accepted
time: 626ms
memory: 464860kb

input:

48
15258402 6084270 136621722 97107331 14380856 16295869 35746942 3977423 4282216 40739665 57100100 54475699 2324528 5404157 80098358 82278492 64439206 59040372 31910497 8118453 46217590 68524907 105126486 4294954 2101701 3079091 16411177 126555579 144846134 97767260 2756634 73306888 24669136 116196...

output:

24 1 3 4 6 7 8 10 13 14 17 20 21 22 23 29 31 35 36 37 40 41 42 46 48 

result:

ok OK (n = 48)

Test #48:

score: 0
Accepted
time: 232ms
memory: 465188kb

input:

48
21075693 100335916 39685840 27219571 63916878 60878482 45687412 93306673 12107190 82314657 2146926 79871060 23588353 1318681 34825571 87260718 37435398 101393978 11771701 5163242 18409243 70493116 3324391 62547298 27099804 12856305 24292932 31242957 19412106 105999292 11513801 45241532 20603453 1...

output:

24 2 3 5 8 9 10 11 13 15 17 20 21 22 23 29 30 31 32 33 35 36 40 42 45 

result:

ok OK (n = 48)

Test #49:

score: 0
Accepted
time: 416ms
memory: 464840kb

input:

48
45530947 124706599 60885858 78340093 14038493 256401 76822774 37979132 50778048 21250479 91006468 110985207 35775492 7843880 25025708 681125 103510575 53339279 35310755 3386013 12305238 17807702 3911240 14923445 179833554 82309725 15966722 30115470 42358352 199786 77182845 8514318 21728860 450008...

output:

24 2 3 4 5 9 10 11 13 14 15 18 20 21 22 28 30 31 32 33 34 42 43 46 47 

result:

ok OK (n = 48)

Test #50:

score: 0
Accepted
time: 635ms
memory: 464996kb

input:

48
2061910 95948320 67154166 2206160 29642223 7330141 81440771 164217985 18610311 38503004 4595818 34608548 36001136 10625136 133501441 9362895 23311726 29915917 59123536 16951061 78800208 71153989 8209037 90897882 9172307 34305959 73804629 2839567 4606455 50556550 90423978 43980020 3748840 17145537...

output:

24 1 4 5 6 7 8 9 10 12 15 16 17 21 22 24 25 27 28 30 33 37 38 40 43 

result:

ok OK (n = 48)

Test #51:

score: 0
Accepted
time: 273ms
memory: 501732kb

input:

50
2216870 66048880 21127092 8359653 23234401 2485515 83889171 72902066 7552745 95292288 23098091 63184689 28500132 14557631 20411350 48763741 4444072 11989742 50984841 16537020 24025221 82087564 88272981 12923682 14048772 38244234 80277130 13767613 130119723 34993633 65411439 10151407 30036550 8765...

output:

25 3 4 6 7 11 16 18 20 21 25 26 27 29 33 36 37 39 41 42 43 44 45 47 48 49 

result:

ok OK (n = 50)

Test #52:

score: 0
Accepted
time: 224ms
memory: 501688kb

input:

50
35796342 780554 15297534 12450190 81205635 10395315 46246390 72000012 15030619 20224683 48857484 7776065 38180633 46882005 105990704 58388018 20114222 34171033 19505816 11176016 49548577 96256511 11583240 10824231 531109 8088761 18690010 6656424 6517001 5563156 65795091 24759033 150198367 6798036...

output:

25 1 3 4 7 8 9 10 11 14 17 27 28 29 30 33 35 36 37 38 39 41 42 43 46 50 

result:

ok OK (n = 50)

Test #53:

score: 0
Accepted
time: 474ms
memory: 501696kb

input:

50
78761877 42854760 31571853 4280042 31399251 36983441 18281283 83085807 80499216 36046196 591157 23769260 54597323 25594796 2188359 33370632 96472034 82149462 14736010 1641429 69117708 35565203 73553734 69691065 1609486 5193217 24262056 3012034 58593297 4059581 38744204 626029 90770651 96417272 34...

output:

25 1 2 3 4 5 7 9 10 13 14 17 27 28 29 30 32 38 39 40 41 43 44 45 48 50 

result:

ok OK (n = 50)

Test #54:

score: 0
Accepted
time: 234ms
memory: 501752kb

input:

50
63214339 92081322 60453401 60377772 13571985 1982871 68110348 54750197 4672626 60534945 88372373 15394631 61661976 54128280 17954553 10335199 55540974 52916223 13305576 7455067 35780396 4527292 23561255 103406611 24015420 31602979 21825702 69401268 27947007 39527815 79396944 34152710 7480517 8902...

output:

25 1 3 4 6 7 9 16 17 18 19 21 30 31 36 37 38 39 40 41 42 43 44 46 48 50 

result:

ok OK (n = 50)

Test #55:

score: 0
Accepted
time: 232ms
memory: 501700kb

input:

50
91865707 66777064 21653986 33734276 98873846 32828339 38722436 185195 12383429 40011880 25465484 13556076 5290905 17606146 41784286 12313655 42031377 5040629 44242769 91399458 68070358 2037943 14849433 86466165 226520418 82674525 593630 36422723 5680224 42168485 84398773 50328832 64472155 4896180...

output:

25 2 5 8 11 13 14 16 17 21 23 25 26 27 29 30 31 33 37 40 41 43 44 45 49 50 

result:

ok OK (n = 50)

Test #56:

score: 0
Accepted
time: 432ms
memory: 373272kb

input:

52
926172 5180236 44907702 6222355 162555997 51097393 35732098 52123343 79671709 78995648 65416107 9843486 85180974 43621966 6526857 4917635 37625367 47336598 58372697 24374916 6247685 15035310 12069683 487753 33049601 5995719 26016557 11509365 64649726 2875736 111347191 11575980 66648746 19782766 3...

output:

26 2 3 4 5 6 7 8 9 10 11 15 17 23 25 27 30 32 36 37 38 40 43 45 46 49 50 

result:

ok OK (n = 52)

Test #57:

score: 0
Accepted
time: 568ms
memory: 373276kb

input:

52
11317068 26272229 42725366 1463601 57319395 40620793 10102542 6611185 200135054 85073480 47387878 63404989 69936852 34866014 27451839 43272251 81556033 46072574 24673889 11331824 25827719 17374423 29338297 4103231 11374326 71429923 167511585 46478157 49395762 2301421 9712459 8313101 8404936 13805...

output:

26 2 3 7 8 9 10 12 13 14 17 18 20 22 24 26 28 30 33 35 38 39 40 44 45 48 50 

result:

ok OK (n = 52)

Test #58:

score: 0
Accepted
time: 1246ms
memory: 373256kb

input:

52
99785988 26507837 8543126 108532859 156556167 42319356 26167833 35331321 18939748 4712781 835355 3231416 67329826 33034435 45327701 35596780 26781350 177865545 66910457 15519688 23901361 3558547 6911013 50194574 6632055 54104557 4754927 10647949 6133846 84614766 12468850 94140634 1446369 3665729 ...

output:

26 2 4 5 7 10 12 17 18 19 20 21 24 25 27 29 34 35 36 38 39 40 41 42 43 44 45 

result:

ok OK (n = 52)

Test #59:

score: 0
Accepted
time: 162ms
memory: 373336kb

input:

52
6980112 28804372 105625513 26027389 12270528 73833731 28894884 36372433 29915253 72255907 3545338 67484988 114558608 54307365 120816849 19358607 5757229 54576016 14994809 39093085 49513380 13452456 2516461 14950389 18087580 8590626 22237172 11457545 68156623 4889211 38962379 13768337 33749521 173...

output:

26 1 2 3 4 7 9 10 12 13 16 20 22 24 25 28 29 33 37 41 44 45 46 48 50 51 52 

result:

ok OK (n = 52)

Test #60:

score: 0
Accepted
time: 1116ms
memory: 373320kb

input:

52
1908274 19350102 5020545 14917528 116919638 40911349 22076817 6150881 5556504 11523826 1666366 50295156 4680334 13215903 50500965 5926156 1935788 51592983 90337814 136875469 26965195 43020919 74883643 20394932 28599031 113228672 15783407 56665603 76898675 18621531 49328978 119818019 13208521 8194...

output:

26 1 6 8 9 13 14 16 19 20 22 24 27 29 31 33 35 36 38 39 40 41 42 43 45 46 51 

result:

ok OK (n = 52)

Test #61:

score: 0
Accepted
time: 173ms
memory: 400708kb

input:

54
73753741 30250725 72863306 27459122 8153629 46210740 19208352 10607170 3017392 6074956 63980293 22169923 3411746 248189730 15838515 27199449 16651008 12780704 43345192 35535632 16004894 75307923 74232235 6142392 61184984 14943997 11215095 36132652 53779674 31389933 12124791 2486614 107233792 5477...

output:

27 1 4 6 7 8 10 12 19 23 24 26 27 28 29 30 32 33 35 37 38 39 41 43 44 45 50 53 

result:

ok OK (n = 54)

Test #62:

score: 0
Accepted
time: 182ms
memory: 400784kb

input:

54
24526197 11682607 113180813 3179596 10849377 26125364 19782823 20810274 14904628 7703983 10964932 65048516 14497928 18572734 37346890 79322580 7347288 38110968 51459221 25597437 47023498 54295837 69031772 57677056 33441474 6891306 10601154 102554838 46842941 22904906 53046324 125227790 50230620 1...

output:

27 3 4 7 9 10 12 13 15 16 17 19 20 21 22 24 27 28 37 39 40 41 42 43 44 48 50 54 

result:

ok OK (n = 54)

Test #63:

score: 0
Accepted
time: 182ms
memory: 400704kb

input:

54
71429722 3311947 47111755 48229095 471099 183272573 10573682 93722168 27176757 1630492 63826805 9671586 76861555 27960274 38996006 30736002 3628512 2207288 12148384 44845966 46678046 55542803 38803646 60578613 1387976 24909496 21040707 61443082 6119892 10743580 40842348 66134441 3235480 88783244 ...

output:

27 3 4 10 12 13 14 19 20 21 22 23 25 26 27 33 34 35 37 39 40 43 46 47 48 51 52 54 

result:

ok OK (n = 54)

Test #64:

score: 0
Accepted
time: 305ms
memory: 400636kb

input:

54
27159161 66138287 10514223 36910714 55221573 26935294 11184869 50220806 3564024 5571146 28098435 4825847 132471440 352150 25576118 9650586 20318093 24587612 45868 9932015 59029653 87167878 154717198 57525496 34243955 26059712 18374195 36407466 15825564 90872441 25383958 48809819 100820429 1557918...

output:

27 1 2 3 7 8 10 15 19 20 24 25 28 29 30 31 32 33 39 40 42 46 47 48 49 50 51 54 

result:

ok OK (n = 54)

Test #65:

score: 0
Accepted
time: 184ms
memory: 400604kb

input:

54
14258849 68635161 88273326 34263561 58587787 21679905 2949188 21246545 7580849 15563985 95487409 18706085 47246039 22709190 27106504 70214832 1976508 47184394 5459396 87425366 52845997 51600386 71924761 131940296 12632645 12682599 3367719 13916182 32041663 55967386 8139928 54428782 26171844 17017...

output:

27 1 4 9 10 11 12 13 15 18 20 22 25 28 29 30 32 33 35 36 39 40 41 46 49 50 51 52 

result:

ok OK (n = 54)

Test #66:

score: 0
Accepted
time: 343ms
memory: 429112kb

input:

56
1060471 37904244 9919289 22897711 70086111 6970517 26192863 4775195 67716431 38543193 10729613 21850804 69945493 2458942 18918238 88846265 84674381 109076767 13769283 50715221 76016238 54774803 12047671 65402307 38403120 11197620 17782896 54976878 6239746 13287170 26670592 24088360 42528219 43475...

output:

28 6 12 13 14 15 18 19 20 22 24 25 28 30 31 32 33 34 35 38 42 45 46 48 50 51 52 54 55 

result:

ok OK (n = 56)

Test #67:

score: 0
Accepted
time: 173ms
memory: 429200kb

input:

56
18193652 42492859 2875294 19112645 58117299 4634390 26093304 1424227 10514256 10634936 11652686 8496856 34000855 6009660 8553448 39994573 36960764 10766609 31789096 23030362 13859881 14888234 39580676 57797486 3954265 17061603 51818092 64366675 67575666 30100588 18479200 10001373 85614854 9240980...

output:

28 1 2 5 6 7 8 11 12 14 16 18 20 25 26 27 28 30 32 34 36 38 39 40 42 45 48 55 56 

result:

ok OK (n = 56)

Test #68:

score: 0
Accepted
time: 183ms
memory: 429056kb

input:

56
4630645 105122568 22278045 121250261 6759070 132488360 5356714 12771887 54269100 108986843 6721599 62688228 61314598 2625419 91856959 1878240 2011101 50112232 6899971 9808346 7786520 24025708 45187519 29154116 86354986 3580949 68140640 13138858 28523699 49400617 45179618 26442797 1266041 23293359...

output:

28 2 5 7 8 9 10 11 15 18 22 23 24 26 29 30 31 34 36 37 38 40 42 43 45 48 51 54 55 

result:

ok OK (n = 56)

Test #69:

score: 0
Accepted
time: 176ms
memory: 429296kb

input:

56
74406786 19920776 17917370 19352769 9348974 4158537 61123320 14845248 53966465 4384142 140309 6140839 8296307 2898329 6360993 544675 65082924 8388042 88802921 167010690 66796091 25939779 93342474 5061500 12914983 87402949 1142794 49315787 38120584 180938579 149847 81064897 10706327 15783876 46233...

output:

28 1 2 3 6 12 13 15 17 18 20 22 25 26 27 28 33 35 37 40 42 43 45 46 47 48 53 54 56 

result:

ok OK (n = 56)

Test #70:

score: 0
Accepted
time: 350ms
memory: 429204kb

input:

56
528549 46061947 11921648 80834093 114097358 986333 9495967 5492360 11602855 7517495 15064981 49923157 25629941 6166047 80042620 2281900 4205039 8165060 21462134 93408424 34124955 3518911 34438059 50280340 78008981 22838706 5829182 156975940 51092927 30011814 39358777 44745421 21164986 15944750 73...

output:

28 3 6 8 10 11 13 14 15 22 25 26 28 32 33 35 37 39 40 41 42 44 45 48 50 52 54 55 56 

result:

ok OK (n = 56)

Test #71:

score: 0
Accepted
time: 192ms
memory: 458552kb

input:

58
19651228 1971168 1732600 10211181 18323556 14406343 104817403 26529176 60130404 27391010 13911646 16462430 5393824 54833160 126021207 2443906 14950791 31658855 12093430 14997293 20535656 7464588 9409655 11079278 12996414 18465094 791669 31038793 25230762 17278696 106639478 54801029 57016356 33622...

output:

29 2 3 5 9 10 12 14 15 16 18 19 21 26 29 30 36 37 38 41 42 43 44 45 47 49 50 51 54 58 

result:

ok OK (n = 58)

Test #72:

score: 0
Accepted
time: 194ms
memory: 458656kb

input:

58
72036122 2935153 1035289 3991985 18594103 57144723 6075689 5334821 132230020 12017328 73058746 33043083 44326125 23097808 69381449 52939939 34415326 42491418 10714745 45219721 68845137 49138710 30563020 23541090 43791982 1911713 12971922 14028456 74817390 7565577 6578462 2535723 17415980 27822759...

output:

29 1 3 7 9 10 11 13 14 15 16 18 20 23 25 28 29 30 33 35 38 40 42 47 48 50 52 56 57 58 

result:

ok OK (n = 58)

Test #73:

score: 0
Accepted
time: 202ms
memory: 458548kb

input:

58
9845796 103248458 28637157 3375121 8526256 31383400 40372888 57094381 8980605 40346194 72247425 4055056 49409711 35583520 38129598 68441661 24718575 15773009 24144595 12245685 34567428 31059355 42341744 15699130 17010346 25361615 4272729 20650450 5930440 15000710 25077579 57139132 4505550 7811280...

output:

29 4 5 6 9 13 14 19 20 24 25 26 28 32 33 34 35 36 37 38 39 40 41 43 44 47 48 52 55 56 

result:

ok OK (n = 58)

Test #74:

score: 0
Accepted
time: 198ms
memory: 458520kb

input:

58
35244870 34149093 23971650 7367073 6389163 35346989 74721253 4281224 559426 11205121 74086191 32216249 1531672 42840848 39349474 26328983 16560473 22258653 1917758 6015911 83909925 5457027 5785586 122956986 8239652 46559093 130150497 47556783 27788188 6353255 15034115 5473935 35534163 74806886 27...

output:

29 1 2 3 6 7 9 10 11 12 15 17 19 23 25 27 28 30 31 34 37 41 44 47 48 49 50 52 53 58 

result:

ok OK (n = 58)

Test #75:

score: 0
Accepted
time: 191ms
memory: 458472kb

input:

58
26222151 592128 11113721 2899300 59425997 5981536 51505853 25133159 4758957 83836008 20461644 47831241 15644521 104031574 1834464 30013529 9372369 35396762 20151952 58165631 32995156 50967299 57264592 16322920 20849782 1560214 756593 16589243 2164640 8310680 5908361 25727483 9640980 25101548 1044...

output:

29 1 2 3 7 8 10 11 12 17 20 23 24 25 29 30 32 35 37 39 40 41 42 46 51 52 53 55 57 58 

result:

ok OK (n = 58)

Test #76:

score: 0
Accepted
time: 218ms
memory: 488772kb

input:

60
4706208 41147758 12673045 36141593 47578194 23778166 4581033 41663124 33678918 44832790 20687017 3661056 4030684 19932508 38057581 9717652 25386555 37650764 9897650 95684641 805283 13834890 23901785 14610060 33076332 24556939 2165937 2990545 17854063 28370274 57893719 23548336 83717807 158449579 ...

output:

30 1 3 4 7 11 16 18 19 21 22 24 25 26 27 30 32 33 34 36 37 38 40 41 46 48 49 50 54 56 60 

result:

ok OK (n = 60)

Test #77:

score: 0
Accepted
time: 207ms
memory: 488768kb

input:

60
15965929 7326484 6334952 44637977 14581453 36928978 66831688 81437876 185243 67616287 53174729 5110003 6512641 18229878 66420905 44752325 24238128 90666097 1473780 70901531 114945437 13589956 42284109 124978265 3677621 2367567 15637613 5245218 101872033 23537701 8862436 29468443 7725076 45768168 ...

output:

30 1 3 4 5 6 9 10 12 16 21 22 23 25 27 28 29 31 34 36 38 41 44 45 46 49 51 52 55 58 59 

result:

ok OK (n = 60)

Test #78:

score: 0
Accepted
time: 211ms
memory: 488800kb

input:

60
70549793 29865598 2874785 43644142 105931766 28334078 6201213 10975188 69667468 36319761 10642674 32647672 16054026 20460479 6582049 18456411 80110063 84259589 510470 40825062 39498489 30769440 48596998 8915023 17466937 72246158 22979621 6124490 23665913 15966446 96697219 8718658 23125178 4028938...

output:

30 2 3 4 6 7 8 9 12 14 16 17 21 22 25 31 32 35 37 38 39 40 43 44 45 47 50 52 54 57 60 

result:

ok OK (n = 60)

Test #79:

score: 0
Accepted
time: 216ms
memory: 488852kb

input:

60
18894698 21035925 69848978 57324663 28655204 36400088 5884215 51512888 21147177 11013769 89987695 59716948 10391999 20847317 31998105 215724 52866359 17368198 31564830 5927894 60949194 139821044 64700363 7246048 25507496 1106112 30865700 7882291 27330667 10441434 8970300 6200623 9984711 84290529 ...

output:

30 1 3 5 6 7 8 9 10 11 12 13 14 17 20 21 24 26 27 29 32 34 39 44 46 50 51 53 54 55 57 

result:

ok OK (n = 60)

Test #80:

score: 0
Accepted
time: 206ms
memory: 488788kb

input:

60
11137643 77296872 31552422 27599660 30879564 26464058 42507733 7222433 28567069 14260713 32603067 49610011 127123825 142321673 160852 32701521 32309285 124117348 38322480 3498684 19308273 5292062 16959253 16738000 22500359 5404963 31442254 33889864 67410320 8873270 6371996 31849614 13208504 47611...

output:

30 1 4 7 8 9 10 14 16 20 21 23 24 25 27 28 29 31 34 35 38 39 41 44 45 50 51 53 54 56 59 

result:

ok OK (n = 60)

Test #81:

score: 0
Accepted
time: 209ms
memory: 491908kb

input:

70
916866 18410960 2140963 28356218 34410171 12062054 25741887 33240543 86852495 23453767 14271707 9754202 1932139 12308521 4726587 32003531 6516922 4141323 34778310 49491721 17754948 75683029 28083791 43126191 12836445 2553474 47210027 18099089 138452283 66425860 62905883 51927586 15499629 8326740 ...

output:

35 1 3 4 5 6 11 12 13 14 18 19 22 23 25 27 29 30 32 33 34 37 39 42 45 46 49 50 51 52 57 60 61 64 65 69 

result:

ok OK (n = 70)

Test #82:

score: 0
Accepted
time: 211ms
memory: 491848kb

input:

70
28795603 72564968 151590306 47459843 19899189 17429088 84346346 24788256 2503397 16033307 73064009 12814110 35778127 198545 19295990 64434228 57424070 28514145 60257668 3656690 829518 61741070 2102931 22741841 10618964 1365514 17137443 54247743 11179143 569553 85323534 2370816 22160552 9853020 64...

output:

35 1 3 6 9 11 12 14 15 18 22 23 27 28 29 31 32 33 37 39 41 44 45 49 50 51 55 56 60 61 63 65 66 67 68 69 

result:

ok OK (n = 70)

Test #83:

score: 0
Accepted
time: 202ms
memory: 492056kb

input:

70
371540 8055639 7605876 13489075 56903033 27312467 10571670 31650421 24459781 57238439 65999744 12058064 348784 12196899 13063796 32945382 38737189 3095683 6779734 35488140 37103622 17433436 80127496 14072243 3724546 36769874 12221118 54683401 20796857 32354490 24071750 9370 17455833 7086925 24475...

output:

35 3 4 5 6 7 8 9 11 12 13 14 15 16 24 26 27 28 29 35 36 40 42 44 47 49 50 53 55 56 58 59 63 66 67 69 

result:

ok OK (n = 70)

Test #84:

score: 0
Accepted
time: 212ms
memory: 491956kb

input:

70
130866459 33955325 13868824 1004166 120480149 37668118 4745400 1825579 71068560 9191949 23867066 40408894 77691765 11297336 9385843 4778235 67425433 13884948 82232081 14492654 107261941 6122217 47457754 3802417 6716141 5057258 48498180 178730373 74547044 29153752 9043227 10692710 20313175 4404711...

output:

35 5 6 10 11 12 13 15 19 20 22 23 24 26 27 29 30 31 33 35 36 38 39 42 44 45 46 48 52 55 58 61 65 66 67 70 

result:

ok OK (n = 70)

Test #85:

score: 0
Accepted
time: 188ms
memory: 491888kb

input:

70
7471964 18387988 25942209 61822949 132867941 2651659 40279296 4614125 58254560 6366375 71041647 2196556 40752340 46901243 25839121 23897796 1775072 140676425 99556521 2541944 4668396 21004599 21954341 11072229 11146960 23992154 47354935 18680656 9969313 31755481 42981546 12936779 7040793 47794641...

output:

35 3 4 6 9 11 12 14 15 19 20 22 23 24 28 30 34 35 36 37 39 41 47 49 51 52 55 57 58 59 61 63 64 65 67 68 

result:

ok OK (n = 70)

Test #86:

score: 0
Accepted
time: 168ms
memory: 424184kb

input:

80
30747242 108046402 13646112 96444624 22520949 28462866 38375344 45622820 5155470 332018 52034325 986495 20952400 8043125 2412945 16027122 59676746 61050139 30831014 9191727 7170540 55541220 65363707 25964888 29120103 14141940 15664360 4095531 40257891 15457135 12379379 30413639 10038987 69676901 ...

output:

40 2 3 5 6 7 10 11 14 15 17 18 22 23 26 28 29 30 31 32 36 38 39 40 41 46 49 52 53 55 56 62 65 67 69 70 73 74 78 79 80 

result:

ok OK (n = 80)

Test #87:

score: 0
Accepted
time: 165ms
memory: 424220kb

input:

80
4335837 8861320 116708711 58916543 10671705 30826226 17387873 28633636 11358609 163677297 1592571 3991191 3898348 33996678 30151411 10095197 617148 10475544 2536418 18016259 25065411 18627258 3467156 2253893 35363041 15357912 1241123 13349964 7705241 40750124 19082552 24384166 29713354 6219438 38...

output:

40 2 4 6 9 10 12 13 14 15 17 21 22 23 25 27 28 30 32 33 34 36 38 40 41 43 53 54 58 59 61 62 64 69 70 71 73 74 75 77 78 

result:

ok OK (n = 80)

Test #88:

score: 0
Accepted
time: 152ms
memory: 424336kb

input:

80
26763997 355719 14319211 437587 24158100 20863239 9632147 32849450 40870541 27504655 13210322 42813652 38235336 142067557 57495593 54619183 3897667 4821841 44793883 25849227 3492264 27697484 3550221 26242358 11846929 5921272 6032928 16040842 63846402 23661323 8429827 20366303 10572575 3305999 900...

output:

40 2 3 5 7 8 10 12 14 16 17 21 26 28 29 30 31 38 40 43 46 48 49 50 51 52 54 56 57 59 61 63 64 66 67 68 69 73 74 76 80 

result:

ok OK (n = 80)

Test #89:

score: 0
Accepted
time: 156ms
memory: 424200kb

input:

80
8027575 8165547 11771432 32821697 96711790 74598197 20052869 7111474 33240231 38744650 27653517 15860164 16704460 16157853 108528013 38183465 1964685 69479521 83420737 35998618 18947865 44379948 4214529 53067934 33734753 5687973 7870131 64154227 42414266 3751067 5962935 16885561 10355045 5085590 ...

output:

40 1 2 3 4 5 12 14 15 18 20 21 26 28 30 31 34 35 36 38 40 44 46 47 48 49 50 52 53 54 55 56 62 64 65 66 68 71 72 76 79 

result:

ok OK (n = 80)

Test #90:

score: 0
Accepted
time: 174ms
memory: 424292kb

input:

80
3821606 20855831 22559657 1892643 96525315 209238 13079106 29881698 143293387 37413672 3645932 10883110 38177985 26472428 25088892 20520843 3053733 120666998 19708670 7841445 1760331 63186167 20054900 13562137 23753404 6899515 10574464 4569217 42495811 18107907 19888122 7204745 4062161 2708548 34...

output:

40 3 4 7 9 11 12 13 14 15 17 23 28 29 31 32 33 35 37 38 40 41 42 43 44 47 49 50 52 54 57 58 60 63 65 66 67 70 72 74 77 

result:

ok OK (n = 80)

Test #91:

score: 0
Accepted
time: 63ms
memory: 179408kb

input:

90
6609675 3675693 23713016 1646965 16344989 5995271 14492742 4753506 17445777 18990527 22582173 10975406 5178445 29329080 1335977 20480750 27917351 570923 7776043 13211625 3656232 3621031 5921973 43064199 35878497 73519260 15872841 39577304 44623435 6760544 19363898 44808545 62404173 12222219 34818...

output:

45 2 3 4 6 7 9 12 13 16 17 18 20 26 27 28 29 31 32 33 38 41 42 44 45 48 49 51 53 55 56 58 59 61 64 70 73 78 79 80 82 83 85 86 89 90 

result:

ok OK (n = 90)

Test #92:

score: 0
Accepted
time: 55ms
memory: 179412kb

input:

90
146558347 16030233 70655181 78889247 12335690 48629805 8612092 59328646 7642371 36240541 6380085 865751 6342028 3075142 15905608 15668832 8972524 27836035 20730244 28342854 13341337 16189409 7785366 68056911 16415417 17510749 28683682 2814822 128221046 32853570 5485524 1638282 1675663 1744069 108...

output:

45 3 5 8 12 13 14 15 16 17 18 19 25 29 31 32 33 35 39 41 42 43 45 46 52 54 56 58 59 60 62 63 64 65 66 70 71 74 76 77 78 79 85 87 88 89 

result:

ok OK (n = 90)

Test #93:

score: 0
Accepted
time: 67ms
memory: 179236kb

input:

90
16313672 13582854 18765304 29279178 41946094 4459327 7630256 15486722 3555979 33061941 24726712 19281993 14730551 14843388 1933527 14012801 8787900 23059707 40881728 31801947 5614144 69563146 2032838 33811441 56607092 18074326 16344644 11113174 11981280 36597822 58896723 18312841 62243235 4989111...

output:

45 2 4 5 7 8 11 15 17 21 23 25 27 32 33 36 38 39 42 45 46 48 49 51 52 54 55 57 63 64 65 68 70 71 72 74 76 77 78 79 81 83 85 86 88 89 

result:

ok OK (n = 90)

Test #94:

score: 0
Accepted
time: 70ms
memory: 179336kb

input:

90
3596878 15997708 34701166 18027274 11832076 44642822 54352481 4519904 18725982 32437271 17189554 36617734 19897548 9175941 42850981 6884756 44068907 3241459 56062412 21458019 9845505 23020923 7239619 2400172 9187360 17172624 219930 55496357 13518480 12414291 6179696 27749973 6018896 33034508 2509...

output:

45 1 2 3 4 6 12 17 19 22 27 29 31 34 35 36 40 41 42 50 51 54 57 58 59 61 62 64 69 71 72 73 74 75 76 78 79 80 81 82 83 84 86 87 88 90 

result:

ok OK (n = 90)

Test #95:

score: 0
Accepted
time: 54ms
memory: 179236kb

input:

90
24430881 2292875 9198147 25748463 21955782 17183108 13266355 60268523 2358203 13703967 7304947 8180741 54088806 767961 1732884 37121935 44092449 8264012 65258033 181081999 520882 8464595 14667807 44396616 1357512 29617489 14123169 16529192 16217434 6590972 47364263 13137735 9531762 25563683 19737...

output:

45 1 2 4 5 6 9 12 13 15 19 21 22 23 24 25 27 28 29 31 34 35 36 37 38 39 40 42 44 45 52 54 56 59 62 63 71 72 74 75 81 84 85 86 87 89 

result:

ok OK (n = 90)

Test #96:

score: 0
Accepted
time: 80ms
memory: 219368kb

input:

100
15138229 34124169 17738214 16180016 1107914 22163813 5955105 29083248 11584993 17105622 20441264 13709652 73197657 69838560 10962716 19189249 1015259 6440233 603125 3551944 6251199 4081990 10656234 4240864 16898293 37205097 6065060 22840240 5568008 32641028 12597497 24500820 1966118 75140992 660...

output:

50 4 5 7 11 13 14 15 19 20 22 25 26 27 28 33 34 35 37 38 39 41 43 44 45 46 47 48 49 50 51 57 58 61 64 66 69 70 73 74 75 77 81 82 85 87 90 92 94 97 100 

result:

ok OK (n = 100)

Test #97:

score: 0
Accepted
time: 92ms
memory: 219408kb

input:

100
48440544 10604486 22652034 23462102 21040251 7039240 39283133 1323776 9698925 34237789 2186520 7148656 18625533 10998613 3340232 1133627 9373594 27778164 14503116 2159205 106738008 54390394 1994296 20095250 8563172 14248430 57729923 14995020 12369811 4599942 74166585 13675491 8664553 4274272 695...

output:

50 1 2 3 5 6 7 8 13 14 15 16 19 20 24 27 29 31 34 35 36 39 40 42 43 44 45 47 48 49 53 54 55 59 61 63 64 67 72 73 79 80 83 84 86 89 91 92 94 95 98 

result:

ok OK (n = 100)

Test #98:

score: 0
Accepted
time: 82ms
memory: 219400kb

input:

100
16636802 5302937 16577137 6017553 33106468 38654785 16823677 20761150 6911124 30457260 28151398 35144962 61845816 9566266 18941711 21517706 34471552 11668150 7843778 15431253 11419918 13543971 26020304 6769473 458536 20459332 44186251 23383179 10400433 26699052 14123986 6297505 413648 4834803 10...

output:

50 3 5 6 7 8 9 10 11 12 14 20 22 23 25 30 34 40 45 48 50 51 53 54 56 57 59 60 61 62 63 67 68 69 70 71 78 82 84 85 86 87 88 89 92 93 94 96 97 99 100 

result:

ok OK (n = 100)

Test #99:

score: 0
Accepted
time: 79ms
memory: 219232kb

input:

100
1800741 11031946 30330760 16810497 50168292 59467944 16836589 7837471 25107812 2872016 9115367 14124663 18863437 6414897 4451365 37227116 3098443 86109458 38625404 37069590 2178168 15160806 6612549 18706237 25606699 4164396 5094814 7806607 4649731 15458392 38236471 12821162 6145858 3187494 16266...

output:

50 1 2 5 6 10 12 13 14 16 18 19 20 22 26 29 32 33 34 36 37 39 42 43 45 46 48 49 50 55 56 58 59 62 63 64 67 68 70 72 74 78 83 85 87 92 94 96 98 99 100 

result:

ok OK (n = 100)

Test #100:

score: 0
Accepted
time: 70ms
memory: 219400kb

input:

100
13554476 13499089 9309342 11527011 8898754 1301807 3231850 4048353 6131712 21619966 2620748 8579513 22273864 8872160 2987963 4184526 1406896 63470348 6068799 55102164 18817662 24432736 2152938 27888332 52113231 9887682 14712644 38587949 28510684 22245035 20683372 17419029 293849 34179136 1897927...

output:

50 3 5 6 8 11 12 14 15 17 18 19 20 21 22 23 24 27 28 29 31 32 33 37 38 39 40 41 42 45 50 54 55 60 61 65 67 68 69 73 74 77 80 81 82 88 91 92 97 99 100 

result:

ok OK (n = 100)

Extra Test:

score: 0
Extra Test Passed