#include <bits/stdc++.h>
using namespace std;
#define int long long
#define f first
#define s second
const int N = 3e5 + 69;
const int M = 21;
int a[N], cnt[M], n, m;
int t[M], k, gas, pr, suf, bt, b, ans, c, s, x;
vector<pair<int, int>> g[1030];
pair<pair<int, int>, pair<int, int>> bst[1030][1030];
int kurac[1030][1030];
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int tt = 1;
//cin >> tt;
while (tt--) {
cin >> n >> m;
for (int i = 1;i <= n;i++) {
for (int j = 0;j < m;j++) {
cin >> x;
if (x > 0) {
a[i] |= (1 << j);
cnt[j]++;
}
}
g[(a[i] & ((1 << (m / 2)) - 1))].push_back({(a[i] >> (m / 2)), a[i]});
}
for (int i = 0;i < (1 << m / 2);i++) {
for (int j = 0;j < (1 << (m - m / 2));j++) {
bst[i][j] = {{(1 << m) - 1, m + 1}, {(1 << m) - 1, m + 1}};
for (auto x : g[i]) {
int bt = __builtin_popcount(x.f & j);
if (bt < bst[i][j].f.s) {
bst[i][j].s = bst[i][j].f;
bst[i][j].f = {x.s, bt};
}
else if (bt < bst[i][j].s.s)
bst[i][j].s = {x.s, bt};
}
}
}
//sufix duzine k, prefix duzine m - k
for (int i = 1;i <= n;i++) {
b = ans = c = 0;
for (int j = 0;j < m;j++) {
gas = cnt[j] - (a[i] >> j & 1);
if (gas == n / 2) {
b |= (1 << j);
c++;
}
else if (gas > n / 2)
ans++;
}
suf = (b >> (m / 2)), s = c;
pr = (b & ((1 << (m / 2)) - 1));
for (int j = 0;j < (1 << (m / 2));j++) {
if (a[i] != bst[j][suf].f.f)
s = min(s, bst[j][suf].f.s + __builtin_popcount(pr & j));
else
s = min(s, bst[j][suf].s.s + __builtin_popcount(pr & j));
}
ans += c - s;
cout << ans << '\n';
}
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4440 KB |
Output is correct |
2 |
Correct |
1 ms |
6492 KB |
Output is correct |
3 |
Correct |
1 ms |
6492 KB |
Output is correct |
4 |
Correct |
1 ms |
4444 KB |
Output is correct |
5 |
Correct |
7 ms |
37212 KB |
Output is correct |
6 |
Correct |
8 ms |
37212 KB |
Output is correct |
7 |
Correct |
7 ms |
37212 KB |
Output is correct |
8 |
Correct |
8 ms |
37212 KB |
Output is correct |
9 |
Correct |
9 ms |
37208 KB |
Output is correct |
10 |
Correct |
6 ms |
37212 KB |
Output is correct |
11 |
Correct |
7 ms |
37212 KB |
Output is correct |
12 |
Correct |
18 ms |
37208 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
1 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
4444 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
1 ms |
4440 KB |
Output is correct |
21 |
Correct |
1 ms |
4444 KB |
Output is correct |
22 |
Correct |
1 ms |
6492 KB |
Output is correct |
23 |
Correct |
1 ms |
4444 KB |
Output is correct |
24 |
Correct |
1 ms |
6492 KB |
Output is correct |
25 |
Correct |
1 ms |
6492 KB |
Output is correct |
26 |
Correct |
1 ms |
6492 KB |
Output is correct |
27 |
Correct |
1 ms |
6492 KB |
Output is correct |
28 |
Correct |
1 ms |
6492 KB |
Output is correct |
29 |
Correct |
1 ms |
6488 KB |
Output is correct |
30 |
Correct |
1 ms |
6492 KB |
Output is correct |
31 |
Correct |
1 ms |
6492 KB |
Output is correct |
32 |
Correct |
1 ms |
4444 KB |
Output is correct |
33 |
Correct |
1 ms |
6488 KB |
Output is correct |
34 |
Correct |
1 ms |
6492 KB |
Output is correct |
35 |
Correct |
1 ms |
6492 KB |
Output is correct |
36 |
Correct |
1 ms |
6492 KB |
Output is correct |
37 |
Correct |
1 ms |
6492 KB |
Output is correct |
38 |
Correct |
1 ms |
6492 KB |
Output is correct |
39 |
Correct |
1 ms |
6492 KB |
Output is correct |
40 |
Correct |
2 ms |
6492 KB |
Output is correct |
41 |
Correct |
1 ms |
8540 KB |
Output is correct |
42 |
Correct |
1 ms |
8540 KB |
Output is correct |
43 |
Correct |
1 ms |
8540 KB |
Output is correct |
44 |
Correct |
2 ms |
8540 KB |
Output is correct |
45 |
Correct |
1 ms |
8540 KB |
Output is correct |
46 |
Correct |
2 ms |
12636 KB |
Output is correct |
47 |
Correct |
2 ms |
12636 KB |
Output is correct |
48 |
Correct |
2 ms |
12636 KB |
Output is correct |
49 |
Correct |
2 ms |
12636 KB |
Output is correct |
50 |
Correct |
2 ms |
12632 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4440 KB |
Output is correct |
2 |
Correct |
1 ms |
6492 KB |
Output is correct |
3 |
Correct |
1 ms |
6492 KB |
Output is correct |
4 |
Correct |
1 ms |
4444 KB |
Output is correct |
5 |
Correct |
7 ms |
37212 KB |
Output is correct |
6 |
Correct |
8 ms |
37212 KB |
Output is correct |
7 |
Correct |
7 ms |
37212 KB |
Output is correct |
8 |
Correct |
8 ms |
37212 KB |
Output is correct |
9 |
Correct |
9 ms |
37208 KB |
Output is correct |
10 |
Correct |
6 ms |
37212 KB |
Output is correct |
11 |
Correct |
7 ms |
37212 KB |
Output is correct |
12 |
Correct |
18 ms |
37208 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
1 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
4444 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
1 ms |
4440 KB |
Output is correct |
21 |
Correct |
1 ms |
4444 KB |
Output is correct |
22 |
Correct |
1 ms |
6492 KB |
Output is correct |
23 |
Correct |
1 ms |
4444 KB |
Output is correct |
24 |
Correct |
1 ms |
6492 KB |
Output is correct |
25 |
Correct |
1 ms |
6492 KB |
Output is correct |
26 |
Correct |
1 ms |
6492 KB |
Output is correct |
27 |
Correct |
1 ms |
6492 KB |
Output is correct |
28 |
Correct |
1 ms |
6492 KB |
Output is correct |
29 |
Correct |
1 ms |
6488 KB |
Output is correct |
30 |
Correct |
1 ms |
6492 KB |
Output is correct |
31 |
Correct |
1 ms |
6492 KB |
Output is correct |
32 |
Correct |
1 ms |
4444 KB |
Output is correct |
33 |
Correct |
1 ms |
6488 KB |
Output is correct |
34 |
Correct |
1 ms |
6492 KB |
Output is correct |
35 |
Correct |
1 ms |
6492 KB |
Output is correct |
36 |
Correct |
1 ms |
6492 KB |
Output is correct |
37 |
Correct |
1 ms |
6492 KB |
Output is correct |
38 |
Correct |
1 ms |
6492 KB |
Output is correct |
39 |
Correct |
1 ms |
6492 KB |
Output is correct |
40 |
Correct |
2 ms |
6492 KB |
Output is correct |
41 |
Correct |
1 ms |
8540 KB |
Output is correct |
42 |
Correct |
1 ms |
8540 KB |
Output is correct |
43 |
Correct |
1 ms |
8540 KB |
Output is correct |
44 |
Correct |
2 ms |
8540 KB |
Output is correct |
45 |
Correct |
1 ms |
8540 KB |
Output is correct |
46 |
Correct |
2 ms |
12636 KB |
Output is correct |
47 |
Correct |
2 ms |
12636 KB |
Output is correct |
48 |
Correct |
2 ms |
12636 KB |
Output is correct |
49 |
Correct |
2 ms |
12636 KB |
Output is correct |
50 |
Correct |
2 ms |
12632 KB |
Output is correct |
51 |
Correct |
25 ms |
37464 KB |
Output is correct |
52 |
Correct |
25 ms |
37468 KB |
Output is correct |
53 |
Correct |
29 ms |
37476 KB |
Output is correct |
54 |
Correct |
110 ms |
37712 KB |
Output is correct |
55 |
Correct |
1 ms |
4444 KB |
Output is correct |
56 |
Correct |
15 ms |
12872 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4440 KB |
Output is correct |
2 |
Correct |
56 ms |
12276 KB |
Output is correct |
3 |
Correct |
48 ms |
11704 KB |
Output is correct |
4 |
Correct |
44 ms |
12496 KB |
Output is correct |
5 |
Correct |
50 ms |
11380 KB |
Output is correct |
6 |
Correct |
35 ms |
11960 KB |
Output is correct |
7 |
Correct |
52 ms |
11492 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4440 KB |
Output is correct |
10 |
Correct |
1 ms |
4440 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4440 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
2 ms |
4440 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4440 KB |
Output is correct |
2 |
Correct |
56 ms |
12276 KB |
Output is correct |
3 |
Correct |
48 ms |
11704 KB |
Output is correct |
4 |
Correct |
44 ms |
12496 KB |
Output is correct |
5 |
Correct |
50 ms |
11380 KB |
Output is correct |
6 |
Correct |
35 ms |
11960 KB |
Output is correct |
7 |
Correct |
52 ms |
11492 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4440 KB |
Output is correct |
10 |
Correct |
1 ms |
4440 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4440 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
2 ms |
4440 KB |
Output is correct |
18 |
Correct |
1 ms |
4440 KB |
Output is correct |
19 |
Correct |
1 ms |
6492 KB |
Output is correct |
20 |
Correct |
207 ms |
13200 KB |
Output is correct |
21 |
Correct |
178 ms |
13296 KB |
Output is correct |
22 |
Correct |
176 ms |
12892 KB |
Output is correct |
23 |
Correct |
182 ms |
13752 KB |
Output is correct |
24 |
Correct |
179 ms |
12724 KB |
Output is correct |
25 |
Correct |
197 ms |
13876 KB |
Output is correct |
26 |
Correct |
207 ms |
13748 KB |
Output is correct |
27 |
Correct |
1 ms |
6488 KB |
Output is correct |
28 |
Correct |
1 ms |
4444 KB |
Output is correct |
29 |
Correct |
1 ms |
6492 KB |
Output is correct |
30 |
Correct |
1 ms |
6492 KB |
Output is correct |
31 |
Correct |
1 ms |
6488 KB |
Output is correct |
32 |
Correct |
1 ms |
6492 KB |
Output is correct |
33 |
Correct |
1 ms |
6492 KB |
Output is correct |
34 |
Correct |
1 ms |
6492 KB |
Output is correct |
35 |
Correct |
1 ms |
6492 KB |
Output is correct |
36 |
Correct |
1 ms |
6492 KB |
Output is correct |
37 |
Correct |
1 ms |
4532 KB |
Output is correct |
38 |
Correct |
1 ms |
6492 KB |
Output is correct |
39 |
Correct |
1 ms |
6492 KB |
Output is correct |
40 |
Correct |
1 ms |
6492 KB |
Output is correct |
41 |
Correct |
1 ms |
6488 KB |
Output is correct |
42 |
Correct |
1 ms |
6488 KB |
Output is correct |
43 |
Correct |
1 ms |
6492 KB |
Output is correct |
44 |
Correct |
1 ms |
6492 KB |
Output is correct |
45 |
Correct |
1 ms |
6492 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4440 KB |
Output is correct |
2 |
Correct |
56 ms |
12276 KB |
Output is correct |
3 |
Correct |
48 ms |
11704 KB |
Output is correct |
4 |
Correct |
44 ms |
12496 KB |
Output is correct |
5 |
Correct |
50 ms |
11380 KB |
Output is correct |
6 |
Correct |
35 ms |
11960 KB |
Output is correct |
7 |
Correct |
52 ms |
11492 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4440 KB |
Output is correct |
10 |
Correct |
1 ms |
4440 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4440 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
2 ms |
4440 KB |
Output is correct |
18 |
Correct |
1 ms |
4440 KB |
Output is correct |
19 |
Correct |
1 ms |
6492 KB |
Output is correct |
20 |
Correct |
207 ms |
13200 KB |
Output is correct |
21 |
Correct |
178 ms |
13296 KB |
Output is correct |
22 |
Correct |
176 ms |
12892 KB |
Output is correct |
23 |
Correct |
182 ms |
13752 KB |
Output is correct |
24 |
Correct |
179 ms |
12724 KB |
Output is correct |
25 |
Correct |
197 ms |
13876 KB |
Output is correct |
26 |
Correct |
207 ms |
13748 KB |
Output is correct |
27 |
Correct |
1 ms |
6488 KB |
Output is correct |
28 |
Correct |
1 ms |
4444 KB |
Output is correct |
29 |
Correct |
1 ms |
6492 KB |
Output is correct |
30 |
Correct |
1 ms |
6492 KB |
Output is correct |
31 |
Correct |
1 ms |
6488 KB |
Output is correct |
32 |
Correct |
1 ms |
6492 KB |
Output is correct |
33 |
Correct |
1 ms |
6492 KB |
Output is correct |
34 |
Correct |
1 ms |
6492 KB |
Output is correct |
35 |
Correct |
1 ms |
6492 KB |
Output is correct |
36 |
Correct |
1 ms |
6492 KB |
Output is correct |
37 |
Correct |
1 ms |
4532 KB |
Output is correct |
38 |
Correct |
1 ms |
6492 KB |
Output is correct |
39 |
Correct |
1 ms |
6492 KB |
Output is correct |
40 |
Correct |
1 ms |
6492 KB |
Output is correct |
41 |
Correct |
1 ms |
6488 KB |
Output is correct |
42 |
Correct |
1 ms |
6488 KB |
Output is correct |
43 |
Correct |
1 ms |
6492 KB |
Output is correct |
44 |
Correct |
1 ms |
6492 KB |
Output is correct |
45 |
Correct |
1 ms |
6492 KB |
Output is correct |
46 |
Correct |
1 ms |
6492 KB |
Output is correct |
47 |
Correct |
420 ms |
15988 KB |
Output is correct |
48 |
Correct |
357 ms |
14172 KB |
Output is correct |
49 |
Correct |
341 ms |
14416 KB |
Output is correct |
50 |
Correct |
372 ms |
16256 KB |
Output is correct |
51 |
Correct |
370 ms |
14520 KB |
Output is correct |
52 |
Correct |
392 ms |
17264 KB |
Output is correct |
53 |
Correct |
428 ms |
17464 KB |
Output is correct |
54 |
Correct |
1 ms |
8540 KB |
Output is correct |
55 |
Correct |
1 ms |
8540 KB |
Output is correct |
56 |
Correct |
1 ms |
8540 KB |
Output is correct |
57 |
Correct |
2 ms |
8540 KB |
Output is correct |
58 |
Correct |
1 ms |
8540 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4440 KB |
Output is correct |
2 |
Correct |
56 ms |
12276 KB |
Output is correct |
3 |
Correct |
48 ms |
11704 KB |
Output is correct |
4 |
Correct |
44 ms |
12496 KB |
Output is correct |
5 |
Correct |
50 ms |
11380 KB |
Output is correct |
6 |
Correct |
35 ms |
11960 KB |
Output is correct |
7 |
Correct |
52 ms |
11492 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4440 KB |
Output is correct |
10 |
Correct |
1 ms |
4440 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4440 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
2 ms |
4440 KB |
Output is correct |
18 |
Correct |
1 ms |
4440 KB |
Output is correct |
19 |
Correct |
1 ms |
6492 KB |
Output is correct |
20 |
Correct |
207 ms |
13200 KB |
Output is correct |
21 |
Correct |
178 ms |
13296 KB |
Output is correct |
22 |
Correct |
176 ms |
12892 KB |
Output is correct |
23 |
Correct |
182 ms |
13752 KB |
Output is correct |
24 |
Correct |
179 ms |
12724 KB |
Output is correct |
25 |
Correct |
197 ms |
13876 KB |
Output is correct |
26 |
Correct |
207 ms |
13748 KB |
Output is correct |
27 |
Correct |
1 ms |
6488 KB |
Output is correct |
28 |
Correct |
1 ms |
4444 KB |
Output is correct |
29 |
Correct |
1 ms |
6492 KB |
Output is correct |
30 |
Correct |
1 ms |
6492 KB |
Output is correct |
31 |
Correct |
1 ms |
6488 KB |
Output is correct |
32 |
Correct |
1 ms |
6492 KB |
Output is correct |
33 |
Correct |
1 ms |
6492 KB |
Output is correct |
34 |
Correct |
1 ms |
6492 KB |
Output is correct |
35 |
Correct |
1 ms |
6492 KB |
Output is correct |
36 |
Correct |
1 ms |
6492 KB |
Output is correct |
37 |
Correct |
1 ms |
4532 KB |
Output is correct |
38 |
Correct |
1 ms |
6492 KB |
Output is correct |
39 |
Correct |
1 ms |
6492 KB |
Output is correct |
40 |
Correct |
1 ms |
6492 KB |
Output is correct |
41 |
Correct |
1 ms |
6488 KB |
Output is correct |
42 |
Correct |
1 ms |
6488 KB |
Output is correct |
43 |
Correct |
1 ms |
6492 KB |
Output is correct |
44 |
Correct |
1 ms |
6492 KB |
Output is correct |
45 |
Correct |
1 ms |
6492 KB |
Output is correct |
46 |
Correct |
1 ms |
6492 KB |
Output is correct |
47 |
Correct |
420 ms |
15988 KB |
Output is correct |
48 |
Correct |
357 ms |
14172 KB |
Output is correct |
49 |
Correct |
341 ms |
14416 KB |
Output is correct |
50 |
Correct |
372 ms |
16256 KB |
Output is correct |
51 |
Correct |
370 ms |
14520 KB |
Output is correct |
52 |
Correct |
392 ms |
17264 KB |
Output is correct |
53 |
Correct |
428 ms |
17464 KB |
Output is correct |
54 |
Correct |
1 ms |
8540 KB |
Output is correct |
55 |
Correct |
1 ms |
8540 KB |
Output is correct |
56 |
Correct |
1 ms |
8540 KB |
Output is correct |
57 |
Correct |
2 ms |
8540 KB |
Output is correct |
58 |
Correct |
1 ms |
8540 KB |
Output is correct |
59 |
Correct |
608 ms |
20704 KB |
Output is correct |
60 |
Correct |
366 ms |
15444 KB |
Output is correct |
61 |
Correct |
389 ms |
15736 KB |
Output is correct |
62 |
Correct |
389 ms |
15440 KB |
Output is correct |
63 |
Correct |
722 ms |
20820 KB |
Output is correct |
64 |
Correct |
909 ms |
20416 KB |
Output is correct |
65 |
Correct |
951 ms |
20820 KB |
Output is correct |
66 |
Correct |
795 ms |
20240 KB |
Output is correct |
67 |
Correct |
782 ms |
19940 KB |
Output is correct |
68 |
Correct |
824 ms |
21700 KB |
Output is correct |
69 |
Correct |
975 ms |
21868 KB |
Output is correct |
70 |
Correct |
2 ms |
12632 KB |
Output is correct |
71 |
Correct |
2 ms |
12636 KB |
Output is correct |
72 |
Correct |
3 ms |
12636 KB |
Output is correct |
73 |
Correct |
2 ms |
12636 KB |
Output is correct |
74 |
Correct |
3 ms |
12636 KB |
Output is correct |
75 |
Correct |
14 ms |
12868 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4440 KB |
Output is correct |
2 |
Correct |
1 ms |
6492 KB |
Output is correct |
3 |
Correct |
1 ms |
6492 KB |
Output is correct |
4 |
Correct |
1 ms |
4444 KB |
Output is correct |
5 |
Correct |
7 ms |
37212 KB |
Output is correct |
6 |
Correct |
8 ms |
37212 KB |
Output is correct |
7 |
Correct |
7 ms |
37212 KB |
Output is correct |
8 |
Correct |
8 ms |
37212 KB |
Output is correct |
9 |
Correct |
9 ms |
37208 KB |
Output is correct |
10 |
Correct |
6 ms |
37212 KB |
Output is correct |
11 |
Correct |
7 ms |
37212 KB |
Output is correct |
12 |
Correct |
18 ms |
37208 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
1 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
4444 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
1 ms |
4440 KB |
Output is correct |
21 |
Correct |
1 ms |
4444 KB |
Output is correct |
22 |
Correct |
1 ms |
6492 KB |
Output is correct |
23 |
Correct |
1 ms |
4444 KB |
Output is correct |
24 |
Correct |
1 ms |
6492 KB |
Output is correct |
25 |
Correct |
1 ms |
6492 KB |
Output is correct |
26 |
Correct |
1 ms |
6492 KB |
Output is correct |
27 |
Correct |
1 ms |
6492 KB |
Output is correct |
28 |
Correct |
1 ms |
6492 KB |
Output is correct |
29 |
Correct |
1 ms |
6488 KB |
Output is correct |
30 |
Correct |
1 ms |
6492 KB |
Output is correct |
31 |
Correct |
1 ms |
6492 KB |
Output is correct |
32 |
Correct |
1 ms |
4444 KB |
Output is correct |
33 |
Correct |
1 ms |
6488 KB |
Output is correct |
34 |
Correct |
1 ms |
6492 KB |
Output is correct |
35 |
Correct |
1 ms |
6492 KB |
Output is correct |
36 |
Correct |
1 ms |
6492 KB |
Output is correct |
37 |
Correct |
1 ms |
6492 KB |
Output is correct |
38 |
Correct |
1 ms |
6492 KB |
Output is correct |
39 |
Correct |
1 ms |
6492 KB |
Output is correct |
40 |
Correct |
2 ms |
6492 KB |
Output is correct |
41 |
Correct |
1 ms |
8540 KB |
Output is correct |
42 |
Correct |
1 ms |
8540 KB |
Output is correct |
43 |
Correct |
1 ms |
8540 KB |
Output is correct |
44 |
Correct |
2 ms |
8540 KB |
Output is correct |
45 |
Correct |
1 ms |
8540 KB |
Output is correct |
46 |
Correct |
2 ms |
12636 KB |
Output is correct |
47 |
Correct |
2 ms |
12636 KB |
Output is correct |
48 |
Correct |
2 ms |
12636 KB |
Output is correct |
49 |
Correct |
2 ms |
12636 KB |
Output is correct |
50 |
Correct |
2 ms |
12632 KB |
Output is correct |
51 |
Correct |
25 ms |
37464 KB |
Output is correct |
52 |
Correct |
25 ms |
37468 KB |
Output is correct |
53 |
Correct |
29 ms |
37476 KB |
Output is correct |
54 |
Correct |
110 ms |
37712 KB |
Output is correct |
55 |
Correct |
1 ms |
4444 KB |
Output is correct |
56 |
Correct |
15 ms |
12872 KB |
Output is correct |
57 |
Correct |
1 ms |
4440 KB |
Output is correct |
58 |
Correct |
56 ms |
12276 KB |
Output is correct |
59 |
Correct |
48 ms |
11704 KB |
Output is correct |
60 |
Correct |
44 ms |
12496 KB |
Output is correct |
61 |
Correct |
50 ms |
11380 KB |
Output is correct |
62 |
Correct |
35 ms |
11960 KB |
Output is correct |
63 |
Correct |
52 ms |
11492 KB |
Output is correct |
64 |
Correct |
1 ms |
4444 KB |
Output is correct |
65 |
Correct |
1 ms |
4440 KB |
Output is correct |
66 |
Correct |
1 ms |
4440 KB |
Output is correct |
67 |
Correct |
1 ms |
4444 KB |
Output is correct |
68 |
Correct |
1 ms |
4444 KB |
Output is correct |
69 |
Correct |
1 ms |
4444 KB |
Output is correct |
70 |
Correct |
1 ms |
4440 KB |
Output is correct |
71 |
Correct |
1 ms |
4444 KB |
Output is correct |
72 |
Correct |
1 ms |
4444 KB |
Output is correct |
73 |
Correct |
2 ms |
4440 KB |
Output is correct |
74 |
Correct |
1 ms |
4440 KB |
Output is correct |
75 |
Correct |
1 ms |
6492 KB |
Output is correct |
76 |
Correct |
207 ms |
13200 KB |
Output is correct |
77 |
Correct |
178 ms |
13296 KB |
Output is correct |
78 |
Correct |
176 ms |
12892 KB |
Output is correct |
79 |
Correct |
182 ms |
13752 KB |
Output is correct |
80 |
Correct |
179 ms |
12724 KB |
Output is correct |
81 |
Correct |
197 ms |
13876 KB |
Output is correct |
82 |
Correct |
207 ms |
13748 KB |
Output is correct |
83 |
Correct |
1 ms |
6488 KB |
Output is correct |
84 |
Correct |
1 ms |
4444 KB |
Output is correct |
85 |
Correct |
1 ms |
6492 KB |
Output is correct |
86 |
Correct |
1 ms |
6492 KB |
Output is correct |
87 |
Correct |
1 ms |
6488 KB |
Output is correct |
88 |
Correct |
1 ms |
6492 KB |
Output is correct |
89 |
Correct |
1 ms |
6492 KB |
Output is correct |
90 |
Correct |
1 ms |
6492 KB |
Output is correct |
91 |
Correct |
1 ms |
6492 KB |
Output is correct |
92 |
Correct |
1 ms |
6492 KB |
Output is correct |
93 |
Correct |
1 ms |
4532 KB |
Output is correct |
94 |
Correct |
1 ms |
6492 KB |
Output is correct |
95 |
Correct |
1 ms |
6492 KB |
Output is correct |
96 |
Correct |
1 ms |
6492 KB |
Output is correct |
97 |
Correct |
1 ms |
6488 KB |
Output is correct |
98 |
Correct |
1 ms |
6488 KB |
Output is correct |
99 |
Correct |
1 ms |
6492 KB |
Output is correct |
100 |
Correct |
1 ms |
6492 KB |
Output is correct |
101 |
Correct |
1 ms |
6492 KB |
Output is correct |
102 |
Correct |
1 ms |
6492 KB |
Output is correct |
103 |
Correct |
420 ms |
15988 KB |
Output is correct |
104 |
Correct |
357 ms |
14172 KB |
Output is correct |
105 |
Correct |
341 ms |
14416 KB |
Output is correct |
106 |
Correct |
372 ms |
16256 KB |
Output is correct |
107 |
Correct |
370 ms |
14520 KB |
Output is correct |
108 |
Correct |
392 ms |
17264 KB |
Output is correct |
109 |
Correct |
428 ms |
17464 KB |
Output is correct |
110 |
Correct |
1 ms |
8540 KB |
Output is correct |
111 |
Correct |
1 ms |
8540 KB |
Output is correct |
112 |
Correct |
1 ms |
8540 KB |
Output is correct |
113 |
Correct |
2 ms |
8540 KB |
Output is correct |
114 |
Correct |
1 ms |
8540 KB |
Output is correct |
115 |
Correct |
608 ms |
20704 KB |
Output is correct |
116 |
Correct |
366 ms |
15444 KB |
Output is correct |
117 |
Correct |
389 ms |
15736 KB |
Output is correct |
118 |
Correct |
389 ms |
15440 KB |
Output is correct |
119 |
Correct |
722 ms |
20820 KB |
Output is correct |
120 |
Correct |
909 ms |
20416 KB |
Output is correct |
121 |
Correct |
951 ms |
20820 KB |
Output is correct |
122 |
Correct |
795 ms |
20240 KB |
Output is correct |
123 |
Correct |
782 ms |
19940 KB |
Output is correct |
124 |
Correct |
824 ms |
21700 KB |
Output is correct |
125 |
Correct |
975 ms |
21868 KB |
Output is correct |
126 |
Correct |
2 ms |
12632 KB |
Output is correct |
127 |
Correct |
2 ms |
12636 KB |
Output is correct |
128 |
Correct |
3 ms |
12636 KB |
Output is correct |
129 |
Correct |
2 ms |
12636 KB |
Output is correct |
130 |
Correct |
3 ms |
12636 KB |
Output is correct |
131 |
Correct |
14 ms |
12868 KB |
Output is correct |
132 |
Execution timed out |
4040 ms |
45364 KB |
Time limit exceeded |
133 |
Halted |
0 ms |
0 KB |
- |