#include <bits/stdc++.h>
#define ll long long
#define name "Council"
#define cntbit(x) __builtin_popcountll(x)
#define getbit(x, i) ((x >> i)&1)
#define all(x) x.begin(), x.end()
#define fi(i, a, b) for(int i = a; i <= b; ++i)
#define fid(i, a, b) for(int i = a; i >= b; --i)
#define maxn (int) (1e6 + 7)
using namespace std;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll GetRandom(ll l, ll r) {
return uniform_int_distribution<ll> (l, r)(rng);
}
int n, m, zero, one, two;
int c[maxn], a[maxn];
vector<pair<int, int>> f[1 << 20], cnt[1 << 20];
int rv(int x) { return ((1 << m) - 1) ^ x; }
void inline cb(vector<pair<int, int>> &x, const vector<pair<int, int>> y) {
vector<pair<int, int>> P;
P.insert(P.end(), all(x));
P.insert(P.end(), all(y));
x.clear();
sort(all(P), greater<>());
for(pair<int, int> val : P) if(x.size() < 2) {
if(x.empty() || x.back().second != val.second) x.push_back(val);
}
}
void solve() {
cin >> n >> m;
fi(id, 1, n) {
fi(i, 0, m - 1) {
int x; cin >> x;
a[id] |= (1 << i) * x;
c[i] += x;
}
cb(cnt[rv(a[id])], {{0, id}});
}
fi(i, 0, m - 1) {
if(c[i] == n / 2) zero |= (1 << i);
if(c[i] == n / 2 + 1) one |= (1 << i);
if(c[i] >= n / 2 + 2) two |= (1 << i);
}
fi(i, 0, m - 1) {
fi(x, 0, (1 << m) - 1) if(!getbit(x, i)) {
cb(cnt[x], cnt[x ^ (1 << i)]);
}
}
fi(i, 0, (1 << m) - 1) {
int k = cntbit(i);
if(cnt[i].size() == 1) f[i] = {{ k, cnt[i][0].second }};
else if(cnt[i].size() > 1) {
f[i].push_back({k, cnt[i][0].second});
f[i].push_back({k, cnt[i][1].second});
}
}
fi(i, 0, m - 1) {
fi(x, 0, (1 << m) - 1) if(getbit(x, i)) {
cb(f[x], f[x ^ (1 << i)]);
}
}
fi(i, 1, n) {
int ONE = two | (one & rv(a[i]));
int ZERO = (one & a[i]) | (zero & rv(a[i]));
int ans = cntbit(ONE);
if(f[ZERO][0].second != i) ans += f[ZERO][0].first;
else ans += f[ZERO][1].first;
cout << ans << '\n';
}
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
if(fopen(name".inp", "r")) {
freopen(name".inp", "r", stdin);
freopen(name".out", "w", stdout);
}
solve();
}
Compilation message
council.cpp: In function 'int main()':
council.cpp:98:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
98 | freopen(name".inp", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
council.cpp:99:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
99 | freopen(name".out", "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
51944 KB |
Output is correct |
2 |
Correct |
11 ms |
51916 KB |
Output is correct |
3 |
Correct |
9 ms |
51792 KB |
Output is correct |
4 |
Correct |
10 ms |
51792 KB |
Output is correct |
5 |
Correct |
712 ms |
101040 KB |
Output is correct |
6 |
Correct |
300 ms |
84712 KB |
Output is correct |
7 |
Correct |
458 ms |
85988 KB |
Output is correct |
8 |
Correct |
545 ms |
85784 KB |
Output is correct |
9 |
Correct |
908 ms |
96004 KB |
Output is correct |
10 |
Correct |
470 ms |
85064 KB |
Output is correct |
11 |
Correct |
572 ms |
85320 KB |
Output is correct |
12 |
Correct |
889 ms |
95420 KB |
Output is correct |
13 |
Correct |
9 ms |
51792 KB |
Output is correct |
14 |
Correct |
9 ms |
49744 KB |
Output is correct |
15 |
Correct |
9 ms |
49912 KB |
Output is correct |
16 |
Correct |
9 ms |
51940 KB |
Output is correct |
17 |
Correct |
11 ms |
51792 KB |
Output is correct |
18 |
Correct |
9 ms |
51792 KB |
Output is correct |
19 |
Correct |
10 ms |
49744 KB |
Output is correct |
20 |
Correct |
9 ms |
49744 KB |
Output is correct |
21 |
Correct |
10 ms |
49848 KB |
Output is correct |
22 |
Correct |
12 ms |
49888 KB |
Output is correct |
23 |
Correct |
13 ms |
49820 KB |
Output is correct |
24 |
Correct |
16 ms |
49744 KB |
Output is correct |
25 |
Correct |
13 ms |
49744 KB |
Output is correct |
26 |
Correct |
18 ms |
49728 KB |
Output is correct |
27 |
Correct |
15 ms |
49744 KB |
Output is correct |
28 |
Correct |
14 ms |
49744 KB |
Output is correct |
29 |
Correct |
15 ms |
49768 KB |
Output is correct |
30 |
Correct |
15 ms |
49744 KB |
Output is correct |
31 |
Correct |
16 ms |
49928 KB |
Output is correct |
32 |
Correct |
12 ms |
49744 KB |
Output is correct |
33 |
Correct |
17 ms |
49744 KB |
Output is correct |
34 |
Correct |
10 ms |
51792 KB |
Output is correct |
35 |
Correct |
10 ms |
51792 KB |
Output is correct |
36 |
Correct |
9 ms |
51792 KB |
Output is correct |
37 |
Correct |
10 ms |
51804 KB |
Output is correct |
38 |
Correct |
10 ms |
49760 KB |
Output is correct |
39 |
Correct |
9 ms |
51792 KB |
Output is correct |
40 |
Correct |
11 ms |
51792 KB |
Output is correct |
41 |
Correct |
18 ms |
52560 KB |
Output is correct |
42 |
Correct |
15 ms |
52304 KB |
Output is correct |
43 |
Correct |
18 ms |
52560 KB |
Output is correct |
44 |
Correct |
16 ms |
52304 KB |
Output is correct |
45 |
Correct |
18 ms |
52584 KB |
Output is correct |
46 |
Correct |
96 ms |
57928 KB |
Output is correct |
47 |
Correct |
73 ms |
55884 KB |
Output is correct |
48 |
Correct |
76 ms |
56144 KB |
Output is correct |
49 |
Correct |
64 ms |
56024 KB |
Output is correct |
50 |
Correct |
88 ms |
56696 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
51944 KB |
Output is correct |
2 |
Correct |
11 ms |
51916 KB |
Output is correct |
3 |
Correct |
9 ms |
51792 KB |
Output is correct |
4 |
Correct |
10 ms |
51792 KB |
Output is correct |
5 |
Correct |
712 ms |
101040 KB |
Output is correct |
6 |
Correct |
300 ms |
84712 KB |
Output is correct |
7 |
Correct |
458 ms |
85988 KB |
Output is correct |
8 |
Correct |
545 ms |
85784 KB |
Output is correct |
9 |
Correct |
908 ms |
96004 KB |
Output is correct |
10 |
Correct |
470 ms |
85064 KB |
Output is correct |
11 |
Correct |
572 ms |
85320 KB |
Output is correct |
12 |
Correct |
889 ms |
95420 KB |
Output is correct |
13 |
Correct |
9 ms |
51792 KB |
Output is correct |
14 |
Correct |
9 ms |
49744 KB |
Output is correct |
15 |
Correct |
9 ms |
49912 KB |
Output is correct |
16 |
Correct |
9 ms |
51940 KB |
Output is correct |
17 |
Correct |
11 ms |
51792 KB |
Output is correct |
18 |
Correct |
9 ms |
51792 KB |
Output is correct |
19 |
Correct |
10 ms |
49744 KB |
Output is correct |
20 |
Correct |
9 ms |
49744 KB |
Output is correct |
21 |
Correct |
10 ms |
49848 KB |
Output is correct |
22 |
Correct |
12 ms |
49888 KB |
Output is correct |
23 |
Correct |
13 ms |
49820 KB |
Output is correct |
24 |
Correct |
16 ms |
49744 KB |
Output is correct |
25 |
Correct |
13 ms |
49744 KB |
Output is correct |
26 |
Correct |
18 ms |
49728 KB |
Output is correct |
27 |
Correct |
15 ms |
49744 KB |
Output is correct |
28 |
Correct |
14 ms |
49744 KB |
Output is correct |
29 |
Correct |
15 ms |
49768 KB |
Output is correct |
30 |
Correct |
15 ms |
49744 KB |
Output is correct |
31 |
Correct |
16 ms |
49928 KB |
Output is correct |
32 |
Correct |
12 ms |
49744 KB |
Output is correct |
33 |
Correct |
17 ms |
49744 KB |
Output is correct |
34 |
Correct |
10 ms |
51792 KB |
Output is correct |
35 |
Correct |
10 ms |
51792 KB |
Output is correct |
36 |
Correct |
9 ms |
51792 KB |
Output is correct |
37 |
Correct |
10 ms |
51804 KB |
Output is correct |
38 |
Correct |
10 ms |
49760 KB |
Output is correct |
39 |
Correct |
9 ms |
51792 KB |
Output is correct |
40 |
Correct |
11 ms |
51792 KB |
Output is correct |
41 |
Correct |
18 ms |
52560 KB |
Output is correct |
42 |
Correct |
15 ms |
52304 KB |
Output is correct |
43 |
Correct |
18 ms |
52560 KB |
Output is correct |
44 |
Correct |
16 ms |
52304 KB |
Output is correct |
45 |
Correct |
18 ms |
52584 KB |
Output is correct |
46 |
Correct |
96 ms |
57928 KB |
Output is correct |
47 |
Correct |
73 ms |
55884 KB |
Output is correct |
48 |
Correct |
76 ms |
56144 KB |
Output is correct |
49 |
Correct |
64 ms |
56024 KB |
Output is correct |
50 |
Correct |
88 ms |
56696 KB |
Output is correct |
51 |
Correct |
302 ms |
84808 KB |
Output is correct |
52 |
Correct |
997 ms |
117576 KB |
Output is correct |
53 |
Correct |
1166 ms |
117528 KB |
Output is correct |
54 |
Correct |
1116 ms |
111944 KB |
Output is correct |
55 |
Correct |
9 ms |
51960 KB |
Output is correct |
56 |
Correct |
163 ms |
59576 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
51904 KB |
Output is correct |
2 |
Correct |
61 ms |
55632 KB |
Output is correct |
3 |
Correct |
60 ms |
55624 KB |
Output is correct |
4 |
Correct |
52 ms |
54996 KB |
Output is correct |
5 |
Correct |
62 ms |
55624 KB |
Output is correct |
6 |
Correct |
69 ms |
54996 KB |
Output is correct |
7 |
Correct |
66 ms |
55628 KB |
Output is correct |
8 |
Correct |
9 ms |
51792 KB |
Output is correct |
9 |
Correct |
9 ms |
51792 KB |
Output is correct |
10 |
Correct |
10 ms |
51792 KB |
Output is correct |
11 |
Correct |
9 ms |
51792 KB |
Output is correct |
12 |
Correct |
10 ms |
51792 KB |
Output is correct |
13 |
Correct |
9 ms |
51792 KB |
Output is correct |
14 |
Correct |
9 ms |
51904 KB |
Output is correct |
15 |
Correct |
9 ms |
51792 KB |
Output is correct |
16 |
Correct |
10 ms |
51904 KB |
Output is correct |
17 |
Correct |
12 ms |
51792 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
51904 KB |
Output is correct |
2 |
Correct |
61 ms |
55632 KB |
Output is correct |
3 |
Correct |
60 ms |
55624 KB |
Output is correct |
4 |
Correct |
52 ms |
54996 KB |
Output is correct |
5 |
Correct |
62 ms |
55624 KB |
Output is correct |
6 |
Correct |
69 ms |
54996 KB |
Output is correct |
7 |
Correct |
66 ms |
55628 KB |
Output is correct |
8 |
Correct |
9 ms |
51792 KB |
Output is correct |
9 |
Correct |
9 ms |
51792 KB |
Output is correct |
10 |
Correct |
10 ms |
51792 KB |
Output is correct |
11 |
Correct |
9 ms |
51792 KB |
Output is correct |
12 |
Correct |
10 ms |
51792 KB |
Output is correct |
13 |
Correct |
9 ms |
51792 KB |
Output is correct |
14 |
Correct |
9 ms |
51904 KB |
Output is correct |
15 |
Correct |
9 ms |
51792 KB |
Output is correct |
16 |
Correct |
10 ms |
51904 KB |
Output is correct |
17 |
Correct |
12 ms |
51792 KB |
Output is correct |
18 |
Correct |
9 ms |
51792 KB |
Output is correct |
19 |
Correct |
9 ms |
51792 KB |
Output is correct |
20 |
Correct |
164 ms |
60488 KB |
Output is correct |
21 |
Correct |
147 ms |
59864 KB |
Output is correct |
22 |
Correct |
154 ms |
58596 KB |
Output is correct |
23 |
Correct |
145 ms |
60744 KB |
Output is correct |
24 |
Correct |
163 ms |
60368 KB |
Output is correct |
25 |
Correct |
155 ms |
60404 KB |
Output is correct |
26 |
Correct |
165 ms |
60488 KB |
Output is correct |
27 |
Correct |
10 ms |
51792 KB |
Output is correct |
28 |
Correct |
10 ms |
51792 KB |
Output is correct |
29 |
Correct |
9 ms |
51928 KB |
Output is correct |
30 |
Correct |
10 ms |
51792 KB |
Output is correct |
31 |
Correct |
11 ms |
51792 KB |
Output is correct |
32 |
Correct |
12 ms |
49744 KB |
Output is correct |
33 |
Correct |
11 ms |
51792 KB |
Output is correct |
34 |
Correct |
9 ms |
51792 KB |
Output is correct |
35 |
Correct |
13 ms |
49744 KB |
Output is correct |
36 |
Correct |
10 ms |
51792 KB |
Output is correct |
37 |
Correct |
10 ms |
49744 KB |
Output is correct |
38 |
Correct |
12 ms |
49744 KB |
Output is correct |
39 |
Correct |
12 ms |
49744 KB |
Output is correct |
40 |
Correct |
9 ms |
51792 KB |
Output is correct |
41 |
Correct |
8 ms |
49744 KB |
Output is correct |
42 |
Correct |
9 ms |
51804 KB |
Output is correct |
43 |
Correct |
9 ms |
51896 KB |
Output is correct |
44 |
Correct |
12 ms |
51792 KB |
Output is correct |
45 |
Correct |
10 ms |
51792 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
51904 KB |
Output is correct |
2 |
Correct |
61 ms |
55632 KB |
Output is correct |
3 |
Correct |
60 ms |
55624 KB |
Output is correct |
4 |
Correct |
52 ms |
54996 KB |
Output is correct |
5 |
Correct |
62 ms |
55624 KB |
Output is correct |
6 |
Correct |
69 ms |
54996 KB |
Output is correct |
7 |
Correct |
66 ms |
55628 KB |
Output is correct |
8 |
Correct |
9 ms |
51792 KB |
Output is correct |
9 |
Correct |
9 ms |
51792 KB |
Output is correct |
10 |
Correct |
10 ms |
51792 KB |
Output is correct |
11 |
Correct |
9 ms |
51792 KB |
Output is correct |
12 |
Correct |
10 ms |
51792 KB |
Output is correct |
13 |
Correct |
9 ms |
51792 KB |
Output is correct |
14 |
Correct |
9 ms |
51904 KB |
Output is correct |
15 |
Correct |
9 ms |
51792 KB |
Output is correct |
16 |
Correct |
10 ms |
51904 KB |
Output is correct |
17 |
Correct |
12 ms |
51792 KB |
Output is correct |
18 |
Correct |
9 ms |
51792 KB |
Output is correct |
19 |
Correct |
9 ms |
51792 KB |
Output is correct |
20 |
Correct |
164 ms |
60488 KB |
Output is correct |
21 |
Correct |
147 ms |
59864 KB |
Output is correct |
22 |
Correct |
154 ms |
58596 KB |
Output is correct |
23 |
Correct |
145 ms |
60744 KB |
Output is correct |
24 |
Correct |
163 ms |
60368 KB |
Output is correct |
25 |
Correct |
155 ms |
60404 KB |
Output is correct |
26 |
Correct |
165 ms |
60488 KB |
Output is correct |
27 |
Correct |
10 ms |
51792 KB |
Output is correct |
28 |
Correct |
10 ms |
51792 KB |
Output is correct |
29 |
Correct |
9 ms |
51928 KB |
Output is correct |
30 |
Correct |
10 ms |
51792 KB |
Output is correct |
31 |
Correct |
11 ms |
51792 KB |
Output is correct |
32 |
Correct |
12 ms |
49744 KB |
Output is correct |
33 |
Correct |
11 ms |
51792 KB |
Output is correct |
34 |
Correct |
9 ms |
51792 KB |
Output is correct |
35 |
Correct |
13 ms |
49744 KB |
Output is correct |
36 |
Correct |
10 ms |
51792 KB |
Output is correct |
37 |
Correct |
10 ms |
49744 KB |
Output is correct |
38 |
Correct |
12 ms |
49744 KB |
Output is correct |
39 |
Correct |
12 ms |
49744 KB |
Output is correct |
40 |
Correct |
9 ms |
51792 KB |
Output is correct |
41 |
Correct |
8 ms |
49744 KB |
Output is correct |
42 |
Correct |
9 ms |
51804 KB |
Output is correct |
43 |
Correct |
9 ms |
51896 KB |
Output is correct |
44 |
Correct |
12 ms |
51792 KB |
Output is correct |
45 |
Correct |
10 ms |
51792 KB |
Output is correct |
46 |
Correct |
13 ms |
52048 KB |
Output is correct |
47 |
Correct |
220 ms |
63804 KB |
Output is correct |
48 |
Correct |
194 ms |
59464 KB |
Output is correct |
49 |
Correct |
195 ms |
59452 KB |
Output is correct |
50 |
Correct |
179 ms |
63444 KB |
Output is correct |
51 |
Correct |
182 ms |
63700 KB |
Output is correct |
52 |
Correct |
220 ms |
63816 KB |
Output is correct |
53 |
Correct |
230 ms |
64084 KB |
Output is correct |
54 |
Correct |
19 ms |
52560 KB |
Output is correct |
55 |
Correct |
16 ms |
52304 KB |
Output is correct |
56 |
Correct |
19 ms |
52560 KB |
Output is correct |
57 |
Correct |
18 ms |
52304 KB |
Output is correct |
58 |
Correct |
18 ms |
52432 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
51904 KB |
Output is correct |
2 |
Correct |
61 ms |
55632 KB |
Output is correct |
3 |
Correct |
60 ms |
55624 KB |
Output is correct |
4 |
Correct |
52 ms |
54996 KB |
Output is correct |
5 |
Correct |
62 ms |
55624 KB |
Output is correct |
6 |
Correct |
69 ms |
54996 KB |
Output is correct |
7 |
Correct |
66 ms |
55628 KB |
Output is correct |
8 |
Correct |
9 ms |
51792 KB |
Output is correct |
9 |
Correct |
9 ms |
51792 KB |
Output is correct |
10 |
Correct |
10 ms |
51792 KB |
Output is correct |
11 |
Correct |
9 ms |
51792 KB |
Output is correct |
12 |
Correct |
10 ms |
51792 KB |
Output is correct |
13 |
Correct |
9 ms |
51792 KB |
Output is correct |
14 |
Correct |
9 ms |
51904 KB |
Output is correct |
15 |
Correct |
9 ms |
51792 KB |
Output is correct |
16 |
Correct |
10 ms |
51904 KB |
Output is correct |
17 |
Correct |
12 ms |
51792 KB |
Output is correct |
18 |
Correct |
9 ms |
51792 KB |
Output is correct |
19 |
Correct |
9 ms |
51792 KB |
Output is correct |
20 |
Correct |
164 ms |
60488 KB |
Output is correct |
21 |
Correct |
147 ms |
59864 KB |
Output is correct |
22 |
Correct |
154 ms |
58596 KB |
Output is correct |
23 |
Correct |
145 ms |
60744 KB |
Output is correct |
24 |
Correct |
163 ms |
60368 KB |
Output is correct |
25 |
Correct |
155 ms |
60404 KB |
Output is correct |
26 |
Correct |
165 ms |
60488 KB |
Output is correct |
27 |
Correct |
10 ms |
51792 KB |
Output is correct |
28 |
Correct |
10 ms |
51792 KB |
Output is correct |
29 |
Correct |
9 ms |
51928 KB |
Output is correct |
30 |
Correct |
10 ms |
51792 KB |
Output is correct |
31 |
Correct |
11 ms |
51792 KB |
Output is correct |
32 |
Correct |
12 ms |
49744 KB |
Output is correct |
33 |
Correct |
11 ms |
51792 KB |
Output is correct |
34 |
Correct |
9 ms |
51792 KB |
Output is correct |
35 |
Correct |
13 ms |
49744 KB |
Output is correct |
36 |
Correct |
10 ms |
51792 KB |
Output is correct |
37 |
Correct |
10 ms |
49744 KB |
Output is correct |
38 |
Correct |
12 ms |
49744 KB |
Output is correct |
39 |
Correct |
12 ms |
49744 KB |
Output is correct |
40 |
Correct |
9 ms |
51792 KB |
Output is correct |
41 |
Correct |
8 ms |
49744 KB |
Output is correct |
42 |
Correct |
9 ms |
51804 KB |
Output is correct |
43 |
Correct |
9 ms |
51896 KB |
Output is correct |
44 |
Correct |
12 ms |
51792 KB |
Output is correct |
45 |
Correct |
10 ms |
51792 KB |
Output is correct |
46 |
Correct |
13 ms |
52048 KB |
Output is correct |
47 |
Correct |
220 ms |
63804 KB |
Output is correct |
48 |
Correct |
194 ms |
59464 KB |
Output is correct |
49 |
Correct |
195 ms |
59452 KB |
Output is correct |
50 |
Correct |
179 ms |
63444 KB |
Output is correct |
51 |
Correct |
182 ms |
63700 KB |
Output is correct |
52 |
Correct |
220 ms |
63816 KB |
Output is correct |
53 |
Correct |
230 ms |
64084 KB |
Output is correct |
54 |
Correct |
19 ms |
52560 KB |
Output is correct |
55 |
Correct |
16 ms |
52304 KB |
Output is correct |
56 |
Correct |
19 ms |
52560 KB |
Output is correct |
57 |
Correct |
18 ms |
52304 KB |
Output is correct |
58 |
Correct |
18 ms |
52432 KB |
Output is correct |
59 |
Correct |
381 ms |
67344 KB |
Output is correct |
60 |
Correct |
273 ms |
65864 KB |
Output is correct |
61 |
Correct |
284 ms |
66296 KB |
Output is correct |
62 |
Correct |
289 ms |
66552 KB |
Output is correct |
63 |
Correct |
312 ms |
67916 KB |
Output is correct |
64 |
Correct |
370 ms |
71752 KB |
Output is correct |
65 |
Correct |
422 ms |
71752 KB |
Output is correct |
66 |
Correct |
249 ms |
68936 KB |
Output is correct |
67 |
Correct |
317 ms |
72780 KB |
Output is correct |
68 |
Correct |
421 ms |
72844 KB |
Output is correct |
69 |
Correct |
453 ms |
73052 KB |
Output is correct |
70 |
Correct |
83 ms |
58092 KB |
Output is correct |
71 |
Correct |
63 ms |
55880 KB |
Output is correct |
72 |
Correct |
75 ms |
56096 KB |
Output is correct |
73 |
Correct |
62 ms |
56020 KB |
Output is correct |
74 |
Correct |
86 ms |
56648 KB |
Output is correct |
75 |
Correct |
145 ms |
59724 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
51944 KB |
Output is correct |
2 |
Correct |
11 ms |
51916 KB |
Output is correct |
3 |
Correct |
9 ms |
51792 KB |
Output is correct |
4 |
Correct |
10 ms |
51792 KB |
Output is correct |
5 |
Correct |
712 ms |
101040 KB |
Output is correct |
6 |
Correct |
300 ms |
84712 KB |
Output is correct |
7 |
Correct |
458 ms |
85988 KB |
Output is correct |
8 |
Correct |
545 ms |
85784 KB |
Output is correct |
9 |
Correct |
908 ms |
96004 KB |
Output is correct |
10 |
Correct |
470 ms |
85064 KB |
Output is correct |
11 |
Correct |
572 ms |
85320 KB |
Output is correct |
12 |
Correct |
889 ms |
95420 KB |
Output is correct |
13 |
Correct |
9 ms |
51792 KB |
Output is correct |
14 |
Correct |
9 ms |
49744 KB |
Output is correct |
15 |
Correct |
9 ms |
49912 KB |
Output is correct |
16 |
Correct |
9 ms |
51940 KB |
Output is correct |
17 |
Correct |
11 ms |
51792 KB |
Output is correct |
18 |
Correct |
9 ms |
51792 KB |
Output is correct |
19 |
Correct |
10 ms |
49744 KB |
Output is correct |
20 |
Correct |
9 ms |
49744 KB |
Output is correct |
21 |
Correct |
10 ms |
49848 KB |
Output is correct |
22 |
Correct |
12 ms |
49888 KB |
Output is correct |
23 |
Correct |
13 ms |
49820 KB |
Output is correct |
24 |
Correct |
16 ms |
49744 KB |
Output is correct |
25 |
Correct |
13 ms |
49744 KB |
Output is correct |
26 |
Correct |
18 ms |
49728 KB |
Output is correct |
27 |
Correct |
15 ms |
49744 KB |
Output is correct |
28 |
Correct |
14 ms |
49744 KB |
Output is correct |
29 |
Correct |
15 ms |
49768 KB |
Output is correct |
30 |
Correct |
15 ms |
49744 KB |
Output is correct |
31 |
Correct |
16 ms |
49928 KB |
Output is correct |
32 |
Correct |
12 ms |
49744 KB |
Output is correct |
33 |
Correct |
17 ms |
49744 KB |
Output is correct |
34 |
Correct |
10 ms |
51792 KB |
Output is correct |
35 |
Correct |
10 ms |
51792 KB |
Output is correct |
36 |
Correct |
9 ms |
51792 KB |
Output is correct |
37 |
Correct |
10 ms |
51804 KB |
Output is correct |
38 |
Correct |
10 ms |
49760 KB |
Output is correct |
39 |
Correct |
9 ms |
51792 KB |
Output is correct |
40 |
Correct |
11 ms |
51792 KB |
Output is correct |
41 |
Correct |
18 ms |
52560 KB |
Output is correct |
42 |
Correct |
15 ms |
52304 KB |
Output is correct |
43 |
Correct |
18 ms |
52560 KB |
Output is correct |
44 |
Correct |
16 ms |
52304 KB |
Output is correct |
45 |
Correct |
18 ms |
52584 KB |
Output is correct |
46 |
Correct |
96 ms |
57928 KB |
Output is correct |
47 |
Correct |
73 ms |
55884 KB |
Output is correct |
48 |
Correct |
76 ms |
56144 KB |
Output is correct |
49 |
Correct |
64 ms |
56024 KB |
Output is correct |
50 |
Correct |
88 ms |
56696 KB |
Output is correct |
51 |
Correct |
302 ms |
84808 KB |
Output is correct |
52 |
Correct |
997 ms |
117576 KB |
Output is correct |
53 |
Correct |
1166 ms |
117528 KB |
Output is correct |
54 |
Correct |
1116 ms |
111944 KB |
Output is correct |
55 |
Correct |
9 ms |
51960 KB |
Output is correct |
56 |
Correct |
163 ms |
59576 KB |
Output is correct |
57 |
Correct |
9 ms |
51904 KB |
Output is correct |
58 |
Correct |
61 ms |
55632 KB |
Output is correct |
59 |
Correct |
60 ms |
55624 KB |
Output is correct |
60 |
Correct |
52 ms |
54996 KB |
Output is correct |
61 |
Correct |
62 ms |
55624 KB |
Output is correct |
62 |
Correct |
69 ms |
54996 KB |
Output is correct |
63 |
Correct |
66 ms |
55628 KB |
Output is correct |
64 |
Correct |
9 ms |
51792 KB |
Output is correct |
65 |
Correct |
9 ms |
51792 KB |
Output is correct |
66 |
Correct |
10 ms |
51792 KB |
Output is correct |
67 |
Correct |
9 ms |
51792 KB |
Output is correct |
68 |
Correct |
10 ms |
51792 KB |
Output is correct |
69 |
Correct |
9 ms |
51792 KB |
Output is correct |
70 |
Correct |
9 ms |
51904 KB |
Output is correct |
71 |
Correct |
9 ms |
51792 KB |
Output is correct |
72 |
Correct |
10 ms |
51904 KB |
Output is correct |
73 |
Correct |
12 ms |
51792 KB |
Output is correct |
74 |
Correct |
9 ms |
51792 KB |
Output is correct |
75 |
Correct |
9 ms |
51792 KB |
Output is correct |
76 |
Correct |
164 ms |
60488 KB |
Output is correct |
77 |
Correct |
147 ms |
59864 KB |
Output is correct |
78 |
Correct |
154 ms |
58596 KB |
Output is correct |
79 |
Correct |
145 ms |
60744 KB |
Output is correct |
80 |
Correct |
163 ms |
60368 KB |
Output is correct |
81 |
Correct |
155 ms |
60404 KB |
Output is correct |
82 |
Correct |
165 ms |
60488 KB |
Output is correct |
83 |
Correct |
10 ms |
51792 KB |
Output is correct |
84 |
Correct |
10 ms |
51792 KB |
Output is correct |
85 |
Correct |
9 ms |
51928 KB |
Output is correct |
86 |
Correct |
10 ms |
51792 KB |
Output is correct |
87 |
Correct |
11 ms |
51792 KB |
Output is correct |
88 |
Correct |
12 ms |
49744 KB |
Output is correct |
89 |
Correct |
11 ms |
51792 KB |
Output is correct |
90 |
Correct |
9 ms |
51792 KB |
Output is correct |
91 |
Correct |
13 ms |
49744 KB |
Output is correct |
92 |
Correct |
10 ms |
51792 KB |
Output is correct |
93 |
Correct |
10 ms |
49744 KB |
Output is correct |
94 |
Correct |
12 ms |
49744 KB |
Output is correct |
95 |
Correct |
12 ms |
49744 KB |
Output is correct |
96 |
Correct |
9 ms |
51792 KB |
Output is correct |
97 |
Correct |
8 ms |
49744 KB |
Output is correct |
98 |
Correct |
9 ms |
51804 KB |
Output is correct |
99 |
Correct |
9 ms |
51896 KB |
Output is correct |
100 |
Correct |
12 ms |
51792 KB |
Output is correct |
101 |
Correct |
10 ms |
51792 KB |
Output is correct |
102 |
Correct |
13 ms |
52048 KB |
Output is correct |
103 |
Correct |
220 ms |
63804 KB |
Output is correct |
104 |
Correct |
194 ms |
59464 KB |
Output is correct |
105 |
Correct |
195 ms |
59452 KB |
Output is correct |
106 |
Correct |
179 ms |
63444 KB |
Output is correct |
107 |
Correct |
182 ms |
63700 KB |
Output is correct |
108 |
Correct |
220 ms |
63816 KB |
Output is correct |
109 |
Correct |
230 ms |
64084 KB |
Output is correct |
110 |
Correct |
19 ms |
52560 KB |
Output is correct |
111 |
Correct |
16 ms |
52304 KB |
Output is correct |
112 |
Correct |
19 ms |
52560 KB |
Output is correct |
113 |
Correct |
18 ms |
52304 KB |
Output is correct |
114 |
Correct |
18 ms |
52432 KB |
Output is correct |
115 |
Correct |
381 ms |
67344 KB |
Output is correct |
116 |
Correct |
273 ms |
65864 KB |
Output is correct |
117 |
Correct |
284 ms |
66296 KB |
Output is correct |
118 |
Correct |
289 ms |
66552 KB |
Output is correct |
119 |
Correct |
312 ms |
67916 KB |
Output is correct |
120 |
Correct |
370 ms |
71752 KB |
Output is correct |
121 |
Correct |
422 ms |
71752 KB |
Output is correct |
122 |
Correct |
249 ms |
68936 KB |
Output is correct |
123 |
Correct |
317 ms |
72780 KB |
Output is correct |
124 |
Correct |
421 ms |
72844 KB |
Output is correct |
125 |
Correct |
453 ms |
73052 KB |
Output is correct |
126 |
Correct |
83 ms |
58092 KB |
Output is correct |
127 |
Correct |
63 ms |
55880 KB |
Output is correct |
128 |
Correct |
75 ms |
56096 KB |
Output is correct |
129 |
Correct |
62 ms |
56020 KB |
Output is correct |
130 |
Correct |
86 ms |
56648 KB |
Output is correct |
131 |
Correct |
145 ms |
59724 KB |
Output is correct |
132 |
Correct |
1996 ms |
132260 KB |
Output is correct |
133 |
Correct |
1888 ms |
131976 KB |
Output is correct |
134 |
Correct |
1802 ms |
132160 KB |
Output is correct |
135 |
Correct |
1764 ms |
118560 KB |
Output is correct |
136 |
Correct |
1741 ms |
129120 KB |
Output is correct |
137 |
Correct |
995 ms |
91256 KB |
Output is correct |
138 |
Correct |
941 ms |
92320 KB |
Output is correct |
139 |
Correct |
581 ms |
96344 KB |
Output is correct |
140 |
Correct |
1277 ms |
128684 KB |
Output is correct |
141 |
Correct |
2056 ms |
131640 KB |
Output is correct |
142 |
Correct |
2019 ms |
132152 KB |
Output is correct |