답안 #810941

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
810941 2023-08-06T17:49:07 Z lukameladze Council (JOI23_council) C++17
100 / 100
672 ms 38724 KB
# include <bits/stdc++.h>
using namespace std;
#define f first
#define s second
#define ll  long long
//#define int long long
#define pii pair <int, int>
#define pb push_back
const int N = 2e6 + 5, inf = 1e9;
int n, m, a[N], cnt[N], raod[N];
pii idx[N], dp[N][2];
void upd(int idx, int vl) {
    if (!vl) return ;
    int res = __builtin_popcount(idx & a[vl]);
    if (res < dp[idx][0].f) {
        dp[idx][1] = dp[idx][0];
        dp[idx][0] = {res, vl};   
    } else if (res < dp[idx][1].f && vl != dp[idx][0].s) {
        dp[idx][1] = {res, vl};
    }
}
signed main() {
    cin>>n>>m;
    for (int i = 1; i <= n; i++) {
        for (int j = 0; j < m; j++) {
            char ch; cin>>ch;
            if (ch == '1') a[i] |= (1<<j),cnt[j]++;
        }
    }
    for (int i = 1; i <= n; i++) {
        int op = a[i] ^ ((1<<m) - 1);
        int ff = 0;
        if (!idx[op].f) idx[op].f = i;
        else idx[op].s = i;
    }
	
    for (int i = (1<<m) - 1; i >= 0; i--) {
        if (idx[i].f && idx[i].s) continue;
        for (int j = 0; j < m; j++) {
            if ((1<<j)&i) continue;
            if (!idx[i].f) {
                if (idx[i ^ (1<<j)].f) idx[i].f = idx[i ^ (1<<j)].f;
            }   
            if (!idx[i].s) {
                if (idx[i ^ (1<<j)].f && idx[i ^ (1<<j)].f != idx[i].f) {
                    idx[i].s = idx[i ^ (1<<j)].f;
                }
                if (idx[i ^ (1<<j)].s && idx[i ^ (1<<j)].s != idx[i].f) {
                    idx[i].s = idx[i ^ (1<<j)].s;
                }
            }
        }
    }
    for (int i = 0; i < (1<<m); i++) {
        dp[i][0] = dp[i][1] = {inf, 0};
        if (idx[i].f) upd(i, idx[i].f); if (idx[i].s) upd(i, idx[i].s); // tu 0 aqvs saerto
        for (int j = 0; j < m; j++) {
            if ((1<<j)&i) { // tu me-j aqvs saerto
                upd(i, dp[i ^ (1<<j)][0].s);
                upd(i, dp[i ^ (1<<j)][1].s);
            }
        }
    }
    for (int i = 1; i <= n; i++) {
        int res = 0, mask = 0;
        for (int j = 0; j < m; j++) {
            if ((1<<j)&a[i]) cnt[j]--;
            if (cnt[j] == n / 2) mask |= (1<<j);//, cout<<j<<" ";
            if (cnt[j] >= n / 2) res++;
            if ((1<<j)&a[i]) cnt[j]++;
        }
        //cout<<res<<"\n";
        if (dp[mask][0].s != i) cout<<res - dp[mask][0].f<<"\n";
        else cout<<res - dp[mask][1].f<<"\n";
    }
}

Compilation message

council.cpp: In function 'int main()':
council.cpp:32:13: warning: unused variable 'ff' [-Wunused-variable]
   32 |         int ff = 0;
      |             ^~
council.cpp:56:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   56 |         if (idx[i].f) upd(i, idx[i].f); if (idx[i].s) upd(i, idx[i].s); // tu 0 aqvs saerto
      |         ^~
council.cpp:56:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   56 |         if (idx[i].f) upd(i, idx[i].f); if (idx[i].s) upd(i, idx[i].s); // tu 0 aqvs saerto
      |                                         ^~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 308 KB Output is correct
3 Correct 0 ms 304 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 243 ms 20816 KB Output is correct
6 Correct 240 ms 16716 KB Output is correct
7 Correct 252 ms 19464 KB Output is correct
8 Correct 267 ms 19788 KB Output is correct
9 Correct 274 ms 24476 KB Output is correct
10 Correct 255 ms 18764 KB Output is correct
11 Correct 275 ms 21020 KB Output is correct
12 Correct 275 ms 24540 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 0 ms 308 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 0 ms 304 KB Output is correct
26 Correct 0 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 1 ms 308 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 312 KB Output is correct
32 Correct 1 ms 340 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 0 ms 300 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 0 ms 340 KB Output is correct
37 Correct 1 ms 340 KB Output is correct
38 Correct 1 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 596 KB Output is correct
42 Correct 4 ms 596 KB Output is correct
43 Correct 4 ms 724 KB Output is correct
44 Correct 4 ms 696 KB Output is correct
45 Correct 4 ms 692 KB Output is correct
46 Correct 27 ms 2832 KB Output is correct
47 Correct 29 ms 2756 KB Output is correct
48 Correct 31 ms 2968 KB Output is correct
49 Correct 28 ms 2732 KB Output is correct
50 Correct 30 ms 3320 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 308 KB Output is correct
3 Correct 0 ms 304 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 243 ms 20816 KB Output is correct
6 Correct 240 ms 16716 KB Output is correct
7 Correct 252 ms 19464 KB Output is correct
8 Correct 267 ms 19788 KB Output is correct
9 Correct 274 ms 24476 KB Output is correct
10 Correct 255 ms 18764 KB Output is correct
11 Correct 275 ms 21020 KB Output is correct
12 Correct 275 ms 24540 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 0 ms 308 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 0 ms 304 KB Output is correct
26 Correct 0 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 1 ms 308 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 312 KB Output is correct
32 Correct 1 ms 340 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 0 ms 300 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 0 ms 340 KB Output is correct
37 Correct 1 ms 340 KB Output is correct
38 Correct 1 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 596 KB Output is correct
42 Correct 4 ms 596 KB Output is correct
43 Correct 4 ms 724 KB Output is correct
44 Correct 4 ms 696 KB Output is correct
45 Correct 4 ms 692 KB Output is correct
46 Correct 27 ms 2832 KB Output is correct
47 Correct 29 ms 2756 KB Output is correct
48 Correct 31 ms 2968 KB Output is correct
49 Correct 28 ms 2732 KB Output is correct
50 Correct 30 ms 3320 KB Output is correct
51 Correct 241 ms 16884 KB Output is correct
52 Correct 249 ms 25008 KB Output is correct
53 Correct 249 ms 25008 KB Output is correct
54 Correct 262 ms 25032 KB Output is correct
55 Correct 1 ms 340 KB Output is correct
56 Correct 32 ms 3404 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 280 KB Output is correct
2 Correct 46 ms 3164 KB Output is correct
3 Correct 44 ms 1944 KB Output is correct
4 Correct 34 ms 2652 KB Output is correct
5 Correct 51 ms 3148 KB Output is correct
6 Correct 34 ms 2676 KB Output is correct
7 Correct 51 ms 3192 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 308 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 280 KB Output is correct
2 Correct 46 ms 3164 KB Output is correct
3 Correct 44 ms 1944 KB Output is correct
4 Correct 34 ms 2652 KB Output is correct
5 Correct 51 ms 3148 KB Output is correct
6 Correct 34 ms 2676 KB Output is correct
7 Correct 51 ms 3192 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 308 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 186 ms 7928 KB Output is correct
21 Correct 180 ms 7348 KB Output is correct
22 Correct 168 ms 7352 KB Output is correct
23 Correct 153 ms 8204 KB Output is correct
24 Correct 163 ms 6812 KB Output is correct
25 Correct 188 ms 7884 KB Output is correct
26 Correct 188 ms 7884 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 0 ms 212 KB Output is correct
29 Correct 0 ms 212 KB Output is correct
30 Correct 0 ms 212 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 1 ms 304 KB Output is correct
35 Correct 1 ms 304 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 0 ms 340 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 0 ms 212 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 0 ms 340 KB Output is correct
42 Correct 1 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 280 KB Output is correct
2 Correct 46 ms 3164 KB Output is correct
3 Correct 44 ms 1944 KB Output is correct
4 Correct 34 ms 2652 KB Output is correct
5 Correct 51 ms 3148 KB Output is correct
6 Correct 34 ms 2676 KB Output is correct
7 Correct 51 ms 3192 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 308 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 186 ms 7928 KB Output is correct
21 Correct 180 ms 7348 KB Output is correct
22 Correct 168 ms 7352 KB Output is correct
23 Correct 153 ms 8204 KB Output is correct
24 Correct 163 ms 6812 KB Output is correct
25 Correct 188 ms 7884 KB Output is correct
26 Correct 188 ms 7884 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 0 ms 212 KB Output is correct
29 Correct 0 ms 212 KB Output is correct
30 Correct 0 ms 212 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 1 ms 304 KB Output is correct
35 Correct 1 ms 304 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 0 ms 340 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 0 ms 212 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 0 ms 340 KB Output is correct
42 Correct 1 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 258 ms 10708 KB Output is correct
48 Correct 243 ms 9864 KB Output is correct
49 Correct 236 ms 9860 KB Output is correct
50 Correct 217 ms 10852 KB Output is correct
51 Correct 213 ms 9480 KB Output is correct
52 Correct 261 ms 10792 KB Output is correct
53 Correct 259 ms 10928 KB Output is correct
54 Correct 4 ms 596 KB Output is correct
55 Correct 4 ms 564 KB Output is correct
56 Correct 4 ms 724 KB Output is correct
57 Correct 4 ms 596 KB Output is correct
58 Correct 4 ms 596 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 280 KB Output is correct
2 Correct 46 ms 3164 KB Output is correct
3 Correct 44 ms 1944 KB Output is correct
4 Correct 34 ms 2652 KB Output is correct
5 Correct 51 ms 3148 KB Output is correct
6 Correct 34 ms 2676 KB Output is correct
7 Correct 51 ms 3192 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 308 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 186 ms 7928 KB Output is correct
21 Correct 180 ms 7348 KB Output is correct
22 Correct 168 ms 7352 KB Output is correct
23 Correct 153 ms 8204 KB Output is correct
24 Correct 163 ms 6812 KB Output is correct
25 Correct 188 ms 7884 KB Output is correct
26 Correct 188 ms 7884 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 0 ms 212 KB Output is correct
29 Correct 0 ms 212 KB Output is correct
30 Correct 0 ms 212 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 1 ms 304 KB Output is correct
35 Correct 1 ms 304 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 0 ms 340 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 0 ms 212 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 0 ms 340 KB Output is correct
42 Correct 1 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 258 ms 10708 KB Output is correct
48 Correct 243 ms 9864 KB Output is correct
49 Correct 236 ms 9860 KB Output is correct
50 Correct 217 ms 10852 KB Output is correct
51 Correct 213 ms 9480 KB Output is correct
52 Correct 261 ms 10792 KB Output is correct
53 Correct 259 ms 10928 KB Output is correct
54 Correct 4 ms 596 KB Output is correct
55 Correct 4 ms 564 KB Output is correct
56 Correct 4 ms 724 KB Output is correct
57 Correct 4 ms 596 KB Output is correct
58 Correct 4 ms 596 KB Output is correct
59 Correct 306 ms 13180 KB Output is correct
60 Correct 148 ms 7912 KB Output is correct
61 Correct 153 ms 8268 KB Output is correct
62 Correct 170 ms 8612 KB Output is correct
63 Correct 295 ms 12920 KB Output is correct
64 Correct 332 ms 15180 KB Output is correct
65 Correct 327 ms 15032 KB Output is correct
66 Correct 276 ms 14396 KB Output is correct
67 Correct 282 ms 13832 KB Output is correct
68 Correct 344 ms 15004 KB Output is correct
69 Correct 341 ms 15540 KB Output is correct
70 Correct 27 ms 2764 KB Output is correct
71 Correct 28 ms 2764 KB Output is correct
72 Correct 31 ms 3000 KB Output is correct
73 Correct 29 ms 2696 KB Output is correct
74 Correct 30 ms 3352 KB Output is correct
75 Correct 32 ms 3484 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 308 KB Output is correct
3 Correct 0 ms 304 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 243 ms 20816 KB Output is correct
6 Correct 240 ms 16716 KB Output is correct
7 Correct 252 ms 19464 KB Output is correct
8 Correct 267 ms 19788 KB Output is correct
9 Correct 274 ms 24476 KB Output is correct
10 Correct 255 ms 18764 KB Output is correct
11 Correct 275 ms 21020 KB Output is correct
12 Correct 275 ms 24540 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 0 ms 308 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 0 ms 304 KB Output is correct
26 Correct 0 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 1 ms 308 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 312 KB Output is correct
32 Correct 1 ms 340 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 0 ms 300 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 0 ms 340 KB Output is correct
37 Correct 1 ms 340 KB Output is correct
38 Correct 1 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 596 KB Output is correct
42 Correct 4 ms 596 KB Output is correct
43 Correct 4 ms 724 KB Output is correct
44 Correct 4 ms 696 KB Output is correct
45 Correct 4 ms 692 KB Output is correct
46 Correct 27 ms 2832 KB Output is correct
47 Correct 29 ms 2756 KB Output is correct
48 Correct 31 ms 2968 KB Output is correct
49 Correct 28 ms 2732 KB Output is correct
50 Correct 30 ms 3320 KB Output is correct
51 Correct 241 ms 16884 KB Output is correct
52 Correct 249 ms 25008 KB Output is correct
53 Correct 249 ms 25008 KB Output is correct
54 Correct 262 ms 25032 KB Output is correct
55 Correct 1 ms 340 KB Output is correct
56 Correct 32 ms 3404 KB Output is correct
57 Correct 0 ms 280 KB Output is correct
58 Correct 46 ms 3164 KB Output is correct
59 Correct 44 ms 1944 KB Output is correct
60 Correct 34 ms 2652 KB Output is correct
61 Correct 51 ms 3148 KB Output is correct
62 Correct 34 ms 2676 KB Output is correct
63 Correct 51 ms 3192 KB Output is correct
64 Correct 1 ms 340 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
66 Correct 0 ms 212 KB Output is correct
67 Correct 1 ms 212 KB Output is correct
68 Correct 1 ms 212 KB Output is correct
69 Correct 0 ms 212 KB Output is correct
70 Correct 0 ms 212 KB Output is correct
71 Correct 0 ms 308 KB Output is correct
72 Correct 1 ms 212 KB Output is correct
73 Correct 1 ms 340 KB Output is correct
74 Correct 1 ms 340 KB Output is correct
75 Correct 0 ms 212 KB Output is correct
76 Correct 186 ms 7928 KB Output is correct
77 Correct 180 ms 7348 KB Output is correct
78 Correct 168 ms 7352 KB Output is correct
79 Correct 153 ms 8204 KB Output is correct
80 Correct 163 ms 6812 KB Output is correct
81 Correct 188 ms 7884 KB Output is correct
82 Correct 188 ms 7884 KB Output is correct
83 Correct 1 ms 340 KB Output is correct
84 Correct 0 ms 212 KB Output is correct
85 Correct 0 ms 212 KB Output is correct
86 Correct 0 ms 212 KB Output is correct
87 Correct 1 ms 340 KB Output is correct
88 Correct 1 ms 340 KB Output is correct
89 Correct 0 ms 340 KB Output is correct
90 Correct 1 ms 304 KB Output is correct
91 Correct 1 ms 304 KB Output is correct
92 Correct 1 ms 340 KB Output is correct
93 Correct 0 ms 340 KB Output is correct
94 Correct 1 ms 212 KB Output is correct
95 Correct 0 ms 212 KB Output is correct
96 Correct 1 ms 340 KB Output is correct
97 Correct 0 ms 340 KB Output is correct
98 Correct 1 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 258 ms 10708 KB Output is correct
104 Correct 243 ms 9864 KB Output is correct
105 Correct 236 ms 9860 KB Output is correct
106 Correct 217 ms 10852 KB Output is correct
107 Correct 213 ms 9480 KB Output is correct
108 Correct 261 ms 10792 KB Output is correct
109 Correct 259 ms 10928 KB Output is correct
110 Correct 4 ms 596 KB Output is correct
111 Correct 4 ms 564 KB Output is correct
112 Correct 4 ms 724 KB Output is correct
113 Correct 4 ms 596 KB Output is correct
114 Correct 4 ms 596 KB Output is correct
115 Correct 306 ms 13180 KB Output is correct
116 Correct 148 ms 7912 KB Output is correct
117 Correct 153 ms 8268 KB Output is correct
118 Correct 170 ms 8612 KB Output is correct
119 Correct 295 ms 12920 KB Output is correct
120 Correct 332 ms 15180 KB Output is correct
121 Correct 327 ms 15032 KB Output is correct
122 Correct 276 ms 14396 KB Output is correct
123 Correct 282 ms 13832 KB Output is correct
124 Correct 344 ms 15004 KB Output is correct
125 Correct 341 ms 15540 KB Output is correct
126 Correct 27 ms 2764 KB Output is correct
127 Correct 28 ms 2764 KB Output is correct
128 Correct 31 ms 3000 KB Output is correct
129 Correct 29 ms 2696 KB Output is correct
130 Correct 30 ms 3352 KB Output is correct
131 Correct 32 ms 3484 KB Output is correct
132 Correct 595 ms 38724 KB Output is correct
133 Correct 597 ms 38516 KB Output is correct
134 Correct 601 ms 38720 KB Output is correct
135 Correct 593 ms 38604 KB Output is correct
136 Correct 638 ms 38620 KB Output is correct
137 Correct 509 ms 25724 KB Output is correct
138 Correct 482 ms 25856 KB Output is correct
139 Correct 536 ms 30496 KB Output is correct
140 Correct 547 ms 37132 KB Output is correct
141 Correct 626 ms 38420 KB Output is correct
142 Correct 672 ms 38692 KB Output is correct