답안 #940882

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
940882 2024-03-07T22:25:47 Z velislavgarkov Council (JOI23_council) C++14
100 / 100
2652 ms 690968 KB
#include <iostream>
using namespace std;
const int MAXN=3e5+10;
const int MAXM=(1<<20);
//#define endl '\n'
struct Answer {
    int ans1, ind1;
    int ans2, ind2;
};
int n, M;
int a[MAXN], op[MAXN], cnt[32];
pair <int, int> idx[MAXM][25], base[MAXM];
Answer dp[MAXM][25];
bool mem1[MAXM][25], mem2[MAXM][25];
bool fbit(int x, int bit) {
    return (x & (1<<bit));
}
Answer find_best (Answer res, int s, int i) {
    if (s>=res.ans1) {
        if (res.ind2!=i) {
            res.ans2=res.ans1;
            res.ind2=res.ind1;
        } else res.ans2=res.ind2=0;
        res.ans1=s;
        res.ind1=i;
    } else if (s>=res.ans2 && i!=res.ind1) {
        res.ans2=s;
        res.ind2=i;
    }
    return res;
}
pair <int,int> find_idx(int mask, int m) {
    if (m==-1) return base[mask];
    if (mem1[mask][m]) return idx[mask][m];
    mem1[mask][m]=true;

    idx[mask][m]=find_idx(mask,m-1);
    if (!(mask & (1 << m))) {
        pair <int, int> s=find_idx((mask ^ (1 << m)),m-1);

        if (idx[mask][m].first==0) idx[mask][m]=s;
        else if (idx[mask][m].second==0) {
            if (s.first && s.first!=idx[mask][m].first) idx[mask][m].second=s.first;
            else if (s.second && s.second!=idx[mask][m].first) idx[mask][m].second=s.second;
        }
    }
    return idx[mask][m];
}
Answer find_dp(int mask, int m) {
    if (m==-1) {
        Answer res={0,0,0,0};
        pair <int,int> cur=find_idx(mask,M-1);
        int s=__builtin_popcount(mask);
        if (cur.first!=0) {
            res.ans1=s;
            res.ind1=cur.first;
        }
        if (cur.second!=0 && cur.second!=res.ind1) {
            res.ans2=s;
            res.ind2=cur.second;
        }
        return res;
    }
    
    if (mem2[mask][m]) return dp[mask][m];
    mem2[mask][m]=true;

    dp[mask][m]=find_dp(mask,m-1);
    if ((mask & (1 << m))) {
        Answer res=find_dp((mask ^ (1 << m)),m-1);
        dp[mask][m]=find_best(dp[mask][m],res.ans1,res.ind1);
        dp[mask][m]=find_best(dp[mask][m],res.ans2,res.ind2);
    }
    //cout << "dp " << mask << ' ' << m << ' ' << dp[mask][m].ans1 << ' ' << dp[mask][m].ans2 << ' ' << dp[mask][m].ind1 << ' ' << dp[mask][m].ind2 << endl;
    return dp[mask][m];
}
int main () {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cin >> n >> M;
    int bit;
    for (int i=1;i<=n;i++) {
        for (int j=0;j<M;j++) {
            cin >> bit;
            a[i]+=(bit<<j);
            cnt[j]+=bit;
        }
        op[i]=(((1 << M) - 1) & (~a[i]));
        if (base[op[i]].first==0) base[op[i]].first=i;
        else base[op[i]].second=i;
    }

    for (int i=1;i<=n;i++) {
        int ans=0, mask=0;
        for (int j=0;j<M;j++) {
            if (cnt[j]>=n/2+2) ans++;
            else if (cnt[j]==n/2+1) {
                if (!fbit(a[i],j)) ans++;
                else mask+=(1<<j);
            } else if (cnt[j]==n/2 && !fbit(a[i],j)) mask+=(1<<j);
        }

        Answer res=find_dp(mask,M-1);
        if (res.ind1!=i) ans+=res.ans1;
        else ans+=res.ans2;
        cout << ans << endl;
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 6492 KB Output is correct
2 Correct 5 ms 10844 KB Output is correct
3 Correct 1 ms 6492 KB Output is correct
4 Correct 1 ms 6492 KB Output is correct
5 Correct 826 ms 667548 KB Output is correct
6 Correct 72 ms 233296 KB Output is correct
7 Correct 119 ms 231796 KB Output is correct
8 Correct 184 ms 232664 KB Output is correct
9 Correct 112 ms 232528 KB Output is correct
10 Correct 348 ms 323916 KB Output is correct
11 Correct 435 ms 284456 KB Output is correct
12 Correct 765 ms 533548 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 1 ms 6492 KB Output is correct
15 Correct 1 ms 6492 KB Output is correct
16 Correct 1 ms 6492 KB Output is correct
17 Correct 1 ms 6492 KB Output is correct
18 Correct 1 ms 6492 KB Output is correct
19 Correct 1 ms 6608 KB Output is correct
20 Correct 1 ms 6488 KB Output is correct
21 Correct 1 ms 6488 KB Output is correct
22 Correct 2 ms 10588 KB Output is correct
23 Correct 1 ms 6492 KB Output is correct
24 Correct 1 ms 6492 KB Output is correct
25 Correct 1 ms 6744 KB Output is correct
26 Correct 1 ms 6744 KB Output is correct
27 Correct 1 ms 6492 KB Output is correct
28 Correct 1 ms 6492 KB Output is correct
29 Correct 1 ms 6492 KB Output is correct
30 Correct 1 ms 8540 KB Output is correct
31 Correct 2 ms 10584 KB Output is correct
32 Correct 1 ms 6492 KB Output is correct
33 Correct 1 ms 6492 KB Output is correct
34 Correct 1 ms 6492 KB Output is correct
35 Correct 1 ms 6492 KB Output is correct
36 Correct 1 ms 6492 KB Output is correct
37 Correct 1 ms 6492 KB Output is correct
38 Correct 1 ms 8540 KB Output is correct
39 Correct 2 ms 10588 KB Output is correct
40 Correct 2 ms 10708 KB Output is correct
41 Correct 6 ms 19548 KB Output is correct
42 Correct 3 ms 13148 KB Output is correct
43 Correct 3 ms 15196 KB Output is correct
44 Correct 4 ms 17500 KB Output is correct
45 Correct 6 ms 19804 KB Output is correct
46 Correct 56 ms 90896 KB Output is correct
47 Correct 16 ms 61532 KB Output is correct
48 Correct 14 ms 40540 KB Output is correct
49 Correct 51 ms 78856 KB Output is correct
50 Correct 45 ms 90620 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 6492 KB Output is correct
2 Correct 5 ms 10844 KB Output is correct
3 Correct 1 ms 6492 KB Output is correct
4 Correct 1 ms 6492 KB Output is correct
5 Correct 826 ms 667548 KB Output is correct
6 Correct 72 ms 233296 KB Output is correct
7 Correct 119 ms 231796 KB Output is correct
8 Correct 184 ms 232664 KB Output is correct
9 Correct 112 ms 232528 KB Output is correct
10 Correct 348 ms 323916 KB Output is correct
11 Correct 435 ms 284456 KB Output is correct
12 Correct 765 ms 533548 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 1 ms 6492 KB Output is correct
15 Correct 1 ms 6492 KB Output is correct
16 Correct 1 ms 6492 KB Output is correct
17 Correct 1 ms 6492 KB Output is correct
18 Correct 1 ms 6492 KB Output is correct
19 Correct 1 ms 6608 KB Output is correct
20 Correct 1 ms 6488 KB Output is correct
21 Correct 1 ms 6488 KB Output is correct
22 Correct 2 ms 10588 KB Output is correct
23 Correct 1 ms 6492 KB Output is correct
24 Correct 1 ms 6492 KB Output is correct
25 Correct 1 ms 6744 KB Output is correct
26 Correct 1 ms 6744 KB Output is correct
27 Correct 1 ms 6492 KB Output is correct
28 Correct 1 ms 6492 KB Output is correct
29 Correct 1 ms 6492 KB Output is correct
30 Correct 1 ms 8540 KB Output is correct
31 Correct 2 ms 10584 KB Output is correct
32 Correct 1 ms 6492 KB Output is correct
33 Correct 1 ms 6492 KB Output is correct
34 Correct 1 ms 6492 KB Output is correct
35 Correct 1 ms 6492 KB Output is correct
36 Correct 1 ms 6492 KB Output is correct
37 Correct 1 ms 6492 KB Output is correct
38 Correct 1 ms 8540 KB Output is correct
39 Correct 2 ms 10588 KB Output is correct
40 Correct 2 ms 10708 KB Output is correct
41 Correct 6 ms 19548 KB Output is correct
42 Correct 3 ms 13148 KB Output is correct
43 Correct 3 ms 15196 KB Output is correct
44 Correct 4 ms 17500 KB Output is correct
45 Correct 6 ms 19804 KB Output is correct
46 Correct 56 ms 90896 KB Output is correct
47 Correct 16 ms 61532 KB Output is correct
48 Correct 14 ms 40540 KB Output is correct
49 Correct 51 ms 78856 KB Output is correct
50 Correct 45 ms 90620 KB Output is correct
51 Correct 76 ms 233520 KB Output is correct
52 Correct 79 ms 231508 KB Output is correct
53 Correct 78 ms 237824 KB Output is correct
54 Correct 1221 ms 652624 KB Output is correct
55 Correct 5 ms 6492 KB Output is correct
56 Correct 121 ms 91976 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 6492 KB Output is correct
2 Correct 353 ms 10520 KB Output is correct
3 Correct 355 ms 10832 KB Output is correct
4 Correct 348 ms 9808 KB Output is correct
5 Correct 359 ms 10624 KB Output is correct
6 Correct 339 ms 9928 KB Output is correct
7 Correct 358 ms 10488 KB Output is correct
8 Correct 1 ms 6492 KB Output is correct
9 Correct 1 ms 6612 KB Output is correct
10 Correct 1 ms 6492 KB Output is correct
11 Correct 1 ms 6492 KB Output is correct
12 Correct 1 ms 6492 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 1 ms 6492 KB Output is correct
15 Correct 1 ms 6492 KB Output is correct
16 Correct 1 ms 6492 KB Output is correct
17 Correct 5 ms 6492 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 6492 KB Output is correct
2 Correct 353 ms 10520 KB Output is correct
3 Correct 355 ms 10832 KB Output is correct
4 Correct 348 ms 9808 KB Output is correct
5 Correct 359 ms 10624 KB Output is correct
6 Correct 339 ms 9928 KB Output is correct
7 Correct 358 ms 10488 KB Output is correct
8 Correct 1 ms 6492 KB Output is correct
9 Correct 1 ms 6612 KB Output is correct
10 Correct 1 ms 6492 KB Output is correct
11 Correct 1 ms 6492 KB Output is correct
12 Correct 1 ms 6492 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 1 ms 6492 KB Output is correct
15 Correct 1 ms 6492 KB Output is correct
16 Correct 1 ms 6492 KB Output is correct
17 Correct 5 ms 6492 KB Output is correct
18 Correct 1 ms 6488 KB Output is correct
19 Correct 1 ms 6492 KB Output is correct
20 Correct 466 ms 19412 KB Output is correct
21 Correct 457 ms 16828 KB Output is correct
22 Correct 508 ms 16724 KB Output is correct
23 Correct 439 ms 17504 KB Output is correct
24 Correct 438 ms 17604 KB Output is correct
25 Correct 453 ms 17196 KB Output is correct
26 Correct 475 ms 19220 KB Output is correct
27 Correct 2 ms 10584 KB Output is correct
28 Correct 1 ms 6492 KB Output is correct
29 Correct 1 ms 6492 KB Output is correct
30 Correct 1 ms 6492 KB Output is correct
31 Correct 1 ms 6492 KB Output is correct
32 Correct 1 ms 6492 KB Output is correct
33 Correct 2 ms 6492 KB Output is correct
34 Correct 1 ms 6488 KB Output is correct
35 Correct 1 ms 8540 KB Output is correct
36 Correct 2 ms 10588 KB Output is correct
37 Correct 1 ms 6488 KB Output is correct
38 Correct 1 ms 6492 KB Output is correct
39 Correct 1 ms 6492 KB Output is correct
40 Correct 1 ms 6492 KB Output is correct
41 Correct 2 ms 6492 KB Output is correct
42 Correct 1 ms 6492 KB Output is correct
43 Correct 1 ms 8536 KB Output is correct
44 Correct 2 ms 10588 KB Output is correct
45 Correct 2 ms 10588 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 6492 KB Output is correct
2 Correct 353 ms 10520 KB Output is correct
3 Correct 355 ms 10832 KB Output is correct
4 Correct 348 ms 9808 KB Output is correct
5 Correct 359 ms 10624 KB Output is correct
6 Correct 339 ms 9928 KB Output is correct
7 Correct 358 ms 10488 KB Output is correct
8 Correct 1 ms 6492 KB Output is correct
9 Correct 1 ms 6612 KB Output is correct
10 Correct 1 ms 6492 KB Output is correct
11 Correct 1 ms 6492 KB Output is correct
12 Correct 1 ms 6492 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 1 ms 6492 KB Output is correct
15 Correct 1 ms 6492 KB Output is correct
16 Correct 1 ms 6492 KB Output is correct
17 Correct 5 ms 6492 KB Output is correct
18 Correct 1 ms 6488 KB Output is correct
19 Correct 1 ms 6492 KB Output is correct
20 Correct 466 ms 19412 KB Output is correct
21 Correct 457 ms 16828 KB Output is correct
22 Correct 508 ms 16724 KB Output is correct
23 Correct 439 ms 17504 KB Output is correct
24 Correct 438 ms 17604 KB Output is correct
25 Correct 453 ms 17196 KB Output is correct
26 Correct 475 ms 19220 KB Output is correct
27 Correct 2 ms 10584 KB Output is correct
28 Correct 1 ms 6492 KB Output is correct
29 Correct 1 ms 6492 KB Output is correct
30 Correct 1 ms 6492 KB Output is correct
31 Correct 1 ms 6492 KB Output is correct
32 Correct 1 ms 6492 KB Output is correct
33 Correct 2 ms 6492 KB Output is correct
34 Correct 1 ms 6488 KB Output is correct
35 Correct 1 ms 8540 KB Output is correct
36 Correct 2 ms 10588 KB Output is correct
37 Correct 1 ms 6488 KB Output is correct
38 Correct 1 ms 6492 KB Output is correct
39 Correct 1 ms 6492 KB Output is correct
40 Correct 1 ms 6492 KB Output is correct
41 Correct 2 ms 6492 KB Output is correct
42 Correct 1 ms 6492 KB Output is correct
43 Correct 1 ms 8536 KB Output is correct
44 Correct 2 ms 10588 KB Output is correct
45 Correct 2 ms 10588 KB Output is correct
46 Correct 2 ms 10840 KB Output is correct
47 Correct 587 ms 30804 KB Output is correct
48 Correct 528 ms 23728 KB Output is correct
49 Correct 515 ms 23964 KB Output is correct
50 Correct 485 ms 22392 KB Output is correct
51 Correct 499 ms 22100 KB Output is correct
52 Correct 573 ms 22264 KB Output is correct
53 Correct 537 ms 31056 KB Output is correct
54 Correct 6 ms 19544 KB Output is correct
55 Correct 3 ms 13400 KB Output is correct
56 Correct 3 ms 15276 KB Output is correct
57 Correct 4 ms 17496 KB Output is correct
58 Correct 5 ms 19592 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 6492 KB Output is correct
2 Correct 353 ms 10520 KB Output is correct
3 Correct 355 ms 10832 KB Output is correct
4 Correct 348 ms 9808 KB Output is correct
5 Correct 359 ms 10624 KB Output is correct
6 Correct 339 ms 9928 KB Output is correct
7 Correct 358 ms 10488 KB Output is correct
8 Correct 1 ms 6492 KB Output is correct
9 Correct 1 ms 6612 KB Output is correct
10 Correct 1 ms 6492 KB Output is correct
11 Correct 1 ms 6492 KB Output is correct
12 Correct 1 ms 6492 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 1 ms 6492 KB Output is correct
15 Correct 1 ms 6492 KB Output is correct
16 Correct 1 ms 6492 KB Output is correct
17 Correct 5 ms 6492 KB Output is correct
18 Correct 1 ms 6488 KB Output is correct
19 Correct 1 ms 6492 KB Output is correct
20 Correct 466 ms 19412 KB Output is correct
21 Correct 457 ms 16828 KB Output is correct
22 Correct 508 ms 16724 KB Output is correct
23 Correct 439 ms 17504 KB Output is correct
24 Correct 438 ms 17604 KB Output is correct
25 Correct 453 ms 17196 KB Output is correct
26 Correct 475 ms 19220 KB Output is correct
27 Correct 2 ms 10584 KB Output is correct
28 Correct 1 ms 6492 KB Output is correct
29 Correct 1 ms 6492 KB Output is correct
30 Correct 1 ms 6492 KB Output is correct
31 Correct 1 ms 6492 KB Output is correct
32 Correct 1 ms 6492 KB Output is correct
33 Correct 2 ms 6492 KB Output is correct
34 Correct 1 ms 6488 KB Output is correct
35 Correct 1 ms 8540 KB Output is correct
36 Correct 2 ms 10588 KB Output is correct
37 Correct 1 ms 6488 KB Output is correct
38 Correct 1 ms 6492 KB Output is correct
39 Correct 1 ms 6492 KB Output is correct
40 Correct 1 ms 6492 KB Output is correct
41 Correct 2 ms 6492 KB Output is correct
42 Correct 1 ms 6492 KB Output is correct
43 Correct 1 ms 8536 KB Output is correct
44 Correct 2 ms 10588 KB Output is correct
45 Correct 2 ms 10588 KB Output is correct
46 Correct 2 ms 10840 KB Output is correct
47 Correct 587 ms 30804 KB Output is correct
48 Correct 528 ms 23728 KB Output is correct
49 Correct 515 ms 23964 KB Output is correct
50 Correct 485 ms 22392 KB Output is correct
51 Correct 499 ms 22100 KB Output is correct
52 Correct 573 ms 22264 KB Output is correct
53 Correct 537 ms 31056 KB Output is correct
54 Correct 6 ms 19544 KB Output is correct
55 Correct 3 ms 13400 KB Output is correct
56 Correct 3 ms 15276 KB Output is correct
57 Correct 4 ms 17496 KB Output is correct
58 Correct 5 ms 19592 KB Output is correct
59 Correct 544 ms 35472 KB Output is correct
60 Correct 379 ms 96596 KB Output is correct
61 Correct 428 ms 97408 KB Output is correct
62 Correct 419 ms 97480 KB Output is correct
63 Correct 606 ms 63808 KB Output is correct
64 Correct 701 ms 104652 KB Output is correct
65 Correct 709 ms 104664 KB Output is correct
66 Correct 535 ms 49488 KB Output is correct
67 Correct 526 ms 49044 KB Output is correct
68 Correct 559 ms 50128 KB Output is correct
69 Correct 755 ms 105092 KB Output is correct
70 Correct 55 ms 90896 KB Output is correct
71 Correct 16 ms 61528 KB Output is correct
72 Correct 14 ms 40540 KB Output is correct
73 Correct 50 ms 78928 KB Output is correct
74 Correct 44 ms 90704 KB Output is correct
75 Correct 117 ms 92160 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 6492 KB Output is correct
2 Correct 5 ms 10844 KB Output is correct
3 Correct 1 ms 6492 KB Output is correct
4 Correct 1 ms 6492 KB Output is correct
5 Correct 826 ms 667548 KB Output is correct
6 Correct 72 ms 233296 KB Output is correct
7 Correct 119 ms 231796 KB Output is correct
8 Correct 184 ms 232664 KB Output is correct
9 Correct 112 ms 232528 KB Output is correct
10 Correct 348 ms 323916 KB Output is correct
11 Correct 435 ms 284456 KB Output is correct
12 Correct 765 ms 533548 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 1 ms 6492 KB Output is correct
15 Correct 1 ms 6492 KB Output is correct
16 Correct 1 ms 6492 KB Output is correct
17 Correct 1 ms 6492 KB Output is correct
18 Correct 1 ms 6492 KB Output is correct
19 Correct 1 ms 6608 KB Output is correct
20 Correct 1 ms 6488 KB Output is correct
21 Correct 1 ms 6488 KB Output is correct
22 Correct 2 ms 10588 KB Output is correct
23 Correct 1 ms 6492 KB Output is correct
24 Correct 1 ms 6492 KB Output is correct
25 Correct 1 ms 6744 KB Output is correct
26 Correct 1 ms 6744 KB Output is correct
27 Correct 1 ms 6492 KB Output is correct
28 Correct 1 ms 6492 KB Output is correct
29 Correct 1 ms 6492 KB Output is correct
30 Correct 1 ms 8540 KB Output is correct
31 Correct 2 ms 10584 KB Output is correct
32 Correct 1 ms 6492 KB Output is correct
33 Correct 1 ms 6492 KB Output is correct
34 Correct 1 ms 6492 KB Output is correct
35 Correct 1 ms 6492 KB Output is correct
36 Correct 1 ms 6492 KB Output is correct
37 Correct 1 ms 6492 KB Output is correct
38 Correct 1 ms 8540 KB Output is correct
39 Correct 2 ms 10588 KB Output is correct
40 Correct 2 ms 10708 KB Output is correct
41 Correct 6 ms 19548 KB Output is correct
42 Correct 3 ms 13148 KB Output is correct
43 Correct 3 ms 15196 KB Output is correct
44 Correct 4 ms 17500 KB Output is correct
45 Correct 6 ms 19804 KB Output is correct
46 Correct 56 ms 90896 KB Output is correct
47 Correct 16 ms 61532 KB Output is correct
48 Correct 14 ms 40540 KB Output is correct
49 Correct 51 ms 78856 KB Output is correct
50 Correct 45 ms 90620 KB Output is correct
51 Correct 76 ms 233520 KB Output is correct
52 Correct 79 ms 231508 KB Output is correct
53 Correct 78 ms 237824 KB Output is correct
54 Correct 1221 ms 652624 KB Output is correct
55 Correct 5 ms 6492 KB Output is correct
56 Correct 121 ms 91976 KB Output is correct
57 Correct 1 ms 6492 KB Output is correct
58 Correct 353 ms 10520 KB Output is correct
59 Correct 355 ms 10832 KB Output is correct
60 Correct 348 ms 9808 KB Output is correct
61 Correct 359 ms 10624 KB Output is correct
62 Correct 339 ms 9928 KB Output is correct
63 Correct 358 ms 10488 KB Output is correct
64 Correct 1 ms 6492 KB Output is correct
65 Correct 1 ms 6612 KB Output is correct
66 Correct 1 ms 6492 KB Output is correct
67 Correct 1 ms 6492 KB Output is correct
68 Correct 1 ms 6492 KB Output is correct
69 Correct 1 ms 6492 KB Output is correct
70 Correct 1 ms 6492 KB Output is correct
71 Correct 1 ms 6492 KB Output is correct
72 Correct 1 ms 6492 KB Output is correct
73 Correct 5 ms 6492 KB Output is correct
74 Correct 1 ms 6488 KB Output is correct
75 Correct 1 ms 6492 KB Output is correct
76 Correct 466 ms 19412 KB Output is correct
77 Correct 457 ms 16828 KB Output is correct
78 Correct 508 ms 16724 KB Output is correct
79 Correct 439 ms 17504 KB Output is correct
80 Correct 438 ms 17604 KB Output is correct
81 Correct 453 ms 17196 KB Output is correct
82 Correct 475 ms 19220 KB Output is correct
83 Correct 2 ms 10584 KB Output is correct
84 Correct 1 ms 6492 KB Output is correct
85 Correct 1 ms 6492 KB Output is correct
86 Correct 1 ms 6492 KB Output is correct
87 Correct 1 ms 6492 KB Output is correct
88 Correct 1 ms 6492 KB Output is correct
89 Correct 2 ms 6492 KB Output is correct
90 Correct 1 ms 6488 KB Output is correct
91 Correct 1 ms 8540 KB Output is correct
92 Correct 2 ms 10588 KB Output is correct
93 Correct 1 ms 6488 KB Output is correct
94 Correct 1 ms 6492 KB Output is correct
95 Correct 1 ms 6492 KB Output is correct
96 Correct 1 ms 6492 KB Output is correct
97 Correct 2 ms 6492 KB Output is correct
98 Correct 1 ms 6492 KB Output is correct
99 Correct 1 ms 8536 KB Output is correct
100 Correct 2 ms 10588 KB Output is correct
101 Correct 2 ms 10588 KB Output is correct
102 Correct 2 ms 10840 KB Output is correct
103 Correct 587 ms 30804 KB Output is correct
104 Correct 528 ms 23728 KB Output is correct
105 Correct 515 ms 23964 KB Output is correct
106 Correct 485 ms 22392 KB Output is correct
107 Correct 499 ms 22100 KB Output is correct
108 Correct 573 ms 22264 KB Output is correct
109 Correct 537 ms 31056 KB Output is correct
110 Correct 6 ms 19544 KB Output is correct
111 Correct 3 ms 13400 KB Output is correct
112 Correct 3 ms 15276 KB Output is correct
113 Correct 4 ms 17496 KB Output is correct
114 Correct 5 ms 19592 KB Output is correct
115 Correct 544 ms 35472 KB Output is correct
116 Correct 379 ms 96596 KB Output is correct
117 Correct 428 ms 97408 KB Output is correct
118 Correct 419 ms 97480 KB Output is correct
119 Correct 606 ms 63808 KB Output is correct
120 Correct 701 ms 104652 KB Output is correct
121 Correct 709 ms 104664 KB Output is correct
122 Correct 535 ms 49488 KB Output is correct
123 Correct 526 ms 49044 KB Output is correct
124 Correct 559 ms 50128 KB Output is correct
125 Correct 755 ms 105092 KB Output is correct
126 Correct 55 ms 90896 KB Output is correct
127 Correct 16 ms 61528 KB Output is correct
128 Correct 14 ms 40540 KB Output is correct
129 Correct 50 ms 78928 KB Output is correct
130 Correct 44 ms 90704 KB Output is correct
131 Correct 117 ms 92160 KB Output is correct
132 Correct 2359 ms 689772 KB Output is correct
133 Correct 2393 ms 689772 KB Output is correct
134 Correct 2534 ms 690460 KB Output is correct
135 Correct 2210 ms 634876 KB Output is correct
136 Correct 2206 ms 690036 KB Output is correct
137 Correct 1317 ms 358136 KB Output is correct
138 Correct 1340 ms 358188 KB Output is correct
139 Correct 606 ms 248144 KB Output is correct
140 Correct 613 ms 245936 KB Output is correct
141 Correct 661 ms 254176 KB Output is correct
142 Correct 2652 ms 690968 KB Output is correct