#include <bits/stdc++.h>
using namespace std;
const int NM = 3e5, MM = 20;
int N, M, msk[NM+5], cnt[(1<<MM)+5], f[(1<<MM)+5], g[(1<<MM)+5];
int occ[MM+5];
void optimize(int i, int x){
if (x == f[i] || x == g[i]) return;
if (f[i] == -1 || __builtin_popcount(x&i) > __builtin_popcount(f[i]&i)){
f[i] = x;
}
else if (g[i] == -1 || __builtin_popcount(x&i) > __builtin_popcount(g[i]&i)){
g[i] = x;
}
}
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> N >> M;
for (int i = 1; i <= N; i++){
for (int j = 0; j < M; j++){
char ch; cin >> ch;
if (ch == '1'){
msk[i] += (1<<j);
occ[j]++;
}
}
cnt[msk[i]]++;
}
for (int i = 0; i < (1<<M); i++){
if (cnt[i] > 0) f[i] = i; else f[i] = -1;
g[i] = -1;
}
for (int j = 0; j < M; j++)
for (int i = (1<<M)-1; i >= 0; i--)
if ((i>>j)&1){
if (f[i] == -1){
f[i] = f[i-(1<<j)];
g[i] = g[i-(1<<j)];
}
else if (g[i] == -1){
g[i] = f[i-(1<<j)];
}
}
for (int i = 0; i < (1<<M); i++){
if (f[i] != -1) f[i] = (1<<M)-1-f[i];
if (g[i] != -1) g[i] = (1<<M)-1-g[i];
}
for (int i = 0; i < (1<<(M-1)); i++){
swap(f[i], f[(1<<M)-1-i]);
swap(g[i], g[(1<<M)-1-i]);
}
for (int j = 0; j < M; j++)
for (int i = (1<<M)-1; i >= 0; i--)
if ((i>>j)&1){
optimize(i, f[i-(1<<j)]);
optimize(i, g[i-(1<<j)]);
}
for (int i = 0; i < (1<<M); i++){
if (f[i] != -1) f[i] = (1<<M)-1-f[i];
if (g[i] != -1) g[i] = (1<<M)-1-g[i];
}
for (int i = 1; i <= N; i++){
int tmp = 0, res = 0;
for (int j = 0; j < M; j++)
if (occ[j]-((msk[i]>>j)&1) >= N/2){
res++;
if (occ[j]-((msk[i]>>j)&1) == N/2) tmp += (1<<j);
}
if (f[tmp] == msk[i] && cnt[msk[i]] == 1)
cout << res-__builtin_popcount(g[tmp]&tmp) << '\n';
else cout << res-__builtin_popcount(f[tmp]&tmp) << '\n';
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
90 ms |
8700 KB |
Output is correct |
6 |
Correct |
80 ms |
8536 KB |
Output is correct |
7 |
Correct |
104 ms |
8540 KB |
Output is correct |
8 |
Correct |
106 ms |
8736 KB |
Output is correct |
9 |
Correct |
159 ms |
9560 KB |
Output is correct |
10 |
Correct |
100 ms |
8536 KB |
Output is correct |
11 |
Correct |
128 ms |
8732 KB |
Output is correct |
12 |
Correct |
164 ms |
9560 KB |
Output is correct |
13 |
Correct |
1 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
344 KB |
Output is correct |
16 |
Correct |
1 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
344 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
344 KB |
Output is correct |
23 |
Correct |
1 ms |
348 KB |
Output is correct |
24 |
Correct |
1 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
344 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
468 KB |
Output is correct |
41 |
Correct |
1 ms |
604 KB |
Output is correct |
42 |
Correct |
1 ms |
604 KB |
Output is correct |
43 |
Correct |
3 ms |
604 KB |
Output is correct |
44 |
Correct |
2 ms |
604 KB |
Output is correct |
45 |
Correct |
2 ms |
460 KB |
Output is correct |
46 |
Correct |
12 ms |
1372 KB |
Output is correct |
47 |
Correct |
10 ms |
1372 KB |
Output is correct |
48 |
Correct |
12 ms |
1596 KB |
Output is correct |
49 |
Correct |
11 ms |
1372 KB |
Output is correct |
50 |
Correct |
12 ms |
1372 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
90 ms |
8700 KB |
Output is correct |
6 |
Correct |
80 ms |
8536 KB |
Output is correct |
7 |
Correct |
104 ms |
8540 KB |
Output is correct |
8 |
Correct |
106 ms |
8736 KB |
Output is correct |
9 |
Correct |
159 ms |
9560 KB |
Output is correct |
10 |
Correct |
100 ms |
8536 KB |
Output is correct |
11 |
Correct |
128 ms |
8732 KB |
Output is correct |
12 |
Correct |
164 ms |
9560 KB |
Output is correct |
13 |
Correct |
1 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
344 KB |
Output is correct |
16 |
Correct |
1 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
344 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
344 KB |
Output is correct |
23 |
Correct |
1 ms |
348 KB |
Output is correct |
24 |
Correct |
1 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
344 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
468 KB |
Output is correct |
41 |
Correct |
1 ms |
604 KB |
Output is correct |
42 |
Correct |
1 ms |
604 KB |
Output is correct |
43 |
Correct |
3 ms |
604 KB |
Output is correct |
44 |
Correct |
2 ms |
604 KB |
Output is correct |
45 |
Correct |
2 ms |
460 KB |
Output is correct |
46 |
Correct |
12 ms |
1372 KB |
Output is correct |
47 |
Correct |
10 ms |
1372 KB |
Output is correct |
48 |
Correct |
12 ms |
1596 KB |
Output is correct |
49 |
Correct |
11 ms |
1372 KB |
Output is correct |
50 |
Correct |
12 ms |
1372 KB |
Output is correct |
51 |
Correct |
80 ms |
8796 KB |
Output is correct |
52 |
Correct |
82 ms |
8792 KB |
Output is correct |
53 |
Correct |
201 ms |
12636 KB |
Output is correct |
54 |
Correct |
204 ms |
12636 KB |
Output is correct |
55 |
Correct |
1 ms |
348 KB |
Output is correct |
56 |
Correct |
24 ms |
2144 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
464 KB |
Output is correct |
2 |
Correct |
23 ms |
3368 KB |
Output is correct |
3 |
Correct |
23 ms |
2100 KB |
Output is correct |
4 |
Correct |
21 ms |
2656 KB |
Output is correct |
5 |
Correct |
27 ms |
3168 KB |
Output is correct |
6 |
Correct |
30 ms |
2772 KB |
Output is correct |
7 |
Correct |
26 ms |
3424 KB |
Output is correct |
8 |
Correct |
0 ms |
360 KB |
Output is correct |
9 |
Correct |
1 ms |
468 KB |
Output is correct |
10 |
Correct |
0 ms |
360 KB |
Output is correct |
11 |
Correct |
1 ms |
360 KB |
Output is correct |
12 |
Correct |
0 ms |
360 KB |
Output is correct |
13 |
Correct |
0 ms |
352 KB |
Output is correct |
14 |
Correct |
0 ms |
360 KB |
Output is correct |
15 |
Correct |
0 ms |
472 KB |
Output is correct |
16 |
Correct |
0 ms |
360 KB |
Output is correct |
17 |
Correct |
1 ms |
360 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
464 KB |
Output is correct |
2 |
Correct |
23 ms |
3368 KB |
Output is correct |
3 |
Correct |
23 ms |
2100 KB |
Output is correct |
4 |
Correct |
21 ms |
2656 KB |
Output is correct |
5 |
Correct |
27 ms |
3168 KB |
Output is correct |
6 |
Correct |
30 ms |
2772 KB |
Output is correct |
7 |
Correct |
26 ms |
3424 KB |
Output is correct |
8 |
Correct |
0 ms |
360 KB |
Output is correct |
9 |
Correct |
1 ms |
468 KB |
Output is correct |
10 |
Correct |
0 ms |
360 KB |
Output is correct |
11 |
Correct |
1 ms |
360 KB |
Output is correct |
12 |
Correct |
0 ms |
360 KB |
Output is correct |
13 |
Correct |
0 ms |
352 KB |
Output is correct |
14 |
Correct |
0 ms |
360 KB |
Output is correct |
15 |
Correct |
0 ms |
472 KB |
Output is correct |
16 |
Correct |
0 ms |
360 KB |
Output is correct |
17 |
Correct |
1 ms |
360 KB |
Output is correct |
18 |
Correct |
0 ms |
360 KB |
Output is correct |
19 |
Correct |
0 ms |
360 KB |
Output is correct |
20 |
Correct |
72 ms |
6672 KB |
Output is correct |
21 |
Correct |
78 ms |
6580 KB |
Output is correct |
22 |
Correct |
68 ms |
6496 KB |
Output is correct |
23 |
Correct |
51 ms |
7096 KB |
Output is correct |
24 |
Correct |
54 ms |
5456 KB |
Output is correct |
25 |
Correct |
68 ms |
6700 KB |
Output is correct |
26 |
Correct |
89 ms |
6804 KB |
Output is correct |
27 |
Correct |
1 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
460 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
344 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
1 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
464 KB |
Output is correct |
2 |
Correct |
23 ms |
3368 KB |
Output is correct |
3 |
Correct |
23 ms |
2100 KB |
Output is correct |
4 |
Correct |
21 ms |
2656 KB |
Output is correct |
5 |
Correct |
27 ms |
3168 KB |
Output is correct |
6 |
Correct |
30 ms |
2772 KB |
Output is correct |
7 |
Correct |
26 ms |
3424 KB |
Output is correct |
8 |
Correct |
0 ms |
360 KB |
Output is correct |
9 |
Correct |
1 ms |
468 KB |
Output is correct |
10 |
Correct |
0 ms |
360 KB |
Output is correct |
11 |
Correct |
1 ms |
360 KB |
Output is correct |
12 |
Correct |
0 ms |
360 KB |
Output is correct |
13 |
Correct |
0 ms |
352 KB |
Output is correct |
14 |
Correct |
0 ms |
360 KB |
Output is correct |
15 |
Correct |
0 ms |
472 KB |
Output is correct |
16 |
Correct |
0 ms |
360 KB |
Output is correct |
17 |
Correct |
1 ms |
360 KB |
Output is correct |
18 |
Correct |
0 ms |
360 KB |
Output is correct |
19 |
Correct |
0 ms |
360 KB |
Output is correct |
20 |
Correct |
72 ms |
6672 KB |
Output is correct |
21 |
Correct |
78 ms |
6580 KB |
Output is correct |
22 |
Correct |
68 ms |
6496 KB |
Output is correct |
23 |
Correct |
51 ms |
7096 KB |
Output is correct |
24 |
Correct |
54 ms |
5456 KB |
Output is correct |
25 |
Correct |
68 ms |
6700 KB |
Output is correct |
26 |
Correct |
89 ms |
6804 KB |
Output is correct |
27 |
Correct |
1 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
460 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
344 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
1 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
348 KB |
Output is correct |
46 |
Correct |
1 ms |
348 KB |
Output is correct |
47 |
Correct |
103 ms |
8860 KB |
Output is correct |
48 |
Correct |
95 ms |
8272 KB |
Output is correct |
49 |
Correct |
96 ms |
8584 KB |
Output is correct |
50 |
Correct |
67 ms |
9268 KB |
Output is correct |
51 |
Correct |
58 ms |
7804 KB |
Output is correct |
52 |
Correct |
92 ms |
8896 KB |
Output is correct |
53 |
Correct |
99 ms |
9212 KB |
Output is correct |
54 |
Correct |
2 ms |
604 KB |
Output is correct |
55 |
Correct |
2 ms |
632 KB |
Output is correct |
56 |
Correct |
2 ms |
604 KB |
Output is correct |
57 |
Correct |
1 ms |
604 KB |
Output is correct |
58 |
Correct |
2 ms |
604 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
464 KB |
Output is correct |
2 |
Correct |
23 ms |
3368 KB |
Output is correct |
3 |
Correct |
23 ms |
2100 KB |
Output is correct |
4 |
Correct |
21 ms |
2656 KB |
Output is correct |
5 |
Correct |
27 ms |
3168 KB |
Output is correct |
6 |
Correct |
30 ms |
2772 KB |
Output is correct |
7 |
Correct |
26 ms |
3424 KB |
Output is correct |
8 |
Correct |
0 ms |
360 KB |
Output is correct |
9 |
Correct |
1 ms |
468 KB |
Output is correct |
10 |
Correct |
0 ms |
360 KB |
Output is correct |
11 |
Correct |
1 ms |
360 KB |
Output is correct |
12 |
Correct |
0 ms |
360 KB |
Output is correct |
13 |
Correct |
0 ms |
352 KB |
Output is correct |
14 |
Correct |
0 ms |
360 KB |
Output is correct |
15 |
Correct |
0 ms |
472 KB |
Output is correct |
16 |
Correct |
0 ms |
360 KB |
Output is correct |
17 |
Correct |
1 ms |
360 KB |
Output is correct |
18 |
Correct |
0 ms |
360 KB |
Output is correct |
19 |
Correct |
0 ms |
360 KB |
Output is correct |
20 |
Correct |
72 ms |
6672 KB |
Output is correct |
21 |
Correct |
78 ms |
6580 KB |
Output is correct |
22 |
Correct |
68 ms |
6496 KB |
Output is correct |
23 |
Correct |
51 ms |
7096 KB |
Output is correct |
24 |
Correct |
54 ms |
5456 KB |
Output is correct |
25 |
Correct |
68 ms |
6700 KB |
Output is correct |
26 |
Correct |
89 ms |
6804 KB |
Output is correct |
27 |
Correct |
1 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
460 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
344 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
1 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
348 KB |
Output is correct |
46 |
Correct |
1 ms |
348 KB |
Output is correct |
47 |
Correct |
103 ms |
8860 KB |
Output is correct |
48 |
Correct |
95 ms |
8272 KB |
Output is correct |
49 |
Correct |
96 ms |
8584 KB |
Output is correct |
50 |
Correct |
67 ms |
9268 KB |
Output is correct |
51 |
Correct |
58 ms |
7804 KB |
Output is correct |
52 |
Correct |
92 ms |
8896 KB |
Output is correct |
53 |
Correct |
99 ms |
9212 KB |
Output is correct |
54 |
Correct |
2 ms |
604 KB |
Output is correct |
55 |
Correct |
2 ms |
632 KB |
Output is correct |
56 |
Correct |
2 ms |
604 KB |
Output is correct |
57 |
Correct |
1 ms |
604 KB |
Output is correct |
58 |
Correct |
2 ms |
604 KB |
Output is correct |
59 |
Correct |
106 ms |
10528 KB |
Output is correct |
60 |
Correct |
62 ms |
5716 KB |
Output is correct |
61 |
Correct |
93 ms |
6080 KB |
Output is correct |
62 |
Correct |
72 ms |
6228 KB |
Output is correct |
63 |
Correct |
117 ms |
10228 KB |
Output is correct |
64 |
Correct |
155 ms |
11348 KB |
Output is correct |
65 |
Correct |
143 ms |
11380 KB |
Output is correct |
66 |
Correct |
89 ms |
11092 KB |
Output is correct |
67 |
Correct |
79 ms |
9760 KB |
Output is correct |
68 |
Correct |
136 ms |
11216 KB |
Output is correct |
69 |
Correct |
131 ms |
11720 KB |
Output is correct |
70 |
Correct |
10 ms |
1372 KB |
Output is correct |
71 |
Correct |
11 ms |
1492 KB |
Output is correct |
72 |
Correct |
13 ms |
1592 KB |
Output is correct |
73 |
Correct |
14 ms |
1368 KB |
Output is correct |
74 |
Correct |
13 ms |
1372 KB |
Output is correct |
75 |
Correct |
31 ms |
2016 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
90 ms |
8700 KB |
Output is correct |
6 |
Correct |
80 ms |
8536 KB |
Output is correct |
7 |
Correct |
104 ms |
8540 KB |
Output is correct |
8 |
Correct |
106 ms |
8736 KB |
Output is correct |
9 |
Correct |
159 ms |
9560 KB |
Output is correct |
10 |
Correct |
100 ms |
8536 KB |
Output is correct |
11 |
Correct |
128 ms |
8732 KB |
Output is correct |
12 |
Correct |
164 ms |
9560 KB |
Output is correct |
13 |
Correct |
1 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
344 KB |
Output is correct |
16 |
Correct |
1 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
344 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
344 KB |
Output is correct |
23 |
Correct |
1 ms |
348 KB |
Output is correct |
24 |
Correct |
1 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
344 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
468 KB |
Output is correct |
41 |
Correct |
1 ms |
604 KB |
Output is correct |
42 |
Correct |
1 ms |
604 KB |
Output is correct |
43 |
Correct |
3 ms |
604 KB |
Output is correct |
44 |
Correct |
2 ms |
604 KB |
Output is correct |
45 |
Correct |
2 ms |
460 KB |
Output is correct |
46 |
Correct |
12 ms |
1372 KB |
Output is correct |
47 |
Correct |
10 ms |
1372 KB |
Output is correct |
48 |
Correct |
12 ms |
1596 KB |
Output is correct |
49 |
Correct |
11 ms |
1372 KB |
Output is correct |
50 |
Correct |
12 ms |
1372 KB |
Output is correct |
51 |
Correct |
80 ms |
8796 KB |
Output is correct |
52 |
Correct |
82 ms |
8792 KB |
Output is correct |
53 |
Correct |
201 ms |
12636 KB |
Output is correct |
54 |
Correct |
204 ms |
12636 KB |
Output is correct |
55 |
Correct |
1 ms |
348 KB |
Output is correct |
56 |
Correct |
24 ms |
2144 KB |
Output is correct |
57 |
Correct |
0 ms |
464 KB |
Output is correct |
58 |
Correct |
23 ms |
3368 KB |
Output is correct |
59 |
Correct |
23 ms |
2100 KB |
Output is correct |
60 |
Correct |
21 ms |
2656 KB |
Output is correct |
61 |
Correct |
27 ms |
3168 KB |
Output is correct |
62 |
Correct |
30 ms |
2772 KB |
Output is correct |
63 |
Correct |
26 ms |
3424 KB |
Output is correct |
64 |
Correct |
0 ms |
360 KB |
Output is correct |
65 |
Correct |
1 ms |
468 KB |
Output is correct |
66 |
Correct |
0 ms |
360 KB |
Output is correct |
67 |
Correct |
1 ms |
360 KB |
Output is correct |
68 |
Correct |
0 ms |
360 KB |
Output is correct |
69 |
Correct |
0 ms |
352 KB |
Output is correct |
70 |
Correct |
0 ms |
360 KB |
Output is correct |
71 |
Correct |
0 ms |
472 KB |
Output is correct |
72 |
Correct |
0 ms |
360 KB |
Output is correct |
73 |
Correct |
1 ms |
360 KB |
Output is correct |
74 |
Correct |
0 ms |
360 KB |
Output is correct |
75 |
Correct |
0 ms |
360 KB |
Output is correct |
76 |
Correct |
72 ms |
6672 KB |
Output is correct |
77 |
Correct |
78 ms |
6580 KB |
Output is correct |
78 |
Correct |
68 ms |
6496 KB |
Output is correct |
79 |
Correct |
51 ms |
7096 KB |
Output is correct |
80 |
Correct |
54 ms |
5456 KB |
Output is correct |
81 |
Correct |
68 ms |
6700 KB |
Output is correct |
82 |
Correct |
89 ms |
6804 KB |
Output is correct |
83 |
Correct |
1 ms |
348 KB |
Output is correct |
84 |
Correct |
0 ms |
348 KB |
Output is correct |
85 |
Correct |
0 ms |
460 KB |
Output is correct |
86 |
Correct |
1 ms |
348 KB |
Output is correct |
87 |
Correct |
1 ms |
348 KB |
Output is correct |
88 |
Correct |
0 ms |
348 KB |
Output is correct |
89 |
Correct |
0 ms |
348 KB |
Output is correct |
90 |
Correct |
0 ms |
348 KB |
Output is correct |
91 |
Correct |
1 ms |
348 KB |
Output is correct |
92 |
Correct |
0 ms |
348 KB |
Output is correct |
93 |
Correct |
1 ms |
344 KB |
Output is correct |
94 |
Correct |
0 ms |
348 KB |
Output is correct |
95 |
Correct |
0 ms |
348 KB |
Output is correct |
96 |
Correct |
0 ms |
348 KB |
Output is correct |
97 |
Correct |
0 ms |
348 KB |
Output is correct |
98 |
Correct |
1 ms |
348 KB |
Output is correct |
99 |
Correct |
0 ms |
348 KB |
Output is correct |
100 |
Correct |
1 ms |
348 KB |
Output is correct |
101 |
Correct |
1 ms |
348 KB |
Output is correct |
102 |
Correct |
1 ms |
348 KB |
Output is correct |
103 |
Correct |
103 ms |
8860 KB |
Output is correct |
104 |
Correct |
95 ms |
8272 KB |
Output is correct |
105 |
Correct |
96 ms |
8584 KB |
Output is correct |
106 |
Correct |
67 ms |
9268 KB |
Output is correct |
107 |
Correct |
58 ms |
7804 KB |
Output is correct |
108 |
Correct |
92 ms |
8896 KB |
Output is correct |
109 |
Correct |
99 ms |
9212 KB |
Output is correct |
110 |
Correct |
2 ms |
604 KB |
Output is correct |
111 |
Correct |
2 ms |
632 KB |
Output is correct |
112 |
Correct |
2 ms |
604 KB |
Output is correct |
113 |
Correct |
1 ms |
604 KB |
Output is correct |
114 |
Correct |
2 ms |
604 KB |
Output is correct |
115 |
Correct |
106 ms |
10528 KB |
Output is correct |
116 |
Correct |
62 ms |
5716 KB |
Output is correct |
117 |
Correct |
93 ms |
6080 KB |
Output is correct |
118 |
Correct |
72 ms |
6228 KB |
Output is correct |
119 |
Correct |
117 ms |
10228 KB |
Output is correct |
120 |
Correct |
155 ms |
11348 KB |
Output is correct |
121 |
Correct |
143 ms |
11380 KB |
Output is correct |
122 |
Correct |
89 ms |
11092 KB |
Output is correct |
123 |
Correct |
79 ms |
9760 KB |
Output is correct |
124 |
Correct |
136 ms |
11216 KB |
Output is correct |
125 |
Correct |
131 ms |
11720 KB |
Output is correct |
126 |
Correct |
10 ms |
1372 KB |
Output is correct |
127 |
Correct |
11 ms |
1492 KB |
Output is correct |
128 |
Correct |
13 ms |
1592 KB |
Output is correct |
129 |
Correct |
14 ms |
1368 KB |
Output is correct |
130 |
Correct |
13 ms |
1372 KB |
Output is correct |
131 |
Correct |
31 ms |
2016 KB |
Output is correct |
132 |
Correct |
290 ms |
24044 KB |
Output is correct |
133 |
Correct |
341 ms |
25244 KB |
Output is correct |
134 |
Correct |
304 ms |
25448 KB |
Output is correct |
135 |
Correct |
329 ms |
25424 KB |
Output is correct |
136 |
Correct |
324 ms |
25424 KB |
Output is correct |
137 |
Correct |
221 ms |
18768 KB |
Output is correct |
138 |
Correct |
237 ms |
18908 KB |
Output is correct |
139 |
Correct |
167 ms |
21332 KB |
Output is correct |
140 |
Correct |
161 ms |
19792 KB |
Output is correct |
141 |
Correct |
328 ms |
25168 KB |
Output is correct |
142 |
Correct |
352 ms |
25444 KB |
Output is correct |