# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
935441 |
2024-02-29T05:10:38 Z |
juliany2 |
Council (JOI23_council) |
C++17 |
|
1798 ms |
53076 KB |
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define all(x) (x).begin(), (x).end()
const int N = 3e5 + 7, M = 20;
int n, m;
int a[N][M], sum[M];
array<array<int, 2>, 2> dp[1 << M];
array<array<int, 2>, 2> mx(array<array<int, 2>, 2> &x, array<array<int, 2>, 2> &y) {
vector<array<int, 2>> l = {x[0], x[1], y[0], y[1]};
sort(all(l), greater<>());
array<array<int, 2>, 2> res = {{{0, -1}, {0, -1}}};
int pt = 0, seen = -1;
for (auto &[x, i] : l) {
if (seen == i || pt == 2)
continue;
res[pt] = {x, i};
pt++, seen = i;
}
return res;
}
array<array<int, 2>, 2> mn(array<array<int, 2>, 2> &x, array<array<int, 2>, 2> &y) {
vector<array<int, 2>> l = {x[0], x[1], y[0], y[1]};
sort(all(l));
array<array<int, 2>, 2> res = {{{(int) 1e9, -1}, {(int) 1e9, -1}}};
int pt = 0, seen = -1;
for (auto &[x, i] : l) {
if (seen == i || pt == 2)
continue;
res[pt] = {x, i};
pt++, seen = i;
}
return res;
}
int main() {
cin.tie(0)->sync_with_stdio(false);
cin >> n >> m;
int t = (n % 2) ^ 1;
for (int i = 0; i < (1 << m); i++) {
if (t == 0)
dp[i] = {{{0, -1}, {0, -1}}};
else
dp[i] = {{{(int) 1e9, -1}, {(int) 1e9, -1}}};
}
for (int i = 0; i < n; i++) {
int mask = 0;
for (int j = 0; j < m; j++) {
cin >> a[i][j];
sum[j] += (a[i][j] == 0 ? -1 : 1);
if (a[i][j] == t)
mask += 1 << j;
}
array<array<int, 2>, 2> cur = {{{__builtin_popcount(mask), i}, {__builtin_popcount(mask), i}}};
if (t == 0)
dp[mask] = mx(dp[mask], cur);
else
dp[mask] = mn(dp[mask], cur);
}
for (int j = 0; j < m; j++) {
for (int i = 0; i < (1 << m); i++) {
if (i >> j & 1) {
array<array<int, 2>, 2> cur = dp[i];
cur[0][0]--, cur[1][0]--;
if (t == 0) {
dp[i] = mx(dp[i], dp[i ^ (1 << j)]);
dp[i ^ (1 << j)] = mx(dp[i ^ (1 << j)], cur);
}
else {
dp[i] = mn(dp[i], dp[i ^ (1 << j)]);
dp[i ^ (1 << j)] = mn(dp[i ^ (1 << j)], cur);
}
}
}
}
for (int i = 0; i < n; i++) {
int ans = 0, mask = 0;
for (int j = 0; j < m; j++) {
int cur = sum[j] - (a[i][j] == 0 ? -1 : 1);
ans += cur > 0;
if (cur == 0 || cur == 1)
mask += 1 << j;
}
int val = (dp[mask][0][1] == i ? dp[mask][1][0] : dp[mask][0][0]);
cout << ans + (t == 0 ? 1 : -1) * val << '\n';
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
3 ms |
2396 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
1 ms |
2648 KB |
Output is correct |
5 |
Correct |
996 ms |
17032 KB |
Output is correct |
6 |
Correct |
1004 ms |
16984 KB |
Output is correct |
7 |
Correct |
907 ms |
17048 KB |
Output is correct |
8 |
Correct |
1006 ms |
17236 KB |
Output is correct |
9 |
Correct |
1034 ms |
17048 KB |
Output is correct |
10 |
Correct |
907 ms |
17232 KB |
Output is correct |
11 |
Correct |
1008 ms |
17232 KB |
Output is correct |
12 |
Correct |
1035 ms |
17044 KB |
Output is correct |
13 |
Correct |
0 ms |
2396 KB |
Output is correct |
14 |
Correct |
0 ms |
2396 KB |
Output is correct |
15 |
Correct |
1 ms |
2396 KB |
Output is correct |
16 |
Correct |
1 ms |
2396 KB |
Output is correct |
17 |
Correct |
1 ms |
2648 KB |
Output is correct |
18 |
Correct |
1 ms |
2396 KB |
Output is correct |
19 |
Correct |
0 ms |
2392 KB |
Output is correct |
20 |
Correct |
1 ms |
2396 KB |
Output is correct |
21 |
Correct |
1 ms |
2516 KB |
Output is correct |
22 |
Correct |
1 ms |
2392 KB |
Output is correct |
23 |
Correct |
1 ms |
2396 KB |
Output is correct |
24 |
Correct |
1 ms |
2396 KB |
Output is correct |
25 |
Correct |
0 ms |
2396 KB |
Output is correct |
26 |
Correct |
1 ms |
2396 KB |
Output is correct |
27 |
Correct |
1 ms |
2396 KB |
Output is correct |
28 |
Correct |
1 ms |
2396 KB |
Output is correct |
29 |
Correct |
1 ms |
2396 KB |
Output is correct |
30 |
Correct |
1 ms |
2396 KB |
Output is correct |
31 |
Correct |
1 ms |
2396 KB |
Output is correct |
32 |
Correct |
1 ms |
2396 KB |
Output is correct |
33 |
Correct |
1 ms |
2396 KB |
Output is correct |
34 |
Correct |
1 ms |
2396 KB |
Output is correct |
35 |
Correct |
1 ms |
2396 KB |
Output is correct |
36 |
Correct |
1 ms |
2396 KB |
Output is correct |
37 |
Correct |
1 ms |
2392 KB |
Output is correct |
38 |
Correct |
1 ms |
2392 KB |
Output is correct |
39 |
Correct |
1 ms |
2392 KB |
Output is correct |
40 |
Correct |
1 ms |
2396 KB |
Output is correct |
41 |
Correct |
12 ms |
4560 KB |
Output is correct |
42 |
Correct |
11 ms |
4744 KB |
Output is correct |
43 |
Correct |
12 ms |
4696 KB |
Output is correct |
44 |
Correct |
10 ms |
4696 KB |
Output is correct |
45 |
Correct |
12 ms |
4700 KB |
Output is correct |
46 |
Correct |
107 ms |
4700 KB |
Output is correct |
47 |
Correct |
94 ms |
4724 KB |
Output is correct |
48 |
Correct |
108 ms |
4700 KB |
Output is correct |
49 |
Correct |
93 ms |
4716 KB |
Output is correct |
50 |
Correct |
107 ms |
4700 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
3 ms |
2396 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
1 ms |
2648 KB |
Output is correct |
5 |
Correct |
996 ms |
17032 KB |
Output is correct |
6 |
Correct |
1004 ms |
16984 KB |
Output is correct |
7 |
Correct |
907 ms |
17048 KB |
Output is correct |
8 |
Correct |
1006 ms |
17236 KB |
Output is correct |
9 |
Correct |
1034 ms |
17048 KB |
Output is correct |
10 |
Correct |
907 ms |
17232 KB |
Output is correct |
11 |
Correct |
1008 ms |
17232 KB |
Output is correct |
12 |
Correct |
1035 ms |
17044 KB |
Output is correct |
13 |
Correct |
0 ms |
2396 KB |
Output is correct |
14 |
Correct |
0 ms |
2396 KB |
Output is correct |
15 |
Correct |
1 ms |
2396 KB |
Output is correct |
16 |
Correct |
1 ms |
2396 KB |
Output is correct |
17 |
Correct |
1 ms |
2648 KB |
Output is correct |
18 |
Correct |
1 ms |
2396 KB |
Output is correct |
19 |
Correct |
0 ms |
2392 KB |
Output is correct |
20 |
Correct |
1 ms |
2396 KB |
Output is correct |
21 |
Correct |
1 ms |
2516 KB |
Output is correct |
22 |
Correct |
1 ms |
2392 KB |
Output is correct |
23 |
Correct |
1 ms |
2396 KB |
Output is correct |
24 |
Correct |
1 ms |
2396 KB |
Output is correct |
25 |
Correct |
0 ms |
2396 KB |
Output is correct |
26 |
Correct |
1 ms |
2396 KB |
Output is correct |
27 |
Correct |
1 ms |
2396 KB |
Output is correct |
28 |
Correct |
1 ms |
2396 KB |
Output is correct |
29 |
Correct |
1 ms |
2396 KB |
Output is correct |
30 |
Correct |
1 ms |
2396 KB |
Output is correct |
31 |
Correct |
1 ms |
2396 KB |
Output is correct |
32 |
Correct |
1 ms |
2396 KB |
Output is correct |
33 |
Correct |
1 ms |
2396 KB |
Output is correct |
34 |
Correct |
1 ms |
2396 KB |
Output is correct |
35 |
Correct |
1 ms |
2396 KB |
Output is correct |
36 |
Correct |
1 ms |
2396 KB |
Output is correct |
37 |
Correct |
1 ms |
2392 KB |
Output is correct |
38 |
Correct |
1 ms |
2392 KB |
Output is correct |
39 |
Correct |
1 ms |
2392 KB |
Output is correct |
40 |
Correct |
1 ms |
2396 KB |
Output is correct |
41 |
Correct |
12 ms |
4560 KB |
Output is correct |
42 |
Correct |
11 ms |
4744 KB |
Output is correct |
43 |
Correct |
12 ms |
4696 KB |
Output is correct |
44 |
Correct |
10 ms |
4696 KB |
Output is correct |
45 |
Correct |
12 ms |
4700 KB |
Output is correct |
46 |
Correct |
107 ms |
4700 KB |
Output is correct |
47 |
Correct |
94 ms |
4724 KB |
Output is correct |
48 |
Correct |
108 ms |
4700 KB |
Output is correct |
49 |
Correct |
93 ms |
4716 KB |
Output is correct |
50 |
Correct |
107 ms |
4700 KB |
Output is correct |
51 |
Correct |
1020 ms |
19296 KB |
Output is correct |
52 |
Correct |
979 ms |
19284 KB |
Output is correct |
53 |
Correct |
1051 ms |
19204 KB |
Output is correct |
54 |
Correct |
1048 ms |
19200 KB |
Output is correct |
55 |
Correct |
1 ms |
4444 KB |
Output is correct |
56 |
Correct |
120 ms |
6888 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
64 ms |
27480 KB |
Output is correct |
3 |
Correct |
61 ms |
27472 KB |
Output is correct |
4 |
Correct |
46 ms |
26944 KB |
Output is correct |
5 |
Correct |
59 ms |
27480 KB |
Output is correct |
6 |
Correct |
47 ms |
26964 KB |
Output is correct |
7 |
Correct |
60 ms |
27476 KB |
Output is correct |
8 |
Correct |
1 ms |
2396 KB |
Output is correct |
9 |
Correct |
1 ms |
2396 KB |
Output is correct |
10 |
Correct |
1 ms |
2396 KB |
Output is correct |
11 |
Correct |
1 ms |
2396 KB |
Output is correct |
12 |
Correct |
1 ms |
2392 KB |
Output is correct |
13 |
Correct |
0 ms |
2396 KB |
Output is correct |
14 |
Correct |
0 ms |
2396 KB |
Output is correct |
15 |
Correct |
1 ms |
2392 KB |
Output is correct |
16 |
Correct |
1 ms |
2396 KB |
Output is correct |
17 |
Correct |
1 ms |
4444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
64 ms |
27480 KB |
Output is correct |
3 |
Correct |
61 ms |
27472 KB |
Output is correct |
4 |
Correct |
46 ms |
26944 KB |
Output is correct |
5 |
Correct |
59 ms |
27480 KB |
Output is correct |
6 |
Correct |
47 ms |
26964 KB |
Output is correct |
7 |
Correct |
60 ms |
27476 KB |
Output is correct |
8 |
Correct |
1 ms |
2396 KB |
Output is correct |
9 |
Correct |
1 ms |
2396 KB |
Output is correct |
10 |
Correct |
1 ms |
2396 KB |
Output is correct |
11 |
Correct |
1 ms |
2396 KB |
Output is correct |
12 |
Correct |
1 ms |
2392 KB |
Output is correct |
13 |
Correct |
0 ms |
2396 KB |
Output is correct |
14 |
Correct |
0 ms |
2396 KB |
Output is correct |
15 |
Correct |
1 ms |
2392 KB |
Output is correct |
16 |
Correct |
1 ms |
2396 KB |
Output is correct |
17 |
Correct |
1 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
2396 KB |
Output is correct |
19 |
Correct |
1 ms |
2648 KB |
Output is correct |
20 |
Correct |
167 ms |
32080 KB |
Output is correct |
21 |
Correct |
150 ms |
31572 KB |
Output is correct |
22 |
Correct |
158 ms |
31700 KB |
Output is correct |
23 |
Correct |
156 ms |
32336 KB |
Output is correct |
24 |
Correct |
151 ms |
32076 KB |
Output is correct |
25 |
Correct |
167 ms |
32208 KB |
Output is correct |
26 |
Correct |
165 ms |
32220 KB |
Output is correct |
27 |
Correct |
1 ms |
2392 KB |
Output is correct |
28 |
Correct |
1 ms |
2392 KB |
Output is correct |
29 |
Correct |
1 ms |
2396 KB |
Output is correct |
30 |
Correct |
1 ms |
2516 KB |
Output is correct |
31 |
Correct |
1 ms |
2396 KB |
Output is correct |
32 |
Correct |
1 ms |
2396 KB |
Output is correct |
33 |
Correct |
1 ms |
2396 KB |
Output is correct |
34 |
Correct |
1 ms |
2392 KB |
Output is correct |
35 |
Correct |
1 ms |
2396 KB |
Output is correct |
36 |
Correct |
1 ms |
2396 KB |
Output is correct |
37 |
Correct |
1 ms |
2396 KB |
Output is correct |
38 |
Correct |
1 ms |
2392 KB |
Output is correct |
39 |
Correct |
1 ms |
2396 KB |
Output is correct |
40 |
Correct |
1 ms |
2396 KB |
Output is correct |
41 |
Correct |
1 ms |
2396 KB |
Output is correct |
42 |
Correct |
1 ms |
2392 KB |
Output is correct |
43 |
Correct |
1 ms |
2392 KB |
Output is correct |
44 |
Correct |
1 ms |
2396 KB |
Output is correct |
45 |
Correct |
1 ms |
2396 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
64 ms |
27480 KB |
Output is correct |
3 |
Correct |
61 ms |
27472 KB |
Output is correct |
4 |
Correct |
46 ms |
26944 KB |
Output is correct |
5 |
Correct |
59 ms |
27480 KB |
Output is correct |
6 |
Correct |
47 ms |
26964 KB |
Output is correct |
7 |
Correct |
60 ms |
27476 KB |
Output is correct |
8 |
Correct |
1 ms |
2396 KB |
Output is correct |
9 |
Correct |
1 ms |
2396 KB |
Output is correct |
10 |
Correct |
1 ms |
2396 KB |
Output is correct |
11 |
Correct |
1 ms |
2396 KB |
Output is correct |
12 |
Correct |
1 ms |
2392 KB |
Output is correct |
13 |
Correct |
0 ms |
2396 KB |
Output is correct |
14 |
Correct |
0 ms |
2396 KB |
Output is correct |
15 |
Correct |
1 ms |
2392 KB |
Output is correct |
16 |
Correct |
1 ms |
2396 KB |
Output is correct |
17 |
Correct |
1 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
2396 KB |
Output is correct |
19 |
Correct |
1 ms |
2648 KB |
Output is correct |
20 |
Correct |
167 ms |
32080 KB |
Output is correct |
21 |
Correct |
150 ms |
31572 KB |
Output is correct |
22 |
Correct |
158 ms |
31700 KB |
Output is correct |
23 |
Correct |
156 ms |
32336 KB |
Output is correct |
24 |
Correct |
151 ms |
32076 KB |
Output is correct |
25 |
Correct |
167 ms |
32208 KB |
Output is correct |
26 |
Correct |
165 ms |
32220 KB |
Output is correct |
27 |
Correct |
1 ms |
2392 KB |
Output is correct |
28 |
Correct |
1 ms |
2392 KB |
Output is correct |
29 |
Correct |
1 ms |
2396 KB |
Output is correct |
30 |
Correct |
1 ms |
2516 KB |
Output is correct |
31 |
Correct |
1 ms |
2396 KB |
Output is correct |
32 |
Correct |
1 ms |
2396 KB |
Output is correct |
33 |
Correct |
1 ms |
2396 KB |
Output is correct |
34 |
Correct |
1 ms |
2392 KB |
Output is correct |
35 |
Correct |
1 ms |
2396 KB |
Output is correct |
36 |
Correct |
1 ms |
2396 KB |
Output is correct |
37 |
Correct |
1 ms |
2396 KB |
Output is correct |
38 |
Correct |
1 ms |
2392 KB |
Output is correct |
39 |
Correct |
1 ms |
2396 KB |
Output is correct |
40 |
Correct |
1 ms |
2396 KB |
Output is correct |
41 |
Correct |
1 ms |
2396 KB |
Output is correct |
42 |
Correct |
1 ms |
2392 KB |
Output is correct |
43 |
Correct |
1 ms |
2392 KB |
Output is correct |
44 |
Correct |
1 ms |
2396 KB |
Output is correct |
45 |
Correct |
1 ms |
2396 KB |
Output is correct |
46 |
Correct |
4 ms |
2392 KB |
Output is correct |
47 |
Correct |
249 ms |
36592 KB |
Output is correct |
48 |
Correct |
211 ms |
34132 KB |
Output is correct |
49 |
Correct |
216 ms |
34264 KB |
Output is correct |
50 |
Correct |
216 ms |
36944 KB |
Output is correct |
51 |
Correct |
236 ms |
36748 KB |
Output is correct |
52 |
Correct |
228 ms |
36732 KB |
Output is correct |
53 |
Correct |
230 ms |
36948 KB |
Output is correct |
54 |
Correct |
12 ms |
4700 KB |
Output is correct |
55 |
Correct |
10 ms |
4740 KB |
Output is correct |
56 |
Correct |
13 ms |
4700 KB |
Output is correct |
57 |
Correct |
11 ms |
4696 KB |
Output is correct |
58 |
Correct |
12 ms |
4700 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
64 ms |
27480 KB |
Output is correct |
3 |
Correct |
61 ms |
27472 KB |
Output is correct |
4 |
Correct |
46 ms |
26944 KB |
Output is correct |
5 |
Correct |
59 ms |
27480 KB |
Output is correct |
6 |
Correct |
47 ms |
26964 KB |
Output is correct |
7 |
Correct |
60 ms |
27476 KB |
Output is correct |
8 |
Correct |
1 ms |
2396 KB |
Output is correct |
9 |
Correct |
1 ms |
2396 KB |
Output is correct |
10 |
Correct |
1 ms |
2396 KB |
Output is correct |
11 |
Correct |
1 ms |
2396 KB |
Output is correct |
12 |
Correct |
1 ms |
2392 KB |
Output is correct |
13 |
Correct |
0 ms |
2396 KB |
Output is correct |
14 |
Correct |
0 ms |
2396 KB |
Output is correct |
15 |
Correct |
1 ms |
2392 KB |
Output is correct |
16 |
Correct |
1 ms |
2396 KB |
Output is correct |
17 |
Correct |
1 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
2396 KB |
Output is correct |
19 |
Correct |
1 ms |
2648 KB |
Output is correct |
20 |
Correct |
167 ms |
32080 KB |
Output is correct |
21 |
Correct |
150 ms |
31572 KB |
Output is correct |
22 |
Correct |
158 ms |
31700 KB |
Output is correct |
23 |
Correct |
156 ms |
32336 KB |
Output is correct |
24 |
Correct |
151 ms |
32076 KB |
Output is correct |
25 |
Correct |
167 ms |
32208 KB |
Output is correct |
26 |
Correct |
165 ms |
32220 KB |
Output is correct |
27 |
Correct |
1 ms |
2392 KB |
Output is correct |
28 |
Correct |
1 ms |
2392 KB |
Output is correct |
29 |
Correct |
1 ms |
2396 KB |
Output is correct |
30 |
Correct |
1 ms |
2516 KB |
Output is correct |
31 |
Correct |
1 ms |
2396 KB |
Output is correct |
32 |
Correct |
1 ms |
2396 KB |
Output is correct |
33 |
Correct |
1 ms |
2396 KB |
Output is correct |
34 |
Correct |
1 ms |
2392 KB |
Output is correct |
35 |
Correct |
1 ms |
2396 KB |
Output is correct |
36 |
Correct |
1 ms |
2396 KB |
Output is correct |
37 |
Correct |
1 ms |
2396 KB |
Output is correct |
38 |
Correct |
1 ms |
2392 KB |
Output is correct |
39 |
Correct |
1 ms |
2396 KB |
Output is correct |
40 |
Correct |
1 ms |
2396 KB |
Output is correct |
41 |
Correct |
1 ms |
2396 KB |
Output is correct |
42 |
Correct |
1 ms |
2392 KB |
Output is correct |
43 |
Correct |
1 ms |
2392 KB |
Output is correct |
44 |
Correct |
1 ms |
2396 KB |
Output is correct |
45 |
Correct |
1 ms |
2396 KB |
Output is correct |
46 |
Correct |
4 ms |
2392 KB |
Output is correct |
47 |
Correct |
249 ms |
36592 KB |
Output is correct |
48 |
Correct |
211 ms |
34132 KB |
Output is correct |
49 |
Correct |
216 ms |
34264 KB |
Output is correct |
50 |
Correct |
216 ms |
36944 KB |
Output is correct |
51 |
Correct |
236 ms |
36748 KB |
Output is correct |
52 |
Correct |
228 ms |
36732 KB |
Output is correct |
53 |
Correct |
230 ms |
36948 KB |
Output is correct |
54 |
Correct |
12 ms |
4700 KB |
Output is correct |
55 |
Correct |
10 ms |
4740 KB |
Output is correct |
56 |
Correct |
13 ms |
4700 KB |
Output is correct |
57 |
Correct |
11 ms |
4696 KB |
Output is correct |
58 |
Correct |
12 ms |
4700 KB |
Output is correct |
59 |
Correct |
306 ms |
38228 KB |
Output is correct |
60 |
Correct |
213 ms |
19052 KB |
Output is correct |
61 |
Correct |
219 ms |
19324 KB |
Output is correct |
62 |
Correct |
220 ms |
19536 KB |
Output is correct |
63 |
Correct |
302 ms |
37972 KB |
Output is correct |
64 |
Correct |
380 ms |
38484 KB |
Output is correct |
65 |
Correct |
359 ms |
38480 KB |
Output is correct |
66 |
Correct |
360 ms |
38740 KB |
Output is correct |
67 |
Correct |
341 ms |
38484 KB |
Output is correct |
68 |
Correct |
380 ms |
38740 KB |
Output is correct |
69 |
Correct |
376 ms |
39048 KB |
Output is correct |
70 |
Correct |
112 ms |
4976 KB |
Output is correct |
71 |
Correct |
93 ms |
4700 KB |
Output is correct |
72 |
Correct |
106 ms |
4696 KB |
Output is correct |
73 |
Correct |
93 ms |
4696 KB |
Output is correct |
74 |
Correct |
108 ms |
4944 KB |
Output is correct |
75 |
Correct |
117 ms |
6748 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
3 ms |
2396 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
1 ms |
2648 KB |
Output is correct |
5 |
Correct |
996 ms |
17032 KB |
Output is correct |
6 |
Correct |
1004 ms |
16984 KB |
Output is correct |
7 |
Correct |
907 ms |
17048 KB |
Output is correct |
8 |
Correct |
1006 ms |
17236 KB |
Output is correct |
9 |
Correct |
1034 ms |
17048 KB |
Output is correct |
10 |
Correct |
907 ms |
17232 KB |
Output is correct |
11 |
Correct |
1008 ms |
17232 KB |
Output is correct |
12 |
Correct |
1035 ms |
17044 KB |
Output is correct |
13 |
Correct |
0 ms |
2396 KB |
Output is correct |
14 |
Correct |
0 ms |
2396 KB |
Output is correct |
15 |
Correct |
1 ms |
2396 KB |
Output is correct |
16 |
Correct |
1 ms |
2396 KB |
Output is correct |
17 |
Correct |
1 ms |
2648 KB |
Output is correct |
18 |
Correct |
1 ms |
2396 KB |
Output is correct |
19 |
Correct |
0 ms |
2392 KB |
Output is correct |
20 |
Correct |
1 ms |
2396 KB |
Output is correct |
21 |
Correct |
1 ms |
2516 KB |
Output is correct |
22 |
Correct |
1 ms |
2392 KB |
Output is correct |
23 |
Correct |
1 ms |
2396 KB |
Output is correct |
24 |
Correct |
1 ms |
2396 KB |
Output is correct |
25 |
Correct |
0 ms |
2396 KB |
Output is correct |
26 |
Correct |
1 ms |
2396 KB |
Output is correct |
27 |
Correct |
1 ms |
2396 KB |
Output is correct |
28 |
Correct |
1 ms |
2396 KB |
Output is correct |
29 |
Correct |
1 ms |
2396 KB |
Output is correct |
30 |
Correct |
1 ms |
2396 KB |
Output is correct |
31 |
Correct |
1 ms |
2396 KB |
Output is correct |
32 |
Correct |
1 ms |
2396 KB |
Output is correct |
33 |
Correct |
1 ms |
2396 KB |
Output is correct |
34 |
Correct |
1 ms |
2396 KB |
Output is correct |
35 |
Correct |
1 ms |
2396 KB |
Output is correct |
36 |
Correct |
1 ms |
2396 KB |
Output is correct |
37 |
Correct |
1 ms |
2392 KB |
Output is correct |
38 |
Correct |
1 ms |
2392 KB |
Output is correct |
39 |
Correct |
1 ms |
2392 KB |
Output is correct |
40 |
Correct |
1 ms |
2396 KB |
Output is correct |
41 |
Correct |
12 ms |
4560 KB |
Output is correct |
42 |
Correct |
11 ms |
4744 KB |
Output is correct |
43 |
Correct |
12 ms |
4696 KB |
Output is correct |
44 |
Correct |
10 ms |
4696 KB |
Output is correct |
45 |
Correct |
12 ms |
4700 KB |
Output is correct |
46 |
Correct |
107 ms |
4700 KB |
Output is correct |
47 |
Correct |
94 ms |
4724 KB |
Output is correct |
48 |
Correct |
108 ms |
4700 KB |
Output is correct |
49 |
Correct |
93 ms |
4716 KB |
Output is correct |
50 |
Correct |
107 ms |
4700 KB |
Output is correct |
51 |
Correct |
1020 ms |
19296 KB |
Output is correct |
52 |
Correct |
979 ms |
19284 KB |
Output is correct |
53 |
Correct |
1051 ms |
19204 KB |
Output is correct |
54 |
Correct |
1048 ms |
19200 KB |
Output is correct |
55 |
Correct |
1 ms |
4444 KB |
Output is correct |
56 |
Correct |
120 ms |
6888 KB |
Output is correct |
57 |
Correct |
1 ms |
2396 KB |
Output is correct |
58 |
Correct |
64 ms |
27480 KB |
Output is correct |
59 |
Correct |
61 ms |
27472 KB |
Output is correct |
60 |
Correct |
46 ms |
26944 KB |
Output is correct |
61 |
Correct |
59 ms |
27480 KB |
Output is correct |
62 |
Correct |
47 ms |
26964 KB |
Output is correct |
63 |
Correct |
60 ms |
27476 KB |
Output is correct |
64 |
Correct |
1 ms |
2396 KB |
Output is correct |
65 |
Correct |
1 ms |
2396 KB |
Output is correct |
66 |
Correct |
1 ms |
2396 KB |
Output is correct |
67 |
Correct |
1 ms |
2396 KB |
Output is correct |
68 |
Correct |
1 ms |
2392 KB |
Output is correct |
69 |
Correct |
0 ms |
2396 KB |
Output is correct |
70 |
Correct |
0 ms |
2396 KB |
Output is correct |
71 |
Correct |
1 ms |
2392 KB |
Output is correct |
72 |
Correct |
1 ms |
2396 KB |
Output is correct |
73 |
Correct |
1 ms |
4444 KB |
Output is correct |
74 |
Correct |
1 ms |
2396 KB |
Output is correct |
75 |
Correct |
1 ms |
2648 KB |
Output is correct |
76 |
Correct |
167 ms |
32080 KB |
Output is correct |
77 |
Correct |
150 ms |
31572 KB |
Output is correct |
78 |
Correct |
158 ms |
31700 KB |
Output is correct |
79 |
Correct |
156 ms |
32336 KB |
Output is correct |
80 |
Correct |
151 ms |
32076 KB |
Output is correct |
81 |
Correct |
167 ms |
32208 KB |
Output is correct |
82 |
Correct |
165 ms |
32220 KB |
Output is correct |
83 |
Correct |
1 ms |
2392 KB |
Output is correct |
84 |
Correct |
1 ms |
2392 KB |
Output is correct |
85 |
Correct |
1 ms |
2396 KB |
Output is correct |
86 |
Correct |
1 ms |
2516 KB |
Output is correct |
87 |
Correct |
1 ms |
2396 KB |
Output is correct |
88 |
Correct |
1 ms |
2396 KB |
Output is correct |
89 |
Correct |
1 ms |
2396 KB |
Output is correct |
90 |
Correct |
1 ms |
2392 KB |
Output is correct |
91 |
Correct |
1 ms |
2396 KB |
Output is correct |
92 |
Correct |
1 ms |
2396 KB |
Output is correct |
93 |
Correct |
1 ms |
2396 KB |
Output is correct |
94 |
Correct |
1 ms |
2392 KB |
Output is correct |
95 |
Correct |
1 ms |
2396 KB |
Output is correct |
96 |
Correct |
1 ms |
2396 KB |
Output is correct |
97 |
Correct |
1 ms |
2396 KB |
Output is correct |
98 |
Correct |
1 ms |
2392 KB |
Output is correct |
99 |
Correct |
1 ms |
2392 KB |
Output is correct |
100 |
Correct |
1 ms |
2396 KB |
Output is correct |
101 |
Correct |
1 ms |
2396 KB |
Output is correct |
102 |
Correct |
4 ms |
2392 KB |
Output is correct |
103 |
Correct |
249 ms |
36592 KB |
Output is correct |
104 |
Correct |
211 ms |
34132 KB |
Output is correct |
105 |
Correct |
216 ms |
34264 KB |
Output is correct |
106 |
Correct |
216 ms |
36944 KB |
Output is correct |
107 |
Correct |
236 ms |
36748 KB |
Output is correct |
108 |
Correct |
228 ms |
36732 KB |
Output is correct |
109 |
Correct |
230 ms |
36948 KB |
Output is correct |
110 |
Correct |
12 ms |
4700 KB |
Output is correct |
111 |
Correct |
10 ms |
4740 KB |
Output is correct |
112 |
Correct |
13 ms |
4700 KB |
Output is correct |
113 |
Correct |
11 ms |
4696 KB |
Output is correct |
114 |
Correct |
12 ms |
4700 KB |
Output is correct |
115 |
Correct |
306 ms |
38228 KB |
Output is correct |
116 |
Correct |
213 ms |
19052 KB |
Output is correct |
117 |
Correct |
219 ms |
19324 KB |
Output is correct |
118 |
Correct |
220 ms |
19536 KB |
Output is correct |
119 |
Correct |
302 ms |
37972 KB |
Output is correct |
120 |
Correct |
380 ms |
38484 KB |
Output is correct |
121 |
Correct |
359 ms |
38480 KB |
Output is correct |
122 |
Correct |
360 ms |
38740 KB |
Output is correct |
123 |
Correct |
341 ms |
38484 KB |
Output is correct |
124 |
Correct |
380 ms |
38740 KB |
Output is correct |
125 |
Correct |
376 ms |
39048 KB |
Output is correct |
126 |
Correct |
112 ms |
4976 KB |
Output is correct |
127 |
Correct |
93 ms |
4700 KB |
Output is correct |
128 |
Correct |
106 ms |
4696 KB |
Output is correct |
129 |
Correct |
93 ms |
4696 KB |
Output is correct |
130 |
Correct |
108 ms |
4944 KB |
Output is correct |
131 |
Correct |
117 ms |
6748 KB |
Output is correct |
132 |
Correct |
1288 ms |
52852 KB |
Output is correct |
133 |
Correct |
1380 ms |
52860 KB |
Output is correct |
134 |
Correct |
1260 ms |
52760 KB |
Output is correct |
135 |
Correct |
1798 ms |
53076 KB |
Output is correct |
136 |
Correct |
1289 ms |
52924 KB |
Output is correct |
137 |
Correct |
744 ms |
45868 KB |
Output is correct |
138 |
Correct |
748 ms |
46064 KB |
Output is correct |
139 |
Correct |
1267 ms |
53076 KB |
Output is correct |
140 |
Correct |
1276 ms |
52592 KB |
Output is correct |
141 |
Correct |
1470 ms |
52564 KB |
Output is correct |
142 |
Correct |
1426 ms |
52864 KB |
Output is correct |