#include<bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 300010;
const int M = 20;
int n, m;
int a[N];
int pr[(1 << M)][5];
vector<int> v[(1 << M)];
void add(int i) {
int x = (((1 << m) - 1) ^ a[i]);
if((int)v[x].size() == 2) return;
for(int msk = x; msk > 0; msk = ((msk - 1) & x)) {
if(v[msk].size() == 2) continue;
if(v[msk].empty() || v[msk].back() != i)
v[msk].push_back(i);
}
}
int func(int msk, int i) {
return __builtin_popcount((msk & a[i]));
}
int T = (1 << 0) + (1 << 3) + (1 << 6) + (1 << 7) + (1 << 8) + (1 << 10);
void add1(int msk, int i) {
// if(msk == T) cout << i << ' ' << func(msk, i) << '\n';
if(pr[msk][0] == i || pr[msk][1] == i) return;
pr[msk][2] = i;
if(func(msk, pr[msk][2]) < func(msk, pr[msk][1]))
swap(pr[msk][1], pr[msk][2]);
if(func(msk, pr[msk][1]) < func(msk, pr[msk][0]))
swap(pr[msk][0], pr[msk][1]);
if(func(msk, pr[msk][2]) < func(msk, pr[msk][1]))
swap(pr[msk][1], pr[msk][2]);
}
void print(int x) {
for(int j = 0; j < m; j++)
cout << ((x >> j) & 1);
cout << '\n';
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);cout.tie(0);
cin >> n >> m;
vector<int> cnt(m);
for(int i = 0; i < n; i++) {
for(int j = 0; j < m; j++) {
bool bt;
cin >> bt;
if(bt) {
a[i] |= (1 << j);
cnt[j]++;
}
}
}
if(n <= 3000) {
for(int i = 0; i < n; i++) {
for(int k = 0; k < m; k++)
if(a[i] >> k & 1)
cnt[k]--;
int ans = 0;
for(int j = 0; j < n; j++) {
if(i == j) continue;
int kol = 0;
for(int k = 0; k < m; k++) {
if(cnt[k] - (a[j] >> k & 1) >= n / 2)
kol++;
}
ans = max(ans, kol);
}
for(int k = 0; k < m; k++)
if(a[i] >> k & 1)
cnt[k]++;
cout << ans << '\n';
}
return 0;
}
for(int i = 0; i < n; i++)
add(i);
for(int msk = 0; msk < (1 << m); msk++) {
pr[msk][0] = 0; pr[msk][1] = 1;
for(int x = msk; x > 0; x = ((x - 1) & msk)) {
for(int c : v[x]) {
add1(msk, c);
}
}
}
for(int i = 0; i < n; i++) {
int msk = 0, ans = 0;
for(int j = 0; j < m; j++) {
int x = cnt[j] - (a[i] >> j & 1);
if(x >= n / 2) ans++;
if(x == n / 2)
msk |= (1 << j);
}
int k = pr[msk][(pr[msk][0] == i)];
ans -= func(msk, k);
cout << ans << '\n';
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
13 ms |
24916 KB |
Output is correct |
2 |
Correct |
16 ms |
24952 KB |
Output is correct |
3 |
Correct |
14 ms |
24860 KB |
Output is correct |
4 |
Correct |
13 ms |
24868 KB |
Output is correct |
5 |
Correct |
13 ms |
24916 KB |
Output is correct |
6 |
Correct |
16 ms |
24916 KB |
Output is correct |
7 |
Correct |
13 ms |
24960 KB |
Output is correct |
8 |
Correct |
13 ms |
24916 KB |
Output is correct |
9 |
Correct |
15 ms |
24960 KB |
Output is correct |
10 |
Correct |
17 ms |
24952 KB |
Output is correct |
11 |
Correct |
13 ms |
24952 KB |
Output is correct |
12 |
Correct |
15 ms |
24956 KB |
Output is correct |
13 |
Correct |
13 ms |
24916 KB |
Output is correct |
14 |
Correct |
13 ms |
24916 KB |
Output is correct |
15 |
Correct |
13 ms |
24920 KB |
Output is correct |
16 |
Correct |
16 ms |
24952 KB |
Output is correct |
17 |
Correct |
15 ms |
24928 KB |
Output is correct |
18 |
Correct |
15 ms |
24940 KB |
Output is correct |
19 |
Correct |
12 ms |
24908 KB |
Output is correct |
20 |
Correct |
15 ms |
24888 KB |
Output is correct |
21 |
Correct |
14 ms |
24948 KB |
Output is correct |
22 |
Correct |
13 ms |
24948 KB |
Output is correct |
23 |
Correct |
13 ms |
24916 KB |
Output is correct |
24 |
Correct |
13 ms |
24916 KB |
Output is correct |
25 |
Correct |
12 ms |
24852 KB |
Output is correct |
26 |
Correct |
16 ms |
24932 KB |
Output is correct |
27 |
Correct |
13 ms |
24916 KB |
Output is correct |
28 |
Correct |
16 ms |
24936 KB |
Output is correct |
29 |
Correct |
15 ms |
24820 KB |
Output is correct |
30 |
Correct |
13 ms |
24916 KB |
Output is correct |
31 |
Correct |
13 ms |
24916 KB |
Output is correct |
32 |
Correct |
12 ms |
24948 KB |
Output is correct |
33 |
Correct |
12 ms |
24916 KB |
Output is correct |
34 |
Correct |
15 ms |
24948 KB |
Output is correct |
35 |
Correct |
12 ms |
24952 KB |
Output is correct |
36 |
Correct |
12 ms |
24916 KB |
Output is correct |
37 |
Correct |
12 ms |
24948 KB |
Output is correct |
38 |
Correct |
13 ms |
24916 KB |
Output is correct |
39 |
Correct |
14 ms |
24860 KB |
Output is correct |
40 |
Correct |
15 ms |
24944 KB |
Output is correct |
41 |
Correct |
13 ms |
24916 KB |
Output is correct |
42 |
Correct |
14 ms |
24916 KB |
Output is correct |
43 |
Correct |
16 ms |
24948 KB |
Output is correct |
44 |
Correct |
16 ms |
24952 KB |
Output is correct |
45 |
Correct |
14 ms |
24928 KB |
Output is correct |
46 |
Correct |
12 ms |
24888 KB |
Output is correct |
47 |
Correct |
14 ms |
24916 KB |
Output is correct |
48 |
Correct |
13 ms |
24916 KB |
Output is correct |
49 |
Correct |
13 ms |
24924 KB |
Output is correct |
50 |
Correct |
12 ms |
24916 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
13 ms |
24916 KB |
Output is correct |
2 |
Correct |
16 ms |
24952 KB |
Output is correct |
3 |
Correct |
14 ms |
24860 KB |
Output is correct |
4 |
Correct |
13 ms |
24868 KB |
Output is correct |
5 |
Correct |
13 ms |
24916 KB |
Output is correct |
6 |
Correct |
16 ms |
24916 KB |
Output is correct |
7 |
Correct |
13 ms |
24960 KB |
Output is correct |
8 |
Correct |
13 ms |
24916 KB |
Output is correct |
9 |
Correct |
15 ms |
24960 KB |
Output is correct |
10 |
Correct |
17 ms |
24952 KB |
Output is correct |
11 |
Correct |
13 ms |
24952 KB |
Output is correct |
12 |
Correct |
15 ms |
24956 KB |
Output is correct |
13 |
Correct |
13 ms |
24916 KB |
Output is correct |
14 |
Correct |
13 ms |
24916 KB |
Output is correct |
15 |
Correct |
13 ms |
24920 KB |
Output is correct |
16 |
Correct |
16 ms |
24952 KB |
Output is correct |
17 |
Correct |
15 ms |
24928 KB |
Output is correct |
18 |
Correct |
15 ms |
24940 KB |
Output is correct |
19 |
Correct |
12 ms |
24908 KB |
Output is correct |
20 |
Correct |
15 ms |
24888 KB |
Output is correct |
21 |
Correct |
14 ms |
24948 KB |
Output is correct |
22 |
Correct |
13 ms |
24948 KB |
Output is correct |
23 |
Correct |
13 ms |
24916 KB |
Output is correct |
24 |
Correct |
13 ms |
24916 KB |
Output is correct |
25 |
Correct |
12 ms |
24852 KB |
Output is correct |
26 |
Correct |
16 ms |
24932 KB |
Output is correct |
27 |
Correct |
13 ms |
24916 KB |
Output is correct |
28 |
Correct |
16 ms |
24936 KB |
Output is correct |
29 |
Correct |
15 ms |
24820 KB |
Output is correct |
30 |
Correct |
13 ms |
24916 KB |
Output is correct |
31 |
Correct |
13 ms |
24916 KB |
Output is correct |
32 |
Correct |
12 ms |
24948 KB |
Output is correct |
33 |
Correct |
12 ms |
24916 KB |
Output is correct |
34 |
Correct |
15 ms |
24948 KB |
Output is correct |
35 |
Correct |
12 ms |
24952 KB |
Output is correct |
36 |
Correct |
12 ms |
24916 KB |
Output is correct |
37 |
Correct |
12 ms |
24948 KB |
Output is correct |
38 |
Correct |
13 ms |
24916 KB |
Output is correct |
39 |
Correct |
14 ms |
24860 KB |
Output is correct |
40 |
Correct |
15 ms |
24944 KB |
Output is correct |
41 |
Correct |
13 ms |
24916 KB |
Output is correct |
42 |
Correct |
14 ms |
24916 KB |
Output is correct |
43 |
Correct |
16 ms |
24948 KB |
Output is correct |
44 |
Correct |
16 ms |
24952 KB |
Output is correct |
45 |
Correct |
14 ms |
24928 KB |
Output is correct |
46 |
Correct |
12 ms |
24888 KB |
Output is correct |
47 |
Correct |
14 ms |
24916 KB |
Output is correct |
48 |
Correct |
13 ms |
24916 KB |
Output is correct |
49 |
Correct |
13 ms |
24924 KB |
Output is correct |
50 |
Correct |
12 ms |
24916 KB |
Output is correct |
51 |
Correct |
215 ms |
25084 KB |
Output is correct |
52 |
Correct |
205 ms |
25064 KB |
Output is correct |
53 |
Correct |
189 ms |
25080 KB |
Output is correct |
54 |
Correct |
191 ms |
25080 KB |
Output is correct |
55 |
Correct |
45 ms |
24976 KB |
Output is correct |
56 |
Correct |
191 ms |
25056 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
14 ms |
24916 KB |
Output is correct |
2 |
Correct |
61 ms |
27872 KB |
Output is correct |
3 |
Correct |
56 ms |
26620 KB |
Output is correct |
4 |
Correct |
49 ms |
27292 KB |
Output is correct |
5 |
Correct |
62 ms |
27864 KB |
Output is correct |
6 |
Correct |
50 ms |
27304 KB |
Output is correct |
7 |
Correct |
73 ms |
27776 KB |
Output is correct |
8 |
Correct |
12 ms |
24916 KB |
Output is correct |
9 |
Correct |
12 ms |
24956 KB |
Output is correct |
10 |
Correct |
12 ms |
24916 KB |
Output is correct |
11 |
Correct |
12 ms |
24948 KB |
Output is correct |
12 |
Correct |
15 ms |
24860 KB |
Output is correct |
13 |
Correct |
12 ms |
24916 KB |
Output is correct |
14 |
Correct |
16 ms |
24868 KB |
Output is correct |
15 |
Correct |
12 ms |
24944 KB |
Output is correct |
16 |
Correct |
12 ms |
24956 KB |
Output is correct |
17 |
Correct |
42 ms |
25088 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
14 ms |
24916 KB |
Output is correct |
2 |
Correct |
61 ms |
27872 KB |
Output is correct |
3 |
Correct |
56 ms |
26620 KB |
Output is correct |
4 |
Correct |
49 ms |
27292 KB |
Output is correct |
5 |
Correct |
62 ms |
27864 KB |
Output is correct |
6 |
Correct |
50 ms |
27304 KB |
Output is correct |
7 |
Correct |
73 ms |
27776 KB |
Output is correct |
8 |
Correct |
12 ms |
24916 KB |
Output is correct |
9 |
Correct |
12 ms |
24956 KB |
Output is correct |
10 |
Correct |
12 ms |
24916 KB |
Output is correct |
11 |
Correct |
12 ms |
24948 KB |
Output is correct |
12 |
Correct |
15 ms |
24860 KB |
Output is correct |
13 |
Correct |
12 ms |
24916 KB |
Output is correct |
14 |
Correct |
16 ms |
24868 KB |
Output is correct |
15 |
Correct |
12 ms |
24944 KB |
Output is correct |
16 |
Correct |
12 ms |
24956 KB |
Output is correct |
17 |
Correct |
42 ms |
25088 KB |
Output is correct |
18 |
Correct |
14 ms |
24916 KB |
Output is correct |
19 |
Correct |
14 ms |
24944 KB |
Output is correct |
20 |
Correct |
199 ms |
28928 KB |
Output is correct |
21 |
Correct |
178 ms |
28896 KB |
Output is correct |
22 |
Correct |
181 ms |
28832 KB |
Output is correct |
23 |
Correct |
185 ms |
29112 KB |
Output is correct |
24 |
Correct |
164 ms |
27668 KB |
Output is correct |
25 |
Correct |
194 ms |
28876 KB |
Output is correct |
26 |
Correct |
193 ms |
29548 KB |
Output is correct |
27 |
Correct |
11 ms |
24952 KB |
Output is correct |
28 |
Correct |
16 ms |
25040 KB |
Output is correct |
29 |
Correct |
13 ms |
24916 KB |
Output is correct |
30 |
Correct |
15 ms |
24864 KB |
Output is correct |
31 |
Correct |
14 ms |
24880 KB |
Output is correct |
32 |
Correct |
14 ms |
24864 KB |
Output is correct |
33 |
Correct |
16 ms |
24948 KB |
Output is correct |
34 |
Correct |
13 ms |
24916 KB |
Output is correct |
35 |
Correct |
13 ms |
24916 KB |
Output is correct |
36 |
Correct |
14 ms |
24916 KB |
Output is correct |
37 |
Correct |
13 ms |
24920 KB |
Output is correct |
38 |
Correct |
12 ms |
24948 KB |
Output is correct |
39 |
Correct |
12 ms |
24848 KB |
Output is correct |
40 |
Correct |
13 ms |
24892 KB |
Output is correct |
41 |
Correct |
16 ms |
24884 KB |
Output is correct |
42 |
Correct |
13 ms |
24932 KB |
Output is correct |
43 |
Correct |
13 ms |
24896 KB |
Output is correct |
44 |
Correct |
13 ms |
24948 KB |
Output is correct |
45 |
Correct |
17 ms |
24916 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
14 ms |
24916 KB |
Output is correct |
2 |
Correct |
61 ms |
27872 KB |
Output is correct |
3 |
Correct |
56 ms |
26620 KB |
Output is correct |
4 |
Correct |
49 ms |
27292 KB |
Output is correct |
5 |
Correct |
62 ms |
27864 KB |
Output is correct |
6 |
Correct |
50 ms |
27304 KB |
Output is correct |
7 |
Correct |
73 ms |
27776 KB |
Output is correct |
8 |
Correct |
12 ms |
24916 KB |
Output is correct |
9 |
Correct |
12 ms |
24956 KB |
Output is correct |
10 |
Correct |
12 ms |
24916 KB |
Output is correct |
11 |
Correct |
12 ms |
24948 KB |
Output is correct |
12 |
Correct |
15 ms |
24860 KB |
Output is correct |
13 |
Correct |
12 ms |
24916 KB |
Output is correct |
14 |
Correct |
16 ms |
24868 KB |
Output is correct |
15 |
Correct |
12 ms |
24944 KB |
Output is correct |
16 |
Correct |
12 ms |
24956 KB |
Output is correct |
17 |
Correct |
42 ms |
25088 KB |
Output is correct |
18 |
Correct |
14 ms |
24916 KB |
Output is correct |
19 |
Correct |
14 ms |
24944 KB |
Output is correct |
20 |
Correct |
199 ms |
28928 KB |
Output is correct |
21 |
Correct |
178 ms |
28896 KB |
Output is correct |
22 |
Correct |
181 ms |
28832 KB |
Output is correct |
23 |
Correct |
185 ms |
29112 KB |
Output is correct |
24 |
Correct |
164 ms |
27668 KB |
Output is correct |
25 |
Correct |
194 ms |
28876 KB |
Output is correct |
26 |
Correct |
193 ms |
29548 KB |
Output is correct |
27 |
Correct |
11 ms |
24952 KB |
Output is correct |
28 |
Correct |
16 ms |
25040 KB |
Output is correct |
29 |
Correct |
13 ms |
24916 KB |
Output is correct |
30 |
Correct |
15 ms |
24864 KB |
Output is correct |
31 |
Correct |
14 ms |
24880 KB |
Output is correct |
32 |
Correct |
14 ms |
24864 KB |
Output is correct |
33 |
Correct |
16 ms |
24948 KB |
Output is correct |
34 |
Correct |
13 ms |
24916 KB |
Output is correct |
35 |
Correct |
13 ms |
24916 KB |
Output is correct |
36 |
Correct |
14 ms |
24916 KB |
Output is correct |
37 |
Correct |
13 ms |
24920 KB |
Output is correct |
38 |
Correct |
12 ms |
24948 KB |
Output is correct |
39 |
Correct |
12 ms |
24848 KB |
Output is correct |
40 |
Correct |
13 ms |
24892 KB |
Output is correct |
41 |
Correct |
16 ms |
24884 KB |
Output is correct |
42 |
Correct |
13 ms |
24932 KB |
Output is correct |
43 |
Correct |
13 ms |
24896 KB |
Output is correct |
44 |
Correct |
13 ms |
24948 KB |
Output is correct |
45 |
Correct |
17 ms |
24916 KB |
Output is correct |
46 |
Correct |
14 ms |
24944 KB |
Output is correct |
47 |
Correct |
395 ms |
30320 KB |
Output is correct |
48 |
Correct |
285 ms |
29960 KB |
Output is correct |
49 |
Correct |
280 ms |
30028 KB |
Output is correct |
50 |
Correct |
242 ms |
30224 KB |
Output is correct |
51 |
Correct |
271 ms |
29260 KB |
Output is correct |
52 |
Correct |
350 ms |
30372 KB |
Output is correct |
53 |
Correct |
360 ms |
30656 KB |
Output is correct |
54 |
Correct |
13 ms |
24976 KB |
Output is correct |
55 |
Correct |
13 ms |
24916 KB |
Output is correct |
56 |
Correct |
13 ms |
24960 KB |
Output is correct |
57 |
Correct |
13 ms |
24860 KB |
Output is correct |
58 |
Correct |
13 ms |
24956 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
14 ms |
24916 KB |
Output is correct |
2 |
Correct |
61 ms |
27872 KB |
Output is correct |
3 |
Correct |
56 ms |
26620 KB |
Output is correct |
4 |
Correct |
49 ms |
27292 KB |
Output is correct |
5 |
Correct |
62 ms |
27864 KB |
Output is correct |
6 |
Correct |
50 ms |
27304 KB |
Output is correct |
7 |
Correct |
73 ms |
27776 KB |
Output is correct |
8 |
Correct |
12 ms |
24916 KB |
Output is correct |
9 |
Correct |
12 ms |
24956 KB |
Output is correct |
10 |
Correct |
12 ms |
24916 KB |
Output is correct |
11 |
Correct |
12 ms |
24948 KB |
Output is correct |
12 |
Correct |
15 ms |
24860 KB |
Output is correct |
13 |
Correct |
12 ms |
24916 KB |
Output is correct |
14 |
Correct |
16 ms |
24868 KB |
Output is correct |
15 |
Correct |
12 ms |
24944 KB |
Output is correct |
16 |
Correct |
12 ms |
24956 KB |
Output is correct |
17 |
Correct |
42 ms |
25088 KB |
Output is correct |
18 |
Correct |
14 ms |
24916 KB |
Output is correct |
19 |
Correct |
14 ms |
24944 KB |
Output is correct |
20 |
Correct |
199 ms |
28928 KB |
Output is correct |
21 |
Correct |
178 ms |
28896 KB |
Output is correct |
22 |
Correct |
181 ms |
28832 KB |
Output is correct |
23 |
Correct |
185 ms |
29112 KB |
Output is correct |
24 |
Correct |
164 ms |
27668 KB |
Output is correct |
25 |
Correct |
194 ms |
28876 KB |
Output is correct |
26 |
Correct |
193 ms |
29548 KB |
Output is correct |
27 |
Correct |
11 ms |
24952 KB |
Output is correct |
28 |
Correct |
16 ms |
25040 KB |
Output is correct |
29 |
Correct |
13 ms |
24916 KB |
Output is correct |
30 |
Correct |
15 ms |
24864 KB |
Output is correct |
31 |
Correct |
14 ms |
24880 KB |
Output is correct |
32 |
Correct |
14 ms |
24864 KB |
Output is correct |
33 |
Correct |
16 ms |
24948 KB |
Output is correct |
34 |
Correct |
13 ms |
24916 KB |
Output is correct |
35 |
Correct |
13 ms |
24916 KB |
Output is correct |
36 |
Correct |
14 ms |
24916 KB |
Output is correct |
37 |
Correct |
13 ms |
24920 KB |
Output is correct |
38 |
Correct |
12 ms |
24948 KB |
Output is correct |
39 |
Correct |
12 ms |
24848 KB |
Output is correct |
40 |
Correct |
13 ms |
24892 KB |
Output is correct |
41 |
Correct |
16 ms |
24884 KB |
Output is correct |
42 |
Correct |
13 ms |
24932 KB |
Output is correct |
43 |
Correct |
13 ms |
24896 KB |
Output is correct |
44 |
Correct |
13 ms |
24948 KB |
Output is correct |
45 |
Correct |
17 ms |
24916 KB |
Output is correct |
46 |
Correct |
14 ms |
24944 KB |
Output is correct |
47 |
Correct |
395 ms |
30320 KB |
Output is correct |
48 |
Correct |
285 ms |
29960 KB |
Output is correct |
49 |
Correct |
280 ms |
30028 KB |
Output is correct |
50 |
Correct |
242 ms |
30224 KB |
Output is correct |
51 |
Correct |
271 ms |
29260 KB |
Output is correct |
52 |
Correct |
350 ms |
30372 KB |
Output is correct |
53 |
Correct |
360 ms |
30656 KB |
Output is correct |
54 |
Correct |
13 ms |
24976 KB |
Output is correct |
55 |
Correct |
13 ms |
24916 KB |
Output is correct |
56 |
Correct |
13 ms |
24960 KB |
Output is correct |
57 |
Correct |
13 ms |
24860 KB |
Output is correct |
58 |
Correct |
13 ms |
24956 KB |
Output is correct |
59 |
Correct |
1412 ms |
32300 KB |
Output is correct |
60 |
Correct |
3260 ms |
34868 KB |
Output is correct |
61 |
Correct |
3276 ms |
35084 KB |
Output is correct |
62 |
Correct |
3343 ms |
35240 KB |
Output is correct |
63 |
Correct |
1395 ms |
32780 KB |
Output is correct |
64 |
Correct |
3732 ms |
35100 KB |
Output is correct |
65 |
Correct |
3684 ms |
35288 KB |
Output is correct |
66 |
Correct |
469 ms |
32340 KB |
Output is correct |
67 |
Correct |
1335 ms |
34976 KB |
Output is correct |
68 |
Correct |
3722 ms |
36160 KB |
Output is correct |
69 |
Correct |
3566 ms |
36348 KB |
Output is correct |
70 |
Correct |
16 ms |
24916 KB |
Output is correct |
71 |
Correct |
13 ms |
24948 KB |
Output is correct |
72 |
Correct |
14 ms |
24880 KB |
Output is correct |
73 |
Correct |
13 ms |
24936 KB |
Output is correct |
74 |
Correct |
14 ms |
24908 KB |
Output is correct |
75 |
Correct |
163 ms |
25056 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
13 ms |
24916 KB |
Output is correct |
2 |
Correct |
16 ms |
24952 KB |
Output is correct |
3 |
Correct |
14 ms |
24860 KB |
Output is correct |
4 |
Correct |
13 ms |
24868 KB |
Output is correct |
5 |
Correct |
13 ms |
24916 KB |
Output is correct |
6 |
Correct |
16 ms |
24916 KB |
Output is correct |
7 |
Correct |
13 ms |
24960 KB |
Output is correct |
8 |
Correct |
13 ms |
24916 KB |
Output is correct |
9 |
Correct |
15 ms |
24960 KB |
Output is correct |
10 |
Correct |
17 ms |
24952 KB |
Output is correct |
11 |
Correct |
13 ms |
24952 KB |
Output is correct |
12 |
Correct |
15 ms |
24956 KB |
Output is correct |
13 |
Correct |
13 ms |
24916 KB |
Output is correct |
14 |
Correct |
13 ms |
24916 KB |
Output is correct |
15 |
Correct |
13 ms |
24920 KB |
Output is correct |
16 |
Correct |
16 ms |
24952 KB |
Output is correct |
17 |
Correct |
15 ms |
24928 KB |
Output is correct |
18 |
Correct |
15 ms |
24940 KB |
Output is correct |
19 |
Correct |
12 ms |
24908 KB |
Output is correct |
20 |
Correct |
15 ms |
24888 KB |
Output is correct |
21 |
Correct |
14 ms |
24948 KB |
Output is correct |
22 |
Correct |
13 ms |
24948 KB |
Output is correct |
23 |
Correct |
13 ms |
24916 KB |
Output is correct |
24 |
Correct |
13 ms |
24916 KB |
Output is correct |
25 |
Correct |
12 ms |
24852 KB |
Output is correct |
26 |
Correct |
16 ms |
24932 KB |
Output is correct |
27 |
Correct |
13 ms |
24916 KB |
Output is correct |
28 |
Correct |
16 ms |
24936 KB |
Output is correct |
29 |
Correct |
15 ms |
24820 KB |
Output is correct |
30 |
Correct |
13 ms |
24916 KB |
Output is correct |
31 |
Correct |
13 ms |
24916 KB |
Output is correct |
32 |
Correct |
12 ms |
24948 KB |
Output is correct |
33 |
Correct |
12 ms |
24916 KB |
Output is correct |
34 |
Correct |
15 ms |
24948 KB |
Output is correct |
35 |
Correct |
12 ms |
24952 KB |
Output is correct |
36 |
Correct |
12 ms |
24916 KB |
Output is correct |
37 |
Correct |
12 ms |
24948 KB |
Output is correct |
38 |
Correct |
13 ms |
24916 KB |
Output is correct |
39 |
Correct |
14 ms |
24860 KB |
Output is correct |
40 |
Correct |
15 ms |
24944 KB |
Output is correct |
41 |
Correct |
13 ms |
24916 KB |
Output is correct |
42 |
Correct |
14 ms |
24916 KB |
Output is correct |
43 |
Correct |
16 ms |
24948 KB |
Output is correct |
44 |
Correct |
16 ms |
24952 KB |
Output is correct |
45 |
Correct |
14 ms |
24928 KB |
Output is correct |
46 |
Correct |
12 ms |
24888 KB |
Output is correct |
47 |
Correct |
14 ms |
24916 KB |
Output is correct |
48 |
Correct |
13 ms |
24916 KB |
Output is correct |
49 |
Correct |
13 ms |
24924 KB |
Output is correct |
50 |
Correct |
12 ms |
24916 KB |
Output is correct |
51 |
Correct |
215 ms |
25084 KB |
Output is correct |
52 |
Correct |
205 ms |
25064 KB |
Output is correct |
53 |
Correct |
189 ms |
25080 KB |
Output is correct |
54 |
Correct |
191 ms |
25080 KB |
Output is correct |
55 |
Correct |
45 ms |
24976 KB |
Output is correct |
56 |
Correct |
191 ms |
25056 KB |
Output is correct |
57 |
Correct |
14 ms |
24916 KB |
Output is correct |
58 |
Correct |
61 ms |
27872 KB |
Output is correct |
59 |
Correct |
56 ms |
26620 KB |
Output is correct |
60 |
Correct |
49 ms |
27292 KB |
Output is correct |
61 |
Correct |
62 ms |
27864 KB |
Output is correct |
62 |
Correct |
50 ms |
27304 KB |
Output is correct |
63 |
Correct |
73 ms |
27776 KB |
Output is correct |
64 |
Correct |
12 ms |
24916 KB |
Output is correct |
65 |
Correct |
12 ms |
24956 KB |
Output is correct |
66 |
Correct |
12 ms |
24916 KB |
Output is correct |
67 |
Correct |
12 ms |
24948 KB |
Output is correct |
68 |
Correct |
15 ms |
24860 KB |
Output is correct |
69 |
Correct |
12 ms |
24916 KB |
Output is correct |
70 |
Correct |
16 ms |
24868 KB |
Output is correct |
71 |
Correct |
12 ms |
24944 KB |
Output is correct |
72 |
Correct |
12 ms |
24956 KB |
Output is correct |
73 |
Correct |
42 ms |
25088 KB |
Output is correct |
74 |
Correct |
14 ms |
24916 KB |
Output is correct |
75 |
Correct |
14 ms |
24944 KB |
Output is correct |
76 |
Correct |
199 ms |
28928 KB |
Output is correct |
77 |
Correct |
178 ms |
28896 KB |
Output is correct |
78 |
Correct |
181 ms |
28832 KB |
Output is correct |
79 |
Correct |
185 ms |
29112 KB |
Output is correct |
80 |
Correct |
164 ms |
27668 KB |
Output is correct |
81 |
Correct |
194 ms |
28876 KB |
Output is correct |
82 |
Correct |
193 ms |
29548 KB |
Output is correct |
83 |
Correct |
11 ms |
24952 KB |
Output is correct |
84 |
Correct |
16 ms |
25040 KB |
Output is correct |
85 |
Correct |
13 ms |
24916 KB |
Output is correct |
86 |
Correct |
15 ms |
24864 KB |
Output is correct |
87 |
Correct |
14 ms |
24880 KB |
Output is correct |
88 |
Correct |
14 ms |
24864 KB |
Output is correct |
89 |
Correct |
16 ms |
24948 KB |
Output is correct |
90 |
Correct |
13 ms |
24916 KB |
Output is correct |
91 |
Correct |
13 ms |
24916 KB |
Output is correct |
92 |
Correct |
14 ms |
24916 KB |
Output is correct |
93 |
Correct |
13 ms |
24920 KB |
Output is correct |
94 |
Correct |
12 ms |
24948 KB |
Output is correct |
95 |
Correct |
12 ms |
24848 KB |
Output is correct |
96 |
Correct |
13 ms |
24892 KB |
Output is correct |
97 |
Correct |
16 ms |
24884 KB |
Output is correct |
98 |
Correct |
13 ms |
24932 KB |
Output is correct |
99 |
Correct |
13 ms |
24896 KB |
Output is correct |
100 |
Correct |
13 ms |
24948 KB |
Output is correct |
101 |
Correct |
17 ms |
24916 KB |
Output is correct |
102 |
Correct |
14 ms |
24944 KB |
Output is correct |
103 |
Correct |
395 ms |
30320 KB |
Output is correct |
104 |
Correct |
285 ms |
29960 KB |
Output is correct |
105 |
Correct |
280 ms |
30028 KB |
Output is correct |
106 |
Correct |
242 ms |
30224 KB |
Output is correct |
107 |
Correct |
271 ms |
29260 KB |
Output is correct |
108 |
Correct |
350 ms |
30372 KB |
Output is correct |
109 |
Correct |
360 ms |
30656 KB |
Output is correct |
110 |
Correct |
13 ms |
24976 KB |
Output is correct |
111 |
Correct |
13 ms |
24916 KB |
Output is correct |
112 |
Correct |
13 ms |
24960 KB |
Output is correct |
113 |
Correct |
13 ms |
24860 KB |
Output is correct |
114 |
Correct |
13 ms |
24956 KB |
Output is correct |
115 |
Correct |
1412 ms |
32300 KB |
Output is correct |
116 |
Correct |
3260 ms |
34868 KB |
Output is correct |
117 |
Correct |
3276 ms |
35084 KB |
Output is correct |
118 |
Correct |
3343 ms |
35240 KB |
Output is correct |
119 |
Correct |
1395 ms |
32780 KB |
Output is correct |
120 |
Correct |
3732 ms |
35100 KB |
Output is correct |
121 |
Correct |
3684 ms |
35288 KB |
Output is correct |
122 |
Correct |
469 ms |
32340 KB |
Output is correct |
123 |
Correct |
1335 ms |
34976 KB |
Output is correct |
124 |
Correct |
3722 ms |
36160 KB |
Output is correct |
125 |
Correct |
3566 ms |
36348 KB |
Output is correct |
126 |
Correct |
16 ms |
24916 KB |
Output is correct |
127 |
Correct |
13 ms |
24948 KB |
Output is correct |
128 |
Correct |
14 ms |
24880 KB |
Output is correct |
129 |
Correct |
13 ms |
24936 KB |
Output is correct |
130 |
Correct |
14 ms |
24908 KB |
Output is correct |
131 |
Correct |
163 ms |
25056 KB |
Output is correct |
132 |
Execution timed out |
4027 ms |
68328 KB |
Time limit exceeded |
133 |
Halted |
0 ms |
0 KB |
- |