#include "bits/stdc++.h"
#define int long long
using namespace std;
int32_t main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, m;
cin >> n >> m;
int a[n][m];
int b[n];
int s[m];
for(int i=0; i<m; i++) s[i] = 0;
for(int i=0; i<n; i++) {
b[i] = 0;
for(int j=0; j<m; j++) {
cin >> a[i][j];
s[j] += a[i][j];
b[i] |= (a[i][j] << j);
}
}
int cnt[(1<<m)];
int ans[(1<<m)];
for(int i=0; i<(1<<m); i++) cnt[i] = 0, ans[i] = -1;
for(int i=0; i<n; i++) cnt[b[i]]++;
pair<int,int> dp[(1<<m)][2];
for(int i=0; i<(1<<m); i++) for(int j=0; j<2; j++) dp[i][j] = {1e9, -1};
for(int i=0; i<n; i++) {
if(dp[b[i]][0].first == 0) dp[b[i]][1] = {0, i};
else dp[b[i]][0] = {0, i};
}
for(int i=0; i<m; i++) {
for(int j=0; j<(1<<m); j++) {
if(j & (1<<i)) {
vector<pair<int,int> > w = {
dp[j^(1<<i)][0], dp[j^(1<<i)][1],
dp[j][0], dp[j][1]
};
sort(w.begin(),w.end());
dp[j][0] = w[0];
for(int k=1; k<4; k++) {
if(dp[j][0].second != w[k].second) {
dp[j][1] = w[k]; break;
}
}
}
}
}
reverse(dp, dp+(1<<m));
for(int j=m-1;j>=0;j--) {
for(int i = 1;i<(1<<m);i++) {
if(dp[i][1].first == 0) continue;
if(i&(1<<j)) {
int tar0=dp[i^(1<<j)][0].first+1, tar1=dp[i^(1<<j)][1].first+1;
vector<pair<int,int> > w = {
{tar0,dp[i^(1<<j)][0].second},
{tar1,dp[i^(1<<j)][1].second},
dp[i][0],dp[i][1]
};
sort(w.begin(), w.end());
dp[i][0] = w[0];
for(int k=1; k<4; k++) {
if(dp[i][0].second != w[k].second) {
dp[i][1] = w[k]; break;
}
}
}
}
}
for(int i=0; i<n; i++) {
int bad = 0, base = 0;
for(int j=0; j<m; j++) {
int ss = s[j] - a[i][j];
if(ss >= n/2) base++;
if(ss == n/2) bad |= (1<<j);
}
int opt = dp[bad][0].first;
if(dp[bad][0].second == i) opt = dp[bad][1].first;
cout << base - opt << '\n';
}
}
Compilation message
council.cpp: In function 'int32_t main()':
council.cpp:22:15: warning: variable 'ans' set but not used [-Wunused-but-set-variable]
22 | int ans[(1<<m)];
| ^~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
2 ms |
468 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
635 ms |
49552 KB |
Output is correct |
6 |
Correct |
815 ms |
49604 KB |
Output is correct |
7 |
Correct |
843 ms |
49544 KB |
Output is correct |
8 |
Correct |
852 ms |
49544 KB |
Output is correct |
9 |
Correct |
865 ms |
49600 KB |
Output is correct |
10 |
Correct |
816 ms |
49540 KB |
Output is correct |
11 |
Correct |
871 ms |
49548 KB |
Output is correct |
12 |
Correct |
887 ms |
49604 KB |
Output is correct |
13 |
Correct |
1 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
0 ms |
212 KB |
Output is correct |
16 |
Correct |
1 ms |
212 KB |
Output is correct |
17 |
Correct |
1 ms |
212 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
0 ms |
212 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
340 KB |
Output is correct |
23 |
Correct |
1 ms |
212 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
0 ms |
212 KB |
Output is correct |
26 |
Correct |
0 ms |
212 KB |
Output is correct |
27 |
Correct |
1 ms |
316 KB |
Output is correct |
28 |
Correct |
0 ms |
212 KB |
Output is correct |
29 |
Correct |
1 ms |
320 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
1 ms |
340 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
0 ms |
212 KB |
Output is correct |
37 |
Correct |
1 ms |
212 KB |
Output is correct |
38 |
Correct |
1 ms |
212 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
7 ms |
980 KB |
Output is correct |
42 |
Correct |
9 ms |
980 KB |
Output is correct |
43 |
Correct |
10 ms |
980 KB |
Output is correct |
44 |
Correct |
12 ms |
980 KB |
Output is correct |
45 |
Correct |
11 ms |
1088 KB |
Output is correct |
46 |
Correct |
70 ms |
6356 KB |
Output is correct |
47 |
Correct |
89 ms |
6464 KB |
Output is correct |
48 |
Correct |
89 ms |
6456 KB |
Output is correct |
49 |
Correct |
87 ms |
6452 KB |
Output is correct |
50 |
Correct |
92 ms |
6376 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
2 ms |
468 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
635 ms |
49552 KB |
Output is correct |
6 |
Correct |
815 ms |
49604 KB |
Output is correct |
7 |
Correct |
843 ms |
49544 KB |
Output is correct |
8 |
Correct |
852 ms |
49544 KB |
Output is correct |
9 |
Correct |
865 ms |
49600 KB |
Output is correct |
10 |
Correct |
816 ms |
49540 KB |
Output is correct |
11 |
Correct |
871 ms |
49548 KB |
Output is correct |
12 |
Correct |
887 ms |
49604 KB |
Output is correct |
13 |
Correct |
1 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
0 ms |
212 KB |
Output is correct |
16 |
Correct |
1 ms |
212 KB |
Output is correct |
17 |
Correct |
1 ms |
212 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
0 ms |
212 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
340 KB |
Output is correct |
23 |
Correct |
1 ms |
212 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
0 ms |
212 KB |
Output is correct |
26 |
Correct |
0 ms |
212 KB |
Output is correct |
27 |
Correct |
1 ms |
316 KB |
Output is correct |
28 |
Correct |
0 ms |
212 KB |
Output is correct |
29 |
Correct |
1 ms |
320 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
1 ms |
340 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
0 ms |
212 KB |
Output is correct |
37 |
Correct |
1 ms |
212 KB |
Output is correct |
38 |
Correct |
1 ms |
212 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
7 ms |
980 KB |
Output is correct |
42 |
Correct |
9 ms |
980 KB |
Output is correct |
43 |
Correct |
10 ms |
980 KB |
Output is correct |
44 |
Correct |
12 ms |
980 KB |
Output is correct |
45 |
Correct |
11 ms |
1088 KB |
Output is correct |
46 |
Correct |
70 ms |
6356 KB |
Output is correct |
47 |
Correct |
89 ms |
6464 KB |
Output is correct |
48 |
Correct |
89 ms |
6456 KB |
Output is correct |
49 |
Correct |
87 ms |
6452 KB |
Output is correct |
50 |
Correct |
92 ms |
6376 KB |
Output is correct |
51 |
Correct |
773 ms |
50148 KB |
Output is correct |
52 |
Correct |
432 ms |
50208 KB |
Output is correct |
53 |
Correct |
649 ms |
50148 KB |
Output is correct |
54 |
Correct |
687 ms |
50144 KB |
Output is correct |
55 |
Correct |
1 ms |
340 KB |
Output is correct |
56 |
Correct |
90 ms |
6960 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
53 ms |
8416 KB |
Output is correct |
3 |
Correct |
55 ms |
8400 KB |
Output is correct |
4 |
Correct |
42 ms |
6040 KB |
Output is correct |
5 |
Correct |
58 ms |
8500 KB |
Output is correct |
6 |
Correct |
40 ms |
6088 KB |
Output is correct |
7 |
Correct |
62 ms |
8520 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
316 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 |
1 ms |
320 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
0 ms |
212 KB |
Output is correct |
16 |
Correct |
1 ms |
212 KB |
Output is correct |
17 |
Correct |
2 ms |
324 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
53 ms |
8416 KB |
Output is correct |
3 |
Correct |
55 ms |
8400 KB |
Output is correct |
4 |
Correct |
42 ms |
6040 KB |
Output is correct |
5 |
Correct |
58 ms |
8500 KB |
Output is correct |
6 |
Correct |
40 ms |
6088 KB |
Output is correct |
7 |
Correct |
62 ms |
8520 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
316 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 |
1 ms |
320 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
0 ms |
212 KB |
Output is correct |
16 |
Correct |
1 ms |
212 KB |
Output is correct |
17 |
Correct |
2 ms |
324 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
205 ms |
27404 KB |
Output is correct |
21 |
Correct |
192 ms |
24996 KB |
Output is correct |
22 |
Correct |
194 ms |
25044 KB |
Output is correct |
23 |
Correct |
176 ms |
27636 KB |
Output is correct |
24 |
Correct |
166 ms |
27392 KB |
Output is correct |
25 |
Correct |
178 ms |
27308 KB |
Output is correct |
26 |
Correct |
196 ms |
27372 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 |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
0 ms |
212 KB |
Output is correct |
32 |
Correct |
0 ms |
320 KB |
Output is correct |
33 |
Correct |
0 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
212 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
1 ms |
340 KB |
Output is correct |
37 |
Correct |
1 ms |
212 KB |
Output is correct |
38 |
Correct |
0 ms |
212 KB |
Output is correct |
39 |
Correct |
1 ms |
212 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
1 ms |
212 KB |
Output is correct |
42 |
Correct |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
212 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 |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
53 ms |
8416 KB |
Output is correct |
3 |
Correct |
55 ms |
8400 KB |
Output is correct |
4 |
Correct |
42 ms |
6040 KB |
Output is correct |
5 |
Correct |
58 ms |
8500 KB |
Output is correct |
6 |
Correct |
40 ms |
6088 KB |
Output is correct |
7 |
Correct |
62 ms |
8520 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
316 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 |
1 ms |
320 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
0 ms |
212 KB |
Output is correct |
16 |
Correct |
1 ms |
212 KB |
Output is correct |
17 |
Correct |
2 ms |
324 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
205 ms |
27404 KB |
Output is correct |
21 |
Correct |
192 ms |
24996 KB |
Output is correct |
22 |
Correct |
194 ms |
25044 KB |
Output is correct |
23 |
Correct |
176 ms |
27636 KB |
Output is correct |
24 |
Correct |
166 ms |
27392 KB |
Output is correct |
25 |
Correct |
178 ms |
27308 KB |
Output is correct |
26 |
Correct |
196 ms |
27372 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 |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
0 ms |
212 KB |
Output is correct |
32 |
Correct |
0 ms |
320 KB |
Output is correct |
33 |
Correct |
0 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
212 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
1 ms |
340 KB |
Output is correct |
37 |
Correct |
1 ms |
212 KB |
Output is correct |
38 |
Correct |
0 ms |
212 KB |
Output is correct |
39 |
Correct |
1 ms |
212 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
1 ms |
212 KB |
Output is correct |
42 |
Correct |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
212 KB |
Output is correct |
44 |
Correct |
1 ms |
340 KB |
Output is correct |
45 |
Correct |
1 ms |
340 KB |
Output is correct |
46 |
Correct |
2 ms |
468 KB |
Output is correct |
47 |
Correct |
266 ms |
37436 KB |
Output is correct |
48 |
Correct |
253 ms |
34716 KB |
Output is correct |
49 |
Correct |
248 ms |
34804 KB |
Output is correct |
50 |
Correct |
250 ms |
37924 KB |
Output is correct |
51 |
Correct |
212 ms |
37456 KB |
Output is correct |
52 |
Correct |
244 ms |
37452 KB |
Output is correct |
53 |
Correct |
274 ms |
37784 KB |
Output is correct |
54 |
Correct |
8 ms |
980 KB |
Output is correct |
55 |
Correct |
12 ms |
1084 KB |
Output is correct |
56 |
Correct |
11 ms |
964 KB |
Output is correct |
57 |
Correct |
9 ms |
1084 KB |
Output is correct |
58 |
Correct |
10 ms |
1088 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
53 ms |
8416 KB |
Output is correct |
3 |
Correct |
55 ms |
8400 KB |
Output is correct |
4 |
Correct |
42 ms |
6040 KB |
Output is correct |
5 |
Correct |
58 ms |
8500 KB |
Output is correct |
6 |
Correct |
40 ms |
6088 KB |
Output is correct |
7 |
Correct |
62 ms |
8520 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
316 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 |
1 ms |
320 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
0 ms |
212 KB |
Output is correct |
16 |
Correct |
1 ms |
212 KB |
Output is correct |
17 |
Correct |
2 ms |
324 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
205 ms |
27404 KB |
Output is correct |
21 |
Correct |
192 ms |
24996 KB |
Output is correct |
22 |
Correct |
194 ms |
25044 KB |
Output is correct |
23 |
Correct |
176 ms |
27636 KB |
Output is correct |
24 |
Correct |
166 ms |
27392 KB |
Output is correct |
25 |
Correct |
178 ms |
27308 KB |
Output is correct |
26 |
Correct |
196 ms |
27372 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 |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
0 ms |
212 KB |
Output is correct |
32 |
Correct |
0 ms |
320 KB |
Output is correct |
33 |
Correct |
0 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
212 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
1 ms |
340 KB |
Output is correct |
37 |
Correct |
1 ms |
212 KB |
Output is correct |
38 |
Correct |
0 ms |
212 KB |
Output is correct |
39 |
Correct |
1 ms |
212 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
1 ms |
212 KB |
Output is correct |
42 |
Correct |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
212 KB |
Output is correct |
44 |
Correct |
1 ms |
340 KB |
Output is correct |
45 |
Correct |
1 ms |
340 KB |
Output is correct |
46 |
Correct |
2 ms |
468 KB |
Output is correct |
47 |
Correct |
266 ms |
37436 KB |
Output is correct |
48 |
Correct |
253 ms |
34716 KB |
Output is correct |
49 |
Correct |
248 ms |
34804 KB |
Output is correct |
50 |
Correct |
250 ms |
37924 KB |
Output is correct |
51 |
Correct |
212 ms |
37456 KB |
Output is correct |
52 |
Correct |
244 ms |
37452 KB |
Output is correct |
53 |
Correct |
274 ms |
37784 KB |
Output is correct |
54 |
Correct |
8 ms |
980 KB |
Output is correct |
55 |
Correct |
12 ms |
1084 KB |
Output is correct |
56 |
Correct |
11 ms |
964 KB |
Output is correct |
57 |
Correct |
9 ms |
1084 KB |
Output is correct |
58 |
Correct |
10 ms |
1088 KB |
Output is correct |
59 |
Correct |
310 ms |
44700 KB |
Output is correct |
60 |
Correct |
192 ms |
23396 KB |
Output is correct |
61 |
Correct |
192 ms |
24592 KB |
Output is correct |
62 |
Correct |
198 ms |
25236 KB |
Output is correct |
63 |
Correct |
349 ms |
44284 KB |
Output is correct |
64 |
Correct |
391 ms |
49804 KB |
Output is correct |
65 |
Correct |
413 ms |
49740 KB |
Output is correct |
66 |
Correct |
349 ms |
50148 KB |
Output is correct |
67 |
Correct |
285 ms |
49852 KB |
Output is correct |
68 |
Correct |
334 ms |
49628 KB |
Output is correct |
69 |
Correct |
401 ms |
49904 KB |
Output is correct |
70 |
Correct |
63 ms |
6356 KB |
Output is correct |
71 |
Correct |
86 ms |
6464 KB |
Output is correct |
72 |
Correct |
100 ms |
6452 KB |
Output is correct |
73 |
Correct |
88 ms |
6356 KB |
Output is correct |
74 |
Correct |
91 ms |
6456 KB |
Output is correct |
75 |
Correct |
71 ms |
6972 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
2 ms |
468 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
635 ms |
49552 KB |
Output is correct |
6 |
Correct |
815 ms |
49604 KB |
Output is correct |
7 |
Correct |
843 ms |
49544 KB |
Output is correct |
8 |
Correct |
852 ms |
49544 KB |
Output is correct |
9 |
Correct |
865 ms |
49600 KB |
Output is correct |
10 |
Correct |
816 ms |
49540 KB |
Output is correct |
11 |
Correct |
871 ms |
49548 KB |
Output is correct |
12 |
Correct |
887 ms |
49604 KB |
Output is correct |
13 |
Correct |
1 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
0 ms |
212 KB |
Output is correct |
16 |
Correct |
1 ms |
212 KB |
Output is correct |
17 |
Correct |
1 ms |
212 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
0 ms |
212 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
340 KB |
Output is correct |
23 |
Correct |
1 ms |
212 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
0 ms |
212 KB |
Output is correct |
26 |
Correct |
0 ms |
212 KB |
Output is correct |
27 |
Correct |
1 ms |
316 KB |
Output is correct |
28 |
Correct |
0 ms |
212 KB |
Output is correct |
29 |
Correct |
1 ms |
320 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
1 ms |
340 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
0 ms |
212 KB |
Output is correct |
37 |
Correct |
1 ms |
212 KB |
Output is correct |
38 |
Correct |
1 ms |
212 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
7 ms |
980 KB |
Output is correct |
42 |
Correct |
9 ms |
980 KB |
Output is correct |
43 |
Correct |
10 ms |
980 KB |
Output is correct |
44 |
Correct |
12 ms |
980 KB |
Output is correct |
45 |
Correct |
11 ms |
1088 KB |
Output is correct |
46 |
Correct |
70 ms |
6356 KB |
Output is correct |
47 |
Correct |
89 ms |
6464 KB |
Output is correct |
48 |
Correct |
89 ms |
6456 KB |
Output is correct |
49 |
Correct |
87 ms |
6452 KB |
Output is correct |
50 |
Correct |
92 ms |
6376 KB |
Output is correct |
51 |
Correct |
773 ms |
50148 KB |
Output is correct |
52 |
Correct |
432 ms |
50208 KB |
Output is correct |
53 |
Correct |
649 ms |
50148 KB |
Output is correct |
54 |
Correct |
687 ms |
50144 KB |
Output is correct |
55 |
Correct |
1 ms |
340 KB |
Output is correct |
56 |
Correct |
90 ms |
6960 KB |
Output is correct |
57 |
Correct |
1 ms |
212 KB |
Output is correct |
58 |
Correct |
53 ms |
8416 KB |
Output is correct |
59 |
Correct |
55 ms |
8400 KB |
Output is correct |
60 |
Correct |
42 ms |
6040 KB |
Output is correct |
61 |
Correct |
58 ms |
8500 KB |
Output is correct |
62 |
Correct |
40 ms |
6088 KB |
Output is correct |
63 |
Correct |
62 ms |
8520 KB |
Output is correct |
64 |
Correct |
0 ms |
212 KB |
Output is correct |
65 |
Correct |
1 ms |
316 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 |
1 ms |
320 KB |
Output is correct |
70 |
Correct |
1 ms |
212 KB |
Output is correct |
71 |
Correct |
0 ms |
212 KB |
Output is correct |
72 |
Correct |
1 ms |
212 KB |
Output is correct |
73 |
Correct |
2 ms |
324 KB |
Output is correct |
74 |
Correct |
1 ms |
212 KB |
Output is correct |
75 |
Correct |
0 ms |
212 KB |
Output is correct |
76 |
Correct |
205 ms |
27404 KB |
Output is correct |
77 |
Correct |
192 ms |
24996 KB |
Output is correct |
78 |
Correct |
194 ms |
25044 KB |
Output is correct |
79 |
Correct |
176 ms |
27636 KB |
Output is correct |
80 |
Correct |
166 ms |
27392 KB |
Output is correct |
81 |
Correct |
178 ms |
27308 KB |
Output is correct |
82 |
Correct |
196 ms |
27372 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 |
1 ms |
212 KB |
Output is correct |
87 |
Correct |
0 ms |
212 KB |
Output is correct |
88 |
Correct |
0 ms |
320 KB |
Output is correct |
89 |
Correct |
0 ms |
212 KB |
Output is correct |
90 |
Correct |
1 ms |
212 KB |
Output is correct |
91 |
Correct |
1 ms |
340 KB |
Output is correct |
92 |
Correct |
1 ms |
340 KB |
Output is correct |
93 |
Correct |
1 ms |
212 KB |
Output is correct |
94 |
Correct |
0 ms |
212 KB |
Output is correct |
95 |
Correct |
1 ms |
212 KB |
Output is correct |
96 |
Correct |
1 ms |
212 KB |
Output is correct |
97 |
Correct |
1 ms |
212 KB |
Output is correct |
98 |
Correct |
1 ms |
212 KB |
Output is correct |
99 |
Correct |
1 ms |
212 KB |
Output is correct |
100 |
Correct |
1 ms |
340 KB |
Output is correct |
101 |
Correct |
1 ms |
340 KB |
Output is correct |
102 |
Correct |
2 ms |
468 KB |
Output is correct |
103 |
Correct |
266 ms |
37436 KB |
Output is correct |
104 |
Correct |
253 ms |
34716 KB |
Output is correct |
105 |
Correct |
248 ms |
34804 KB |
Output is correct |
106 |
Correct |
250 ms |
37924 KB |
Output is correct |
107 |
Correct |
212 ms |
37456 KB |
Output is correct |
108 |
Correct |
244 ms |
37452 KB |
Output is correct |
109 |
Correct |
274 ms |
37784 KB |
Output is correct |
110 |
Correct |
8 ms |
980 KB |
Output is correct |
111 |
Correct |
12 ms |
1084 KB |
Output is correct |
112 |
Correct |
11 ms |
964 KB |
Output is correct |
113 |
Correct |
9 ms |
1084 KB |
Output is correct |
114 |
Correct |
10 ms |
1088 KB |
Output is correct |
115 |
Correct |
310 ms |
44700 KB |
Output is correct |
116 |
Correct |
192 ms |
23396 KB |
Output is correct |
117 |
Correct |
192 ms |
24592 KB |
Output is correct |
118 |
Correct |
198 ms |
25236 KB |
Output is correct |
119 |
Correct |
349 ms |
44284 KB |
Output is correct |
120 |
Correct |
391 ms |
49804 KB |
Output is correct |
121 |
Correct |
413 ms |
49740 KB |
Output is correct |
122 |
Correct |
349 ms |
50148 KB |
Output is correct |
123 |
Correct |
285 ms |
49852 KB |
Output is correct |
124 |
Correct |
334 ms |
49628 KB |
Output is correct |
125 |
Correct |
401 ms |
49904 KB |
Output is correct |
126 |
Correct |
63 ms |
6356 KB |
Output is correct |
127 |
Correct |
86 ms |
6464 KB |
Output is correct |
128 |
Correct |
100 ms |
6452 KB |
Output is correct |
129 |
Correct |
88 ms |
6356 KB |
Output is correct |
130 |
Correct |
91 ms |
6456 KB |
Output is correct |
131 |
Correct |
71 ms |
6972 KB |
Output is correct |
132 |
Correct |
900 ms |
100136 KB |
Output is correct |
133 |
Correct |
895 ms |
99884 KB |
Output is correct |
134 |
Correct |
913 ms |
99968 KB |
Output is correct |
135 |
Correct |
1208 ms |
100056 KB |
Output is correct |
136 |
Correct |
1190 ms |
100008 KB |
Output is correct |
137 |
Correct |
741 ms |
73148 KB |
Output is correct |
138 |
Correct |
734 ms |
72928 KB |
Output is correct |
139 |
Correct |
1072 ms |
100012 KB |
Output is correct |
140 |
Correct |
694 ms |
99504 KB |
Output is correct |
141 |
Correct |
894 ms |
99568 KB |
Output is correct |
142 |
Correct |
952 ms |
99916 KB |
Output is correct |