답안 #796026

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
796026 2023-07-28T04:57:13 Z 반딧불(#10068) Council (JOI23_council) C++17
100 / 100
631 ms 55176 KB
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
const int INF = 1e9;

int n, k, s;
int arr[300002][22];
int sum[22];
bool caring[22];
int basis;

int bitx0, bitx1;
int val0[300002], val1[300002];
int val[300002];

int DP[1<<20][2]; /// �ڱ⸦ �����ϴ� �ּ� / �ִ� ��ȣ
pair<int, int> DP2[1<<20][2]; /// �ڱ� �Ʒ� �� ��Ʈ ���� ���� ���� �� ��

void dpmerge(int x, pair<int, int> p){
    if(p.first == -1) return;
    if(DP2[x][0].second == p.second || DP2[x][1].second == p.second){
        if(DP2[x][1].second == p.second) swap(DP2[x][0], DP2[x][1]);
        DP2[x][0].first = max(DP2[x][0].first, p.first);
        if(DP2[x][0] < DP2[x][1]) swap(DP2[x][0], DP2[x][1]);
        return;
    }
    if(DP2[x][1] < p) swap(DP2[x][1], p);
    if(DP2[x][0] < DP2[x][1]) swap(DP2[x][0], DP2[x][1]);
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin >> n >> k;
    for(int i=1; i<=n; i++) for(int j=1; j<=k; j++){
        cin >> arr[i][j];
        sum[j] += arr[i][j];
    }
    s = n/2;

    for(int j=1; j<=k; j++){
        if(sum[j] > s+1){
            basis++;
            continue;
        }
        if(sum[j] < s) continue;
        caring[j] = 1;
        for(int i=1; i<=n; i++){
            if(!arr[i][j]){
                if(sum[j] == s) val0[i] += (1<<(j-1));
                else val1[i] += (1<<(j-1));
            }
        }
        if(sum[j] == s) bitx0 += (1<<(j-1));
        else bitx1 += (1<<(j-1));
    }
    for(int i=1; i<=n; i++){
        val[i] = val0[i] | val1[i];
    }

    for(int i=0; i<(1<<k); i++){
        DP[i][0] = INF, DP[i][1] = 0;
        DP2[i][0] = DP2[i][1] = make_pair(-1, -1);
    }

    /// DP�� ����Ѵ�
    for(int i=1; i<=n; i++){
        DP[val[i]][0] = min(DP[val[i]][0], i);
        DP[val[i]][1] = max(DP[val[i]][1], i);
    }
    for(int i=(1<<k)-1; i>=0; i--){
        for(int j=0; j<k; j++){
            if((i>>j)&1){
                DP[i^(1<<j)][0] = min(DP[i^(1<<j)][0], DP[i][0]);
                DP[i^(1<<j)][1] = max(DP[i^(1<<j)][1], DP[i][1]);
            }
        }
    }

    /// DP2�� ����Ѵ�
    for(int i=0; i<(1<<k); i++){
        if(DP[i][0] != INF) DP2[i][0] = make_pair(__builtin_popcount(i), DP[i][0]);
        if(DP[i][1] != 0 && DP[i][1] != DP[i][0]) DP2[i][1] = make_pair(__builtin_popcount(i), DP[i][1]);
        if(DP2[i][0] < DP2[i][1]) swap(DP2[i][0], DP2[i][1]);

        for(int j=0; j<k; j++){
            if((i>>j)&1){
                dpmerge(i, DP2[i^(1<<j)][0]);
                dpmerge(i, DP2[i^(1<<j)][1]);
            }
        }
    }

    for(int i=1; i<=n; i++){
        int mine = basis + __builtin_popcount(val1[i]);
        int key = (bitx1 & ~val1[i]) | (bitx0 & val0[i]);
        int v = (DP2[key][0].second == i ? DP2[key][1].first : DP2[key][0].first);
        v = max(v, 0);
        cout << mine+v << '\n';
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 0 ms 340 KB Output is correct
4 Correct 0 ms 340 KB Output is correct
5 Correct 220 ms 24952 KB Output is correct
6 Correct 214 ms 24968 KB Output is correct
7 Correct 238 ms 24916 KB Output is correct
8 Correct 250 ms 24948 KB Output is correct
9 Correct 225 ms 24980 KB Output is correct
10 Correct 259 ms 24916 KB Output is correct
11 Correct 320 ms 25076 KB Output is correct
12 Correct 321 ms 24980 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 0 ms 340 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 0 ms 340 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 0 ms 340 KB Output is correct
21 Correct 0 ms 268 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 0 ms 340 KB Output is correct
24 Correct 0 ms 340 KB Output is correct
25 Correct 0 ms 340 KB Output is correct
26 Correct 1 ms 340 KB Output is correct
27 Correct 0 ms 340 KB Output is correct
28 Correct 0 ms 340 KB Output is correct
29 Correct 0 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 1 ms 340 KB Output is correct
33 Correct 0 ms 340 KB Output is correct
34 Correct 0 ms 340 KB Output is correct
35 Correct 0 ms 340 KB Output is correct
36 Correct 0 ms 340 KB Output is correct
37 Correct 0 ms 340 KB Output is correct
38 Correct 0 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 3 ms 724 KB Output is correct
42 Correct 3 ms 724 KB Output is correct
43 Correct 3 ms 724 KB Output is correct
44 Correct 4 ms 724 KB Output is correct
45 Correct 4 ms 724 KB Output is correct
46 Correct 25 ms 3444 KB Output is correct
47 Correct 28 ms 3412 KB Output is correct
48 Correct 26 ms 3448 KB Output is correct
49 Correct 29 ms 3412 KB Output is correct
50 Correct 31 ms 3424 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 0 ms 340 KB Output is correct
4 Correct 0 ms 340 KB Output is correct
5 Correct 220 ms 24952 KB Output is correct
6 Correct 214 ms 24968 KB Output is correct
7 Correct 238 ms 24916 KB Output is correct
8 Correct 250 ms 24948 KB Output is correct
9 Correct 225 ms 24980 KB Output is correct
10 Correct 259 ms 24916 KB Output is correct
11 Correct 320 ms 25076 KB Output is correct
12 Correct 321 ms 24980 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 0 ms 340 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 0 ms 340 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 0 ms 340 KB Output is correct
21 Correct 0 ms 268 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 0 ms 340 KB Output is correct
24 Correct 0 ms 340 KB Output is correct
25 Correct 0 ms 340 KB Output is correct
26 Correct 1 ms 340 KB Output is correct
27 Correct 0 ms 340 KB Output is correct
28 Correct 0 ms 340 KB Output is correct
29 Correct 0 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 1 ms 340 KB Output is correct
33 Correct 0 ms 340 KB Output is correct
34 Correct 0 ms 340 KB Output is correct
35 Correct 0 ms 340 KB Output is correct
36 Correct 0 ms 340 KB Output is correct
37 Correct 0 ms 340 KB Output is correct
38 Correct 0 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 3 ms 724 KB Output is correct
42 Correct 3 ms 724 KB Output is correct
43 Correct 3 ms 724 KB Output is correct
44 Correct 4 ms 724 KB Output is correct
45 Correct 4 ms 724 KB Output is correct
46 Correct 25 ms 3444 KB Output is correct
47 Correct 28 ms 3412 KB Output is correct
48 Correct 26 ms 3448 KB Output is correct
49 Correct 29 ms 3412 KB Output is correct
50 Correct 31 ms 3424 KB Output is correct
51 Correct 220 ms 25228 KB Output is correct
52 Correct 228 ms 25212 KB Output is correct
53 Correct 221 ms 25220 KB Output is correct
54 Correct 300 ms 25172 KB Output is correct
55 Correct 1 ms 596 KB Output is correct
56 Correct 38 ms 3728 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 50 ms 27844 KB Output is correct
3 Correct 48 ms 27896 KB Output is correct
4 Correct 38 ms 27888 KB Output is correct
5 Correct 51 ms 27848 KB Output is correct
6 Correct 44 ms 29084 KB Output is correct
7 Correct 57 ms 30164 KB Output is correct
8 Correct 0 ms 340 KB Output is correct
9 Correct 0 ms 340 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 0 ms 340 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 ms 340 KB Output is correct
15 Correct 0 ms 340 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 1 ms 596 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 50 ms 27844 KB Output is correct
3 Correct 48 ms 27896 KB Output is correct
4 Correct 38 ms 27888 KB Output is correct
5 Correct 51 ms 27848 KB Output is correct
6 Correct 44 ms 29084 KB Output is correct
7 Correct 57 ms 30164 KB Output is correct
8 Correct 0 ms 340 KB Output is correct
9 Correct 0 ms 340 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 0 ms 340 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 ms 340 KB Output is correct
15 Correct 0 ms 340 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 1 ms 596 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 176 ms 29088 KB Output is correct
21 Correct 163 ms 30260 KB Output is correct
22 Correct 165 ms 30264 KB Output is correct
23 Correct 137 ms 28172 KB Output is correct
24 Correct 133 ms 27872 KB Output is correct
25 Correct 154 ms 27844 KB Output is correct
26 Correct 176 ms 30296 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 1 ms 340 KB Output is correct
29 Correct 0 ms 340 KB Output is correct
30 Correct 0 ms 340 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 0 ms 340 KB Output is correct
34 Correct 0 ms 340 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 0 ms 340 KB Output is correct
38 Correct 0 ms 340 KB Output is correct
39 Correct 0 ms 340 KB Output is correct
40 Correct 0 ms 340 KB Output is correct
41 Correct 0 ms 340 KB Output is correct
42 Correct 0 ms 340 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 1 ms 340 KB Output is correct
45 Correct 1 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 50 ms 27844 KB Output is correct
3 Correct 48 ms 27896 KB Output is correct
4 Correct 38 ms 27888 KB Output is correct
5 Correct 51 ms 27848 KB Output is correct
6 Correct 44 ms 29084 KB Output is correct
7 Correct 57 ms 30164 KB Output is correct
8 Correct 0 ms 340 KB Output is correct
9 Correct 0 ms 340 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 0 ms 340 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 ms 340 KB Output is correct
15 Correct 0 ms 340 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 1 ms 596 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 176 ms 29088 KB Output is correct
21 Correct 163 ms 30260 KB Output is correct
22 Correct 165 ms 30264 KB Output is correct
23 Correct 137 ms 28172 KB Output is correct
24 Correct 133 ms 27872 KB Output is correct
25 Correct 154 ms 27844 KB Output is correct
26 Correct 176 ms 30296 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 1 ms 340 KB Output is correct
29 Correct 0 ms 340 KB Output is correct
30 Correct 0 ms 340 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 0 ms 340 KB Output is correct
34 Correct 0 ms 340 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 0 ms 340 KB Output is correct
38 Correct 0 ms 340 KB Output is correct
39 Correct 0 ms 340 KB Output is correct
40 Correct 0 ms 340 KB Output is correct
41 Correct 0 ms 340 KB Output is correct
42 Correct 0 ms 340 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 1 ms 340 KB Output is correct
45 Correct 1 ms 340 KB Output is correct
46 Correct 1 ms 340 KB Output is correct
47 Correct 237 ms 29444 KB Output is correct
48 Correct 231 ms 30476 KB Output is correct
49 Correct 223 ms 30432 KB Output is correct
50 Correct 184 ms 28540 KB Output is correct
51 Correct 190 ms 28224 KB Output is correct
52 Correct 206 ms 28276 KB Output is correct
53 Correct 241 ms 30840 KB Output is correct
54 Correct 3 ms 724 KB Output is correct
55 Correct 3 ms 724 KB Output is correct
56 Correct 3 ms 724 KB Output is correct
57 Correct 4 ms 724 KB Output is correct
58 Correct 4 ms 752 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 50 ms 27844 KB Output is correct
3 Correct 48 ms 27896 KB Output is correct
4 Correct 38 ms 27888 KB Output is correct
5 Correct 51 ms 27848 KB Output is correct
6 Correct 44 ms 29084 KB Output is correct
7 Correct 57 ms 30164 KB Output is correct
8 Correct 0 ms 340 KB Output is correct
9 Correct 0 ms 340 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 0 ms 340 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 ms 340 KB Output is correct
15 Correct 0 ms 340 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 1 ms 596 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 176 ms 29088 KB Output is correct
21 Correct 163 ms 30260 KB Output is correct
22 Correct 165 ms 30264 KB Output is correct
23 Correct 137 ms 28172 KB Output is correct
24 Correct 133 ms 27872 KB Output is correct
25 Correct 154 ms 27844 KB Output is correct
26 Correct 176 ms 30296 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 1 ms 340 KB Output is correct
29 Correct 0 ms 340 KB Output is correct
30 Correct 0 ms 340 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 0 ms 340 KB Output is correct
34 Correct 0 ms 340 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 0 ms 340 KB Output is correct
38 Correct 0 ms 340 KB Output is correct
39 Correct 0 ms 340 KB Output is correct
40 Correct 0 ms 340 KB Output is correct
41 Correct 0 ms 340 KB Output is correct
42 Correct 0 ms 340 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 1 ms 340 KB Output is correct
45 Correct 1 ms 340 KB Output is correct
46 Correct 1 ms 340 KB Output is correct
47 Correct 237 ms 29444 KB Output is correct
48 Correct 231 ms 30476 KB Output is correct
49 Correct 223 ms 30432 KB Output is correct
50 Correct 184 ms 28540 KB Output is correct
51 Correct 190 ms 28224 KB Output is correct
52 Correct 206 ms 28276 KB Output is correct
53 Correct 241 ms 30840 KB Output is correct
54 Correct 3 ms 724 KB Output is correct
55 Correct 3 ms 724 KB Output is correct
56 Correct 3 ms 724 KB Output is correct
57 Correct 4 ms 724 KB Output is correct
58 Correct 4 ms 752 KB Output is correct
59 Correct 238 ms 29668 KB Output is correct
60 Correct 133 ms 14548 KB Output is correct
61 Correct 144 ms 15292 KB Output is correct
62 Correct 144 ms 15616 KB Output is correct
63 Correct 276 ms 30568 KB Output is correct
64 Correct 315 ms 33272 KB Output is correct
65 Correct 307 ms 33328 KB Output is correct
66 Correct 238 ms 31376 KB Output is correct
67 Correct 231 ms 30948 KB Output is correct
68 Correct 263 ms 30936 KB Output is correct
69 Correct 312 ms 33592 KB Output is correct
70 Correct 25 ms 3412 KB Output is correct
71 Correct 28 ms 3412 KB Output is correct
72 Correct 26 ms 3412 KB Output is correct
73 Correct 29 ms 3412 KB Output is correct
74 Correct 33 ms 3436 KB Output is correct
75 Correct 36 ms 3740 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 0 ms 340 KB Output is correct
4 Correct 0 ms 340 KB Output is correct
5 Correct 220 ms 24952 KB Output is correct
6 Correct 214 ms 24968 KB Output is correct
7 Correct 238 ms 24916 KB Output is correct
8 Correct 250 ms 24948 KB Output is correct
9 Correct 225 ms 24980 KB Output is correct
10 Correct 259 ms 24916 KB Output is correct
11 Correct 320 ms 25076 KB Output is correct
12 Correct 321 ms 24980 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 0 ms 340 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 0 ms 340 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 0 ms 340 KB Output is correct
21 Correct 0 ms 268 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 0 ms 340 KB Output is correct
24 Correct 0 ms 340 KB Output is correct
25 Correct 0 ms 340 KB Output is correct
26 Correct 1 ms 340 KB Output is correct
27 Correct 0 ms 340 KB Output is correct
28 Correct 0 ms 340 KB Output is correct
29 Correct 0 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 1 ms 340 KB Output is correct
33 Correct 0 ms 340 KB Output is correct
34 Correct 0 ms 340 KB Output is correct
35 Correct 0 ms 340 KB Output is correct
36 Correct 0 ms 340 KB Output is correct
37 Correct 0 ms 340 KB Output is correct
38 Correct 0 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 3 ms 724 KB Output is correct
42 Correct 3 ms 724 KB Output is correct
43 Correct 3 ms 724 KB Output is correct
44 Correct 4 ms 724 KB Output is correct
45 Correct 4 ms 724 KB Output is correct
46 Correct 25 ms 3444 KB Output is correct
47 Correct 28 ms 3412 KB Output is correct
48 Correct 26 ms 3448 KB Output is correct
49 Correct 29 ms 3412 KB Output is correct
50 Correct 31 ms 3424 KB Output is correct
51 Correct 220 ms 25228 KB Output is correct
52 Correct 228 ms 25212 KB Output is correct
53 Correct 221 ms 25220 KB Output is correct
54 Correct 300 ms 25172 KB Output is correct
55 Correct 1 ms 596 KB Output is correct
56 Correct 38 ms 3728 KB Output is correct
57 Correct 0 ms 340 KB Output is correct
58 Correct 50 ms 27844 KB Output is correct
59 Correct 48 ms 27896 KB Output is correct
60 Correct 38 ms 27888 KB Output is correct
61 Correct 51 ms 27848 KB Output is correct
62 Correct 44 ms 29084 KB Output is correct
63 Correct 57 ms 30164 KB Output is correct
64 Correct 0 ms 340 KB Output is correct
65 Correct 0 ms 340 KB Output is correct
66 Correct 0 ms 340 KB Output is correct
67 Correct 0 ms 340 KB Output is correct
68 Correct 0 ms 340 KB Output is correct
69 Correct 0 ms 340 KB Output is correct
70 Correct 0 ms 340 KB Output is correct
71 Correct 0 ms 340 KB Output is correct
72 Correct 0 ms 340 KB Output is correct
73 Correct 1 ms 596 KB Output is correct
74 Correct 0 ms 340 KB Output is correct
75 Correct 1 ms 340 KB Output is correct
76 Correct 176 ms 29088 KB Output is correct
77 Correct 163 ms 30260 KB Output is correct
78 Correct 165 ms 30264 KB Output is correct
79 Correct 137 ms 28172 KB Output is correct
80 Correct 133 ms 27872 KB Output is correct
81 Correct 154 ms 27844 KB Output is correct
82 Correct 176 ms 30296 KB Output is correct
83 Correct 1 ms 340 KB Output is correct
84 Correct 1 ms 340 KB Output is correct
85 Correct 0 ms 340 KB Output is correct
86 Correct 0 ms 340 KB Output is correct
87 Correct 1 ms 340 KB Output is correct
88 Correct 0 ms 340 KB Output is correct
89 Correct 0 ms 340 KB Output is correct
90 Correct 0 ms 340 KB Output is correct
91 Correct 1 ms 340 KB Output is correct
92 Correct 1 ms 340 KB Output is correct
93 Correct 0 ms 340 KB Output is correct
94 Correct 0 ms 340 KB Output is correct
95 Correct 0 ms 340 KB Output is correct
96 Correct 0 ms 340 KB Output is correct
97 Correct 0 ms 340 KB Output is correct
98 Correct 0 ms 340 KB Output is correct
99 Correct 1 ms 340 KB Output is correct
100 Correct 1 ms 340 KB Output is correct
101 Correct 1 ms 340 KB Output is correct
102 Correct 1 ms 340 KB Output is correct
103 Correct 237 ms 29444 KB Output is correct
104 Correct 231 ms 30476 KB Output is correct
105 Correct 223 ms 30432 KB Output is correct
106 Correct 184 ms 28540 KB Output is correct
107 Correct 190 ms 28224 KB Output is correct
108 Correct 206 ms 28276 KB Output is correct
109 Correct 241 ms 30840 KB Output is correct
110 Correct 3 ms 724 KB Output is correct
111 Correct 3 ms 724 KB Output is correct
112 Correct 3 ms 724 KB Output is correct
113 Correct 4 ms 724 KB Output is correct
114 Correct 4 ms 752 KB Output is correct
115 Correct 238 ms 29668 KB Output is correct
116 Correct 133 ms 14548 KB Output is correct
117 Correct 144 ms 15292 KB Output is correct
118 Correct 144 ms 15616 KB Output is correct
119 Correct 276 ms 30568 KB Output is correct
120 Correct 315 ms 33272 KB Output is correct
121 Correct 307 ms 33328 KB Output is correct
122 Correct 238 ms 31376 KB Output is correct
123 Correct 231 ms 30948 KB Output is correct
124 Correct 263 ms 30936 KB Output is correct
125 Correct 312 ms 33592 KB Output is correct
126 Correct 25 ms 3412 KB Output is correct
127 Correct 28 ms 3412 KB Output is correct
128 Correct 26 ms 3412 KB Output is correct
129 Correct 29 ms 3412 KB Output is correct
130 Correct 33 ms 3436 KB Output is correct
131 Correct 36 ms 3740 KB Output is correct
132 Correct 554 ms 53916 KB Output is correct
133 Correct 541 ms 53764 KB Output is correct
134 Correct 533 ms 54012 KB Output is correct
135 Correct 615 ms 53880 KB Output is correct
136 Correct 592 ms 54008 KB Output is correct
137 Correct 435 ms 42624 KB Output is correct
138 Correct 445 ms 42820 KB Output is correct
139 Correct 466 ms 52840 KB Output is correct
140 Correct 466 ms 52460 KB Output is correct
141 Correct 499 ms 52424 KB Output is correct
142 Correct 631 ms 55176 KB Output is correct