# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
985507 |
2024-05-18T02:09:58 Z |
vjudge2 |
Council (JOI23_council) |
C++17 |
|
978 ms |
72840 KB |
#include <bits/stdc++.h>
using namespace std;
inline int read() {
int x=0;char ch=getchar_unlocked();
while (!(ch >= '0' && ch <= '9')) ch=getchar_unlocked();
while (ch >= '0' && ch <= '9'){x=x*10+ch-48;ch=getchar_unlocked();}
return x;
}
void update(vector<pair<int, int>>& a, vector<pair<int, int>>& b) {
for (int i = b.size() - 1; i >= 0; i--) {
pair<int, int> p = b[i];
if (a.empty()) {
a.push_back(p);
continue;
}
if (a.size() == 1) {
if (a[0].second != p.second) {
a.push_back(p);
if (a[0].first < a[1].first) swap(a[0], a[1]);
}
continue;
}
if (p.second == a[0].second && p.first > a[0].first) a[0].first = p.first;
else if (p.second == a[0].second) continue;
else if (p.second == a[1].second && p.first > a[1].first) a[1].first = p.first;
else if (p.second != a[1].second) {
if (p.first >= a[0].first) a[1] = a[0], a[0] = p;
else if (p.first > a[1].first) a[1] = p;
}
if (a[0].first < a[1].first) swap(a[0], a[1]);
}
while ((int) a.size() > 2) a.pop_back();
}
int main() {
ios::sync_with_stdio(0); cin.tie(0);
int n = read(), m = read();
vector<int> a(n, 0), freq(m, 0), b(n, 0);
vector<vector<pair<int, int>>> dp(1 << m);
for (int i = 0; i < n; i++) {
int x;
for (int j = 0; j < m; j++) {
x = read();
a[i] += (x << j);
b[i] += ((1 - x) << j);
if (x) freq[j]++;
}
// bitset<6> bs(b[i]);
// cout << bs.to_string() << '\n';
if (dp[b[i]].size() < 2) dp[b[i]].emplace_back(__builtin_popcount(b[i]), i);
}
// 4 6
// 1 1 0 0 1 1
// 1 0 1 1 1 1
// 0 0 0 0 0 1
// 0 1 1 1 0 0
// max(popcount(b[sth] & s))..
for (int i = (1 << m) - 1; i >= 0; i--) {
for (int j = 0; j < m; j++) {
if (i & (1 << j)) {
int k = (i ^ (1 << j));
vector<pair<int, int>> t = dp[i];
for (auto& [x, y] : t) if (x != -1) x--;
update(dp[k], t);
}
}
}
// for (int i = 0; i < (1 << m); i++) {
// bitset<6> bs(i);
// cout << bs.to_string() << '\n';
// cout << dp[i][0].first << ' ' << dp[i][1].first << '\n';
// }
for (int i = 0; i < (1 << m); i++) {
for (int j = 0; j < m; j++) {
if (i & (1 << j)) {
int k = (i ^ (1 << j));
// if (i == 23) cout << "debug: " << dp[i][0].first << ' ' << dp[i][1].first << ' ' << dp[k][0].first << ' ' << dp[k][1].first << '\n';
update(dp[i], dp[k]);
// if (i == 23) cout << "debug: " << dp[i][0].first << ' ' << dp[i][1].first << '\n';
}
}
// bitset<6> bs(i);
// cout << bs.to_string() << '\n';
// cout << dp[i][0].first << ' ' << dp[i][1].first << '\n';
}
for (int i = 0; i < n; i++) {
int ans = 0, sub = 0;
for (int j = 0; j < m; j++) {
int cnter = freq[j];
if (a[i] & (1 << j)) cnter--;
if (cnter > n / 2) ans++;
else if (cnter == n / 2) {
sub += (1 << j);
// cout << "crit: " << j << '\n';
}
}
// cout << ans << '\n';
// cout << dp[sub][0].first << ' ' << dp[sub][0].second << '\n';
// cout << dp[sub][1].first << ' ' << dp[sub][1].second << '\n';
if (i == dp[sub][0].second) cout << ans + dp[sub][1].first << '\n';
else cout << ans + dp[sub][0].first << '\n';
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
2 ms |
604 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
423 ms |
57840 KB |
Output is correct |
6 |
Correct |
330 ms |
57864 KB |
Output is correct |
7 |
Correct |
385 ms |
57776 KB |
Output is correct |
8 |
Correct |
449 ms |
57676 KB |
Output is correct |
9 |
Correct |
582 ms |
57888 KB |
Output is correct |
10 |
Correct |
406 ms |
57856 KB |
Output is correct |
11 |
Correct |
460 ms |
57660 KB |
Output is correct |
12 |
Correct |
530 ms |
57736 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
456 KB |
Output is correct |
18 |
Correct |
0 ms |
344 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
600 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
1 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
344 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
600 KB |
Output is correct |
38 |
Correct |
1 ms |
348 KB |
Output is correct |
39 |
Correct |
1 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
344 KB |
Output is correct |
41 |
Correct |
5 ms |
1112 KB |
Output is correct |
42 |
Correct |
6 ms |
1152 KB |
Output is correct |
43 |
Correct |
6 ms |
1116 KB |
Output is correct |
44 |
Correct |
6 ms |
1312 KB |
Output is correct |
45 |
Correct |
6 ms |
1116 KB |
Output is correct |
46 |
Correct |
47 ms |
7612 KB |
Output is correct |
47 |
Correct |
44 ms |
7612 KB |
Output is correct |
48 |
Correct |
50 ms |
7772 KB |
Output is correct |
49 |
Correct |
44 ms |
7508 KB |
Output is correct |
50 |
Correct |
50 ms |
7508 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
2 ms |
604 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
423 ms |
57840 KB |
Output is correct |
6 |
Correct |
330 ms |
57864 KB |
Output is correct |
7 |
Correct |
385 ms |
57776 KB |
Output is correct |
8 |
Correct |
449 ms |
57676 KB |
Output is correct |
9 |
Correct |
582 ms |
57888 KB |
Output is correct |
10 |
Correct |
406 ms |
57856 KB |
Output is correct |
11 |
Correct |
460 ms |
57660 KB |
Output is correct |
12 |
Correct |
530 ms |
57736 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
456 KB |
Output is correct |
18 |
Correct |
0 ms |
344 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
600 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
1 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
344 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
600 KB |
Output is correct |
38 |
Correct |
1 ms |
348 KB |
Output is correct |
39 |
Correct |
1 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
344 KB |
Output is correct |
41 |
Correct |
5 ms |
1112 KB |
Output is correct |
42 |
Correct |
6 ms |
1152 KB |
Output is correct |
43 |
Correct |
6 ms |
1116 KB |
Output is correct |
44 |
Correct |
6 ms |
1312 KB |
Output is correct |
45 |
Correct |
6 ms |
1116 KB |
Output is correct |
46 |
Correct |
47 ms |
7612 KB |
Output is correct |
47 |
Correct |
44 ms |
7612 KB |
Output is correct |
48 |
Correct |
50 ms |
7772 KB |
Output is correct |
49 |
Correct |
44 ms |
7508 KB |
Output is correct |
50 |
Correct |
50 ms |
7508 KB |
Output is correct |
51 |
Correct |
329 ms |
57944 KB |
Output is correct |
52 |
Correct |
527 ms |
57936 KB |
Output is correct |
53 |
Correct |
743 ms |
57684 KB |
Output is correct |
54 |
Correct |
684 ms |
57936 KB |
Output is correct |
55 |
Correct |
1 ms |
344 KB |
Output is correct |
56 |
Correct |
72 ms |
7444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
22 ms |
3324 KB |
Output is correct |
3 |
Correct |
23 ms |
3160 KB |
Output is correct |
4 |
Correct |
26 ms |
3220 KB |
Output is correct |
5 |
Correct |
26 ms |
3344 KB |
Output is correct |
6 |
Correct |
25 ms |
3164 KB |
Output is correct |
7 |
Correct |
26 ms |
3304 KB |
Output is correct |
8 |
Correct |
0 ms |
600 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
344 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
344 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
22 ms |
3324 KB |
Output is correct |
3 |
Correct |
23 ms |
3160 KB |
Output is correct |
4 |
Correct |
26 ms |
3220 KB |
Output is correct |
5 |
Correct |
26 ms |
3344 KB |
Output is correct |
6 |
Correct |
25 ms |
3164 KB |
Output is correct |
7 |
Correct |
26 ms |
3304 KB |
Output is correct |
8 |
Correct |
0 ms |
600 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
344 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
344 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
344 KB |
Output is correct |
18 |
Correct |
0 ms |
344 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
54 ms |
3352 KB |
Output is correct |
21 |
Correct |
50 ms |
3408 KB |
Output is correct |
22 |
Correct |
50 ms |
3412 KB |
Output is correct |
23 |
Correct |
38 ms |
3656 KB |
Output is correct |
24 |
Correct |
44 ms |
3328 KB |
Output is correct |
25 |
Correct |
48 ms |
3428 KB |
Output is correct |
26 |
Correct |
59 ms |
3408 KB |
Output is correct |
27 |
Correct |
1 ms |
600 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
1 ms |
344 KB |
Output is correct |
30 |
Correct |
0 ms |
344 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
360 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
344 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
1 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
22 ms |
3324 KB |
Output is correct |
3 |
Correct |
23 ms |
3160 KB |
Output is correct |
4 |
Correct |
26 ms |
3220 KB |
Output is correct |
5 |
Correct |
26 ms |
3344 KB |
Output is correct |
6 |
Correct |
25 ms |
3164 KB |
Output is correct |
7 |
Correct |
26 ms |
3304 KB |
Output is correct |
8 |
Correct |
0 ms |
600 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
344 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
344 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
344 KB |
Output is correct |
18 |
Correct |
0 ms |
344 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
54 ms |
3352 KB |
Output is correct |
21 |
Correct |
50 ms |
3408 KB |
Output is correct |
22 |
Correct |
50 ms |
3412 KB |
Output is correct |
23 |
Correct |
38 ms |
3656 KB |
Output is correct |
24 |
Correct |
44 ms |
3328 KB |
Output is correct |
25 |
Correct |
48 ms |
3428 KB |
Output is correct |
26 |
Correct |
59 ms |
3408 KB |
Output is correct |
27 |
Correct |
1 ms |
600 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
1 ms |
344 KB |
Output is correct |
30 |
Correct |
0 ms |
344 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
360 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
344 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
1 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
348 KB |
Output is correct |
46 |
Correct |
2 ms |
604 KB |
Output is correct |
47 |
Correct |
90 ms |
4076 KB |
Output is correct |
48 |
Correct |
80 ms |
3668 KB |
Output is correct |
49 |
Correct |
69 ms |
3668 KB |
Output is correct |
50 |
Correct |
52 ms |
4436 KB |
Output is correct |
51 |
Correct |
53 ms |
4180 KB |
Output is correct |
52 |
Correct |
68 ms |
4100 KB |
Output is correct |
53 |
Correct |
93 ms |
4396 KB |
Output is correct |
54 |
Correct |
6 ms |
1112 KB |
Output is correct |
55 |
Correct |
7 ms |
1112 KB |
Output is correct |
56 |
Correct |
6 ms |
1116 KB |
Output is correct |
57 |
Correct |
5 ms |
1116 KB |
Output is correct |
58 |
Correct |
6 ms |
1116 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
22 ms |
3324 KB |
Output is correct |
3 |
Correct |
23 ms |
3160 KB |
Output is correct |
4 |
Correct |
26 ms |
3220 KB |
Output is correct |
5 |
Correct |
26 ms |
3344 KB |
Output is correct |
6 |
Correct |
25 ms |
3164 KB |
Output is correct |
7 |
Correct |
26 ms |
3304 KB |
Output is correct |
8 |
Correct |
0 ms |
600 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
344 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
344 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
344 KB |
Output is correct |
18 |
Correct |
0 ms |
344 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
54 ms |
3352 KB |
Output is correct |
21 |
Correct |
50 ms |
3408 KB |
Output is correct |
22 |
Correct |
50 ms |
3412 KB |
Output is correct |
23 |
Correct |
38 ms |
3656 KB |
Output is correct |
24 |
Correct |
44 ms |
3328 KB |
Output is correct |
25 |
Correct |
48 ms |
3428 KB |
Output is correct |
26 |
Correct |
59 ms |
3408 KB |
Output is correct |
27 |
Correct |
1 ms |
600 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
1 ms |
344 KB |
Output is correct |
30 |
Correct |
0 ms |
344 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
360 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
344 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
1 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
348 KB |
Output is correct |
46 |
Correct |
2 ms |
604 KB |
Output is correct |
47 |
Correct |
90 ms |
4076 KB |
Output is correct |
48 |
Correct |
80 ms |
3668 KB |
Output is correct |
49 |
Correct |
69 ms |
3668 KB |
Output is correct |
50 |
Correct |
52 ms |
4436 KB |
Output is correct |
51 |
Correct |
53 ms |
4180 KB |
Output is correct |
52 |
Correct |
68 ms |
4100 KB |
Output is correct |
53 |
Correct |
93 ms |
4396 KB |
Output is correct |
54 |
Correct |
6 ms |
1112 KB |
Output is correct |
55 |
Correct |
7 ms |
1112 KB |
Output is correct |
56 |
Correct |
6 ms |
1116 KB |
Output is correct |
57 |
Correct |
5 ms |
1116 KB |
Output is correct |
58 |
Correct |
6 ms |
1116 KB |
Output is correct |
59 |
Correct |
90 ms |
7252 KB |
Output is correct |
60 |
Correct |
99 ms |
8788 KB |
Output is correct |
61 |
Correct |
103 ms |
8732 KB |
Output is correct |
62 |
Correct |
103 ms |
8788 KB |
Output is correct |
63 |
Correct |
108 ms |
6740 KB |
Output is correct |
64 |
Correct |
139 ms |
10580 KB |
Output is correct |
65 |
Correct |
140 ms |
10324 KB |
Output is correct |
66 |
Correct |
96 ms |
10752 KB |
Output is correct |
67 |
Correct |
109 ms |
10580 KB |
Output is correct |
68 |
Correct |
144 ms |
10420 KB |
Output is correct |
69 |
Correct |
195 ms |
10664 KB |
Output is correct |
70 |
Correct |
52 ms |
7760 KB |
Output is correct |
71 |
Correct |
44 ms |
7508 KB |
Output is correct |
72 |
Correct |
52 ms |
7504 KB |
Output is correct |
73 |
Correct |
45 ms |
7504 KB |
Output is correct |
74 |
Correct |
49 ms |
7504 KB |
Output is correct |
75 |
Correct |
77 ms |
7720 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
2 ms |
604 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
423 ms |
57840 KB |
Output is correct |
6 |
Correct |
330 ms |
57864 KB |
Output is correct |
7 |
Correct |
385 ms |
57776 KB |
Output is correct |
8 |
Correct |
449 ms |
57676 KB |
Output is correct |
9 |
Correct |
582 ms |
57888 KB |
Output is correct |
10 |
Correct |
406 ms |
57856 KB |
Output is correct |
11 |
Correct |
460 ms |
57660 KB |
Output is correct |
12 |
Correct |
530 ms |
57736 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
456 KB |
Output is correct |
18 |
Correct |
0 ms |
344 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
600 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
1 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
344 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
600 KB |
Output is correct |
38 |
Correct |
1 ms |
348 KB |
Output is correct |
39 |
Correct |
1 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
344 KB |
Output is correct |
41 |
Correct |
5 ms |
1112 KB |
Output is correct |
42 |
Correct |
6 ms |
1152 KB |
Output is correct |
43 |
Correct |
6 ms |
1116 KB |
Output is correct |
44 |
Correct |
6 ms |
1312 KB |
Output is correct |
45 |
Correct |
6 ms |
1116 KB |
Output is correct |
46 |
Correct |
47 ms |
7612 KB |
Output is correct |
47 |
Correct |
44 ms |
7612 KB |
Output is correct |
48 |
Correct |
50 ms |
7772 KB |
Output is correct |
49 |
Correct |
44 ms |
7508 KB |
Output is correct |
50 |
Correct |
50 ms |
7508 KB |
Output is correct |
51 |
Correct |
329 ms |
57944 KB |
Output is correct |
52 |
Correct |
527 ms |
57936 KB |
Output is correct |
53 |
Correct |
743 ms |
57684 KB |
Output is correct |
54 |
Correct |
684 ms |
57936 KB |
Output is correct |
55 |
Correct |
1 ms |
344 KB |
Output is correct |
56 |
Correct |
72 ms |
7444 KB |
Output is correct |
57 |
Correct |
0 ms |
348 KB |
Output is correct |
58 |
Correct |
22 ms |
3324 KB |
Output is correct |
59 |
Correct |
23 ms |
3160 KB |
Output is correct |
60 |
Correct |
26 ms |
3220 KB |
Output is correct |
61 |
Correct |
26 ms |
3344 KB |
Output is correct |
62 |
Correct |
25 ms |
3164 KB |
Output is correct |
63 |
Correct |
26 ms |
3304 KB |
Output is correct |
64 |
Correct |
0 ms |
600 KB |
Output is correct |
65 |
Correct |
0 ms |
348 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
0 ms |
344 KB |
Output is correct |
68 |
Correct |
0 ms |
344 KB |
Output is correct |
69 |
Correct |
0 ms |
348 KB |
Output is correct |
70 |
Correct |
1 ms |
344 KB |
Output is correct |
71 |
Correct |
0 ms |
348 KB |
Output is correct |
72 |
Correct |
0 ms |
348 KB |
Output is correct |
73 |
Correct |
1 ms |
344 KB |
Output is correct |
74 |
Correct |
0 ms |
344 KB |
Output is correct |
75 |
Correct |
0 ms |
348 KB |
Output is correct |
76 |
Correct |
54 ms |
3352 KB |
Output is correct |
77 |
Correct |
50 ms |
3408 KB |
Output is correct |
78 |
Correct |
50 ms |
3412 KB |
Output is correct |
79 |
Correct |
38 ms |
3656 KB |
Output is correct |
80 |
Correct |
44 ms |
3328 KB |
Output is correct |
81 |
Correct |
48 ms |
3428 KB |
Output is correct |
82 |
Correct |
59 ms |
3408 KB |
Output is correct |
83 |
Correct |
1 ms |
600 KB |
Output is correct |
84 |
Correct |
0 ms |
348 KB |
Output is correct |
85 |
Correct |
1 ms |
344 KB |
Output is correct |
86 |
Correct |
0 ms |
344 KB |
Output is correct |
87 |
Correct |
0 ms |
348 KB |
Output is correct |
88 |
Correct |
0 ms |
348 KB |
Output is correct |
89 |
Correct |
0 ms |
348 KB |
Output is correct |
90 |
Correct |
0 ms |
348 KB |
Output is correct |
91 |
Correct |
1 ms |
360 KB |
Output is correct |
92 |
Correct |
1 ms |
348 KB |
Output is correct |
93 |
Correct |
1 ms |
344 KB |
Output is correct |
94 |
Correct |
0 ms |
348 KB |
Output is correct |
95 |
Correct |
0 ms |
348 KB |
Output is correct |
96 |
Correct |
0 ms |
348 KB |
Output is correct |
97 |
Correct |
0 ms |
348 KB |
Output is correct |
98 |
Correct |
0 ms |
348 KB |
Output is correct |
99 |
Correct |
0 ms |
348 KB |
Output is correct |
100 |
Correct |
1 ms |
348 KB |
Output is correct |
101 |
Correct |
1 ms |
348 KB |
Output is correct |
102 |
Correct |
2 ms |
604 KB |
Output is correct |
103 |
Correct |
90 ms |
4076 KB |
Output is correct |
104 |
Correct |
80 ms |
3668 KB |
Output is correct |
105 |
Correct |
69 ms |
3668 KB |
Output is correct |
106 |
Correct |
52 ms |
4436 KB |
Output is correct |
107 |
Correct |
53 ms |
4180 KB |
Output is correct |
108 |
Correct |
68 ms |
4100 KB |
Output is correct |
109 |
Correct |
93 ms |
4396 KB |
Output is correct |
110 |
Correct |
6 ms |
1112 KB |
Output is correct |
111 |
Correct |
7 ms |
1112 KB |
Output is correct |
112 |
Correct |
6 ms |
1116 KB |
Output is correct |
113 |
Correct |
5 ms |
1116 KB |
Output is correct |
114 |
Correct |
6 ms |
1116 KB |
Output is correct |
115 |
Correct |
90 ms |
7252 KB |
Output is correct |
116 |
Correct |
99 ms |
8788 KB |
Output is correct |
117 |
Correct |
103 ms |
8732 KB |
Output is correct |
118 |
Correct |
103 ms |
8788 KB |
Output is correct |
119 |
Correct |
108 ms |
6740 KB |
Output is correct |
120 |
Correct |
139 ms |
10580 KB |
Output is correct |
121 |
Correct |
140 ms |
10324 KB |
Output is correct |
122 |
Correct |
96 ms |
10752 KB |
Output is correct |
123 |
Correct |
109 ms |
10580 KB |
Output is correct |
124 |
Correct |
144 ms |
10420 KB |
Output is correct |
125 |
Correct |
195 ms |
10664 KB |
Output is correct |
126 |
Correct |
52 ms |
7760 KB |
Output is correct |
127 |
Correct |
44 ms |
7508 KB |
Output is correct |
128 |
Correct |
52 ms |
7504 KB |
Output is correct |
129 |
Correct |
45 ms |
7504 KB |
Output is correct |
130 |
Correct |
49 ms |
7504 KB |
Output is correct |
131 |
Correct |
77 ms |
7720 KB |
Output is correct |
132 |
Correct |
766 ms |
61536 KB |
Output is correct |
133 |
Correct |
822 ms |
72512 KB |
Output is correct |
134 |
Correct |
823 ms |
72824 KB |
Output is correct |
135 |
Correct |
696 ms |
72812 KB |
Output is correct |
136 |
Correct |
913 ms |
72768 KB |
Output is correct |
137 |
Correct |
375 ms |
43348 KB |
Output is correct |
138 |
Correct |
404 ms |
43420 KB |
Output is correct |
139 |
Correct |
390 ms |
72712 KB |
Output is correct |
140 |
Correct |
582 ms |
72492 KB |
Output is correct |
141 |
Correct |
833 ms |
72532 KB |
Output is correct |
142 |
Correct |
978 ms |
72840 KB |
Output is correct |