# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1029933 |
2024-07-21T14:05:42 Z |
adaawf |
Council (JOI23_council) |
C++17 |
|
2041 ms |
152980 KB |
#include <bits/stdc++.h>
using namespace std;
bool a[300005][21];
int c[21], da[21], db[21], z = 0, zz = 0;
int x[300005], y[300005];
vector<vector<int>> g;
#define pii pair<int, int>
vector<vector<pair<pii, pii>>> dd;
priority_queue<pair<long long int, pii>> q;
int ch(int x) {
return __builtin_popcount(x);
}
vector<pair<int, int>> vv;
void trans(int x, int y, int z, int t, int w, int l) {
vv.clear();
int h = 2;
if (dd[z][t].first.first == -1) h = 0;
else if (dd[z][t].second.first == -1) h = 1;
vv.push_back({dd[x][y].first.first - l, dd[x][y].first.second});
vv.push_back({dd[x][y].second.first - l, dd[x][y].second.second});
vv.push_back(dd[z][t].first);
vv.push_back(dd[z][t].second);
pii k = {-1, -1}, res = k;
for (auto w : vv) {
if (w.first > k.first) k = w;
}
for (auto w : vv) {
if (w.first > res.first && w.second != k.second) {
res = w;
}
}
dd[z][t].second = {-1, -1};
dd[z][t].first = k;
int g = 1;
if (res.first != -1) dd[z][t].second = res, g = 2;
if (g != h) q.push({w, {z, t}});
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int n, m, l = 0;
cin >> n >> m;
for (int i = 1; i <= n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
c[j] += a[i][j];
}
}
for (int j = 0; j < m; j++) {
if (c[j] == n / 2) {
da[j] = ++z;
}
else if (c[j] == (n / 2) + 1) {
db[j] = ++zz;
}
else if (c[j] < n / 2) l++;
}
for (int i = 1; i <= n; i++) {
int h = 0, k = 0;
for (int j = 0; j < m; j++) {
if (a[i][j] == 1) {
if (da[j] != 0) {
h += (1 << (da[j] - 1));
}
else if (db[j] != 0) {
k += (1 << (db[j] - 1));
}
}
}
x[i] = (1 << z) - h - 1;
y[i] = (1 << zz) - k - 1;
}
g = vector<vector<int>>((1 << z), vector<int>(1 << zz, 0));
dd = vector<vector<pair<pii, pii>>>((1 << z), vector<pair<pii, pii>>(1 << zz, {{-1, -1}, {-1, -1}}));
for (int i = 1; i <= n; i++) {
int flag = 0;
if (dd[x[i]][y[i]].first.first == -1) {
dd[x[i]][y[i]].first = {ch(x[i]) + ch(y[i]), i};
flag = 1;
}
else dd[x[i]][y[i]].second = {ch(x[i]) + ch(y[i]), i};
if (flag == 1) q.push({ch(x[i]) + ch(y[i]), {x[i], y[i]}});
}
while (!q.empty()) {
auto p = q.top();
q.pop();
int x = p.first, u = p.second.first, v = p.second.second;
if (g[u][v] == 1) continue;
g[u][v] = 1;
//cout << u << " " << v << " " << dd[u][v].first.first << " " << dd[u][v].first.second << " " << dd[u][v].second.first << " " << dd[u][v].second.second << '\n';
for (int i = 0; i < z; i++) {
if (u & (1 << i)) {
trans(u, v, u - (1 << i), v, x - 1, 1);
}
}
for (int i = 0; i < zz; i++) {
if (v & (1 << i)) {
trans(u, v, u, v - (1 << i), x - 1, 1);
}
}
}
for (int i = 0; i < (1 << z); i++) {
for (int j = 0; j < (1 << zz); j++) {
if (g[i][j] == 1) {
q.push({ch(i) + ch(j), {i, j}});
}
}
}
while (!q.empty()) {
auto p = q.top();
q.pop();
int x = p.first, u = p.second.first, v = p.second.second;
for (int i = 0; i < z; i++) {
if (!(u & (1 << i))) {
trans(u, v, u + (1 << i), v, x, 0);
}
}
for (int i = 0; i < zz; i++) {
if (!(v & (1 << i))) {
trans(u, v, u, v + (1 << i), x, 0);
}
}
}
for (int i = 1; i <= n; i++) {
int h = 0;
vector<pair<int, int>> v;
v.push_back(dd[x[i]][(1 << zz) - y[i] - 1].first);
v.push_back(dd[x[i]][(1 << zz) - y[i] - 1].second);
for (auto w : v) {
if (w.second != i) {
h = max(h, w.first);
//cout << i << " " << x[i] << " " << (1 << zz) - y[i] - 1 << " " << w.first << " " << w.second << '\n';
}
}
h += ch(y[i]);
cout << m - (z + zz - h) - l << '\n';
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4556 KB |
Output is correct |
2 |
Correct |
1 ms |
4444 KB |
Output is correct |
3 |
Correct |
1 ms |
4444 KB |
Output is correct |
4 |
Correct |
1 ms |
4444 KB |
Output is correct |
5 |
Correct |
824 ms |
88536 KB |
Output is correct |
6 |
Correct |
1 ms |
4440 KB |
Output is correct |
7 |
Correct |
1 ms |
4440 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
2 ms |
4444 KB |
Output is correct |
10 |
Correct |
898 ms |
26128 KB |
Output is correct |
11 |
Correct |
911 ms |
25804 KB |
Output is correct |
12 |
Correct |
1076 ms |
34028 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4556 KB |
Output is correct |
15 |
Correct |
1 ms |
4440 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
1 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
4444 KB |
Output is correct |
19 |
Correct |
1 ms |
4440 KB |
Output is correct |
20 |
Correct |
1 ms |
4444 KB |
Output is correct |
21 |
Correct |
1 ms |
4568 KB |
Output is correct |
22 |
Correct |
1 ms |
4556 KB |
Output is correct |
23 |
Correct |
1 ms |
4444 KB |
Output is correct |
24 |
Correct |
1 ms |
4700 KB |
Output is correct |
25 |
Correct |
1 ms |
4700 KB |
Output is correct |
26 |
Correct |
1 ms |
4456 KB |
Output is correct |
27 |
Correct |
1 ms |
4444 KB |
Output is correct |
28 |
Correct |
1 ms |
4444 KB |
Output is correct |
29 |
Correct |
1 ms |
4444 KB |
Output is correct |
30 |
Correct |
1 ms |
4444 KB |
Output is correct |
31 |
Correct |
1 ms |
4444 KB |
Output is correct |
32 |
Correct |
1 ms |
4444 KB |
Output is correct |
33 |
Correct |
1 ms |
4444 KB |
Output is correct |
34 |
Correct |
1 ms |
4444 KB |
Output is correct |
35 |
Correct |
1 ms |
4444 KB |
Output is correct |
36 |
Correct |
1 ms |
4560 KB |
Output is correct |
37 |
Correct |
1 ms |
4576 KB |
Output is correct |
38 |
Correct |
2 ms |
4444 KB |
Output is correct |
39 |
Correct |
2 ms |
4444 KB |
Output is correct |
40 |
Correct |
1 ms |
4444 KB |
Output is correct |
41 |
Correct |
9 ms |
5980 KB |
Output is correct |
42 |
Correct |
1 ms |
4440 KB |
Output is correct |
43 |
Correct |
1 ms |
4560 KB |
Output is correct |
44 |
Correct |
9 ms |
4812 KB |
Output is correct |
45 |
Correct |
10 ms |
4816 KB |
Output is correct |
46 |
Correct |
74 ms |
14728 KB |
Output is correct |
47 |
Correct |
2 ms |
4440 KB |
Output is correct |
48 |
Correct |
2 ms |
4696 KB |
Output is correct |
49 |
Correct |
96 ms |
7348 KB |
Output is correct |
50 |
Correct |
92 ms |
7640 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4556 KB |
Output is correct |
2 |
Correct |
1 ms |
4444 KB |
Output is correct |
3 |
Correct |
1 ms |
4444 KB |
Output is correct |
4 |
Correct |
1 ms |
4444 KB |
Output is correct |
5 |
Correct |
824 ms |
88536 KB |
Output is correct |
6 |
Correct |
1 ms |
4440 KB |
Output is correct |
7 |
Correct |
1 ms |
4440 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
2 ms |
4444 KB |
Output is correct |
10 |
Correct |
898 ms |
26128 KB |
Output is correct |
11 |
Correct |
911 ms |
25804 KB |
Output is correct |
12 |
Correct |
1076 ms |
34028 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4556 KB |
Output is correct |
15 |
Correct |
1 ms |
4440 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
1 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
4444 KB |
Output is correct |
19 |
Correct |
1 ms |
4440 KB |
Output is correct |
20 |
Correct |
1 ms |
4444 KB |
Output is correct |
21 |
Correct |
1 ms |
4568 KB |
Output is correct |
22 |
Correct |
1 ms |
4556 KB |
Output is correct |
23 |
Correct |
1 ms |
4444 KB |
Output is correct |
24 |
Correct |
1 ms |
4700 KB |
Output is correct |
25 |
Correct |
1 ms |
4700 KB |
Output is correct |
26 |
Correct |
1 ms |
4456 KB |
Output is correct |
27 |
Correct |
1 ms |
4444 KB |
Output is correct |
28 |
Correct |
1 ms |
4444 KB |
Output is correct |
29 |
Correct |
1 ms |
4444 KB |
Output is correct |
30 |
Correct |
1 ms |
4444 KB |
Output is correct |
31 |
Correct |
1 ms |
4444 KB |
Output is correct |
32 |
Correct |
1 ms |
4444 KB |
Output is correct |
33 |
Correct |
1 ms |
4444 KB |
Output is correct |
34 |
Correct |
1 ms |
4444 KB |
Output is correct |
35 |
Correct |
1 ms |
4444 KB |
Output is correct |
36 |
Correct |
1 ms |
4560 KB |
Output is correct |
37 |
Correct |
1 ms |
4576 KB |
Output is correct |
38 |
Correct |
2 ms |
4444 KB |
Output is correct |
39 |
Correct |
2 ms |
4444 KB |
Output is correct |
40 |
Correct |
1 ms |
4444 KB |
Output is correct |
41 |
Correct |
9 ms |
5980 KB |
Output is correct |
42 |
Correct |
1 ms |
4440 KB |
Output is correct |
43 |
Correct |
1 ms |
4560 KB |
Output is correct |
44 |
Correct |
9 ms |
4812 KB |
Output is correct |
45 |
Correct |
10 ms |
4816 KB |
Output is correct |
46 |
Correct |
74 ms |
14728 KB |
Output is correct |
47 |
Correct |
2 ms |
4440 KB |
Output is correct |
48 |
Correct |
2 ms |
4696 KB |
Output is correct |
49 |
Correct |
96 ms |
7348 KB |
Output is correct |
50 |
Correct |
92 ms |
7640 KB |
Output is correct |
51 |
Correct |
6 ms |
4696 KB |
Output is correct |
52 |
Correct |
4 ms |
4696 KB |
Output is correct |
53 |
Correct |
6 ms |
4700 KB |
Output is correct |
54 |
Correct |
1006 ms |
42784 KB |
Output is correct |
55 |
Correct |
2 ms |
4564 KB |
Output is correct |
56 |
Correct |
103 ms |
9412 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4552 KB |
Output is correct |
2 |
Correct |
47 ms |
10548 KB |
Output is correct |
3 |
Correct |
52 ms |
10576 KB |
Output is correct |
4 |
Correct |
40 ms |
10064 KB |
Output is correct |
5 |
Correct |
65 ms |
10940 KB |
Output is correct |
6 |
Correct |
49 ms |
9920 KB |
Output is correct |
7 |
Correct |
55 ms |
10672 KB |
Output is correct |
8 |
Correct |
1 ms |
4696 KB |
Output is correct |
9 |
Correct |
1 ms |
4700 KB |
Output is correct |
10 |
Correct |
1 ms |
4440 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4440 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
2 ms |
4556 KB |
Output is correct |
17 |
Correct |
1 ms |
4560 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4552 KB |
Output is correct |
2 |
Correct |
47 ms |
10548 KB |
Output is correct |
3 |
Correct |
52 ms |
10576 KB |
Output is correct |
4 |
Correct |
40 ms |
10064 KB |
Output is correct |
5 |
Correct |
65 ms |
10940 KB |
Output is correct |
6 |
Correct |
49 ms |
9920 KB |
Output is correct |
7 |
Correct |
55 ms |
10672 KB |
Output is correct |
8 |
Correct |
1 ms |
4696 KB |
Output is correct |
9 |
Correct |
1 ms |
4700 KB |
Output is correct |
10 |
Correct |
1 ms |
4440 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4440 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
2 ms |
4556 KB |
Output is correct |
17 |
Correct |
1 ms |
4560 KB |
Output is correct |
18 |
Correct |
1 ms |
4556 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
193 ms |
15404 KB |
Output is correct |
21 |
Correct |
183 ms |
14672 KB |
Output is correct |
22 |
Correct |
180 ms |
14640 KB |
Output is correct |
23 |
Correct |
165 ms |
15680 KB |
Output is correct |
24 |
Correct |
167 ms |
15280 KB |
Output is correct |
25 |
Correct |
168 ms |
15296 KB |
Output is correct |
26 |
Correct |
200 ms |
15444 KB |
Output is correct |
27 |
Correct |
1 ms |
4444 KB |
Output is correct |
28 |
Correct |
1 ms |
4700 KB |
Output is correct |
29 |
Correct |
1 ms |
4700 KB |
Output is correct |
30 |
Correct |
1 ms |
4440 KB |
Output is correct |
31 |
Correct |
1 ms |
4444 KB |
Output is correct |
32 |
Correct |
1 ms |
4444 KB |
Output is correct |
33 |
Correct |
1 ms |
4444 KB |
Output is correct |
34 |
Correct |
1 ms |
4444 KB |
Output is correct |
35 |
Correct |
1 ms |
4444 KB |
Output is correct |
36 |
Correct |
1 ms |
4444 KB |
Output is correct |
37 |
Correct |
1 ms |
4444 KB |
Output is correct |
38 |
Correct |
1 ms |
4444 KB |
Output is correct |
39 |
Correct |
1 ms |
4564 KB |
Output is correct |
40 |
Correct |
1 ms |
4444 KB |
Output is correct |
41 |
Correct |
1 ms |
4440 KB |
Output is correct |
42 |
Correct |
1 ms |
4700 KB |
Output is correct |
43 |
Correct |
1 ms |
4444 KB |
Output is correct |
44 |
Correct |
2 ms |
4440 KB |
Output is correct |
45 |
Correct |
2 ms |
4444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4552 KB |
Output is correct |
2 |
Correct |
47 ms |
10548 KB |
Output is correct |
3 |
Correct |
52 ms |
10576 KB |
Output is correct |
4 |
Correct |
40 ms |
10064 KB |
Output is correct |
5 |
Correct |
65 ms |
10940 KB |
Output is correct |
6 |
Correct |
49 ms |
9920 KB |
Output is correct |
7 |
Correct |
55 ms |
10672 KB |
Output is correct |
8 |
Correct |
1 ms |
4696 KB |
Output is correct |
9 |
Correct |
1 ms |
4700 KB |
Output is correct |
10 |
Correct |
1 ms |
4440 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4440 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
2 ms |
4556 KB |
Output is correct |
17 |
Correct |
1 ms |
4560 KB |
Output is correct |
18 |
Correct |
1 ms |
4556 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
193 ms |
15404 KB |
Output is correct |
21 |
Correct |
183 ms |
14672 KB |
Output is correct |
22 |
Correct |
180 ms |
14640 KB |
Output is correct |
23 |
Correct |
165 ms |
15680 KB |
Output is correct |
24 |
Correct |
167 ms |
15280 KB |
Output is correct |
25 |
Correct |
168 ms |
15296 KB |
Output is correct |
26 |
Correct |
200 ms |
15444 KB |
Output is correct |
27 |
Correct |
1 ms |
4444 KB |
Output is correct |
28 |
Correct |
1 ms |
4700 KB |
Output is correct |
29 |
Correct |
1 ms |
4700 KB |
Output is correct |
30 |
Correct |
1 ms |
4440 KB |
Output is correct |
31 |
Correct |
1 ms |
4444 KB |
Output is correct |
32 |
Correct |
1 ms |
4444 KB |
Output is correct |
33 |
Correct |
1 ms |
4444 KB |
Output is correct |
34 |
Correct |
1 ms |
4444 KB |
Output is correct |
35 |
Correct |
1 ms |
4444 KB |
Output is correct |
36 |
Correct |
1 ms |
4444 KB |
Output is correct |
37 |
Correct |
1 ms |
4444 KB |
Output is correct |
38 |
Correct |
1 ms |
4444 KB |
Output is correct |
39 |
Correct |
1 ms |
4564 KB |
Output is correct |
40 |
Correct |
1 ms |
4444 KB |
Output is correct |
41 |
Correct |
1 ms |
4440 KB |
Output is correct |
42 |
Correct |
1 ms |
4700 KB |
Output is correct |
43 |
Correct |
1 ms |
4444 KB |
Output is correct |
44 |
Correct |
2 ms |
4440 KB |
Output is correct |
45 |
Correct |
2 ms |
4444 KB |
Output is correct |
46 |
Correct |
1 ms |
4440 KB |
Output is correct |
47 |
Correct |
238 ms |
19884 KB |
Output is correct |
48 |
Correct |
228 ms |
17848 KB |
Output is correct |
49 |
Correct |
266 ms |
17724 KB |
Output is correct |
50 |
Correct |
213 ms |
17832 KB |
Output is correct |
51 |
Correct |
224 ms |
17748 KB |
Output is correct |
52 |
Correct |
241 ms |
17748 KB |
Output is correct |
53 |
Correct |
294 ms |
18596 KB |
Output is correct |
54 |
Correct |
9 ms |
5980 KB |
Output is correct |
55 |
Correct |
1 ms |
4440 KB |
Output is correct |
56 |
Correct |
1 ms |
4444 KB |
Output is correct |
57 |
Correct |
12 ms |
5032 KB |
Output is correct |
58 |
Correct |
11 ms |
4956 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4552 KB |
Output is correct |
2 |
Correct |
47 ms |
10548 KB |
Output is correct |
3 |
Correct |
52 ms |
10576 KB |
Output is correct |
4 |
Correct |
40 ms |
10064 KB |
Output is correct |
5 |
Correct |
65 ms |
10940 KB |
Output is correct |
6 |
Correct |
49 ms |
9920 KB |
Output is correct |
7 |
Correct |
55 ms |
10672 KB |
Output is correct |
8 |
Correct |
1 ms |
4696 KB |
Output is correct |
9 |
Correct |
1 ms |
4700 KB |
Output is correct |
10 |
Correct |
1 ms |
4440 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4440 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
2 ms |
4556 KB |
Output is correct |
17 |
Correct |
1 ms |
4560 KB |
Output is correct |
18 |
Correct |
1 ms |
4556 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
193 ms |
15404 KB |
Output is correct |
21 |
Correct |
183 ms |
14672 KB |
Output is correct |
22 |
Correct |
180 ms |
14640 KB |
Output is correct |
23 |
Correct |
165 ms |
15680 KB |
Output is correct |
24 |
Correct |
167 ms |
15280 KB |
Output is correct |
25 |
Correct |
168 ms |
15296 KB |
Output is correct |
26 |
Correct |
200 ms |
15444 KB |
Output is correct |
27 |
Correct |
1 ms |
4444 KB |
Output is correct |
28 |
Correct |
1 ms |
4700 KB |
Output is correct |
29 |
Correct |
1 ms |
4700 KB |
Output is correct |
30 |
Correct |
1 ms |
4440 KB |
Output is correct |
31 |
Correct |
1 ms |
4444 KB |
Output is correct |
32 |
Correct |
1 ms |
4444 KB |
Output is correct |
33 |
Correct |
1 ms |
4444 KB |
Output is correct |
34 |
Correct |
1 ms |
4444 KB |
Output is correct |
35 |
Correct |
1 ms |
4444 KB |
Output is correct |
36 |
Correct |
1 ms |
4444 KB |
Output is correct |
37 |
Correct |
1 ms |
4444 KB |
Output is correct |
38 |
Correct |
1 ms |
4444 KB |
Output is correct |
39 |
Correct |
1 ms |
4564 KB |
Output is correct |
40 |
Correct |
1 ms |
4444 KB |
Output is correct |
41 |
Correct |
1 ms |
4440 KB |
Output is correct |
42 |
Correct |
1 ms |
4700 KB |
Output is correct |
43 |
Correct |
1 ms |
4444 KB |
Output is correct |
44 |
Correct |
2 ms |
4440 KB |
Output is correct |
45 |
Correct |
2 ms |
4444 KB |
Output is correct |
46 |
Correct |
1 ms |
4440 KB |
Output is correct |
47 |
Correct |
238 ms |
19884 KB |
Output is correct |
48 |
Correct |
228 ms |
17848 KB |
Output is correct |
49 |
Correct |
266 ms |
17724 KB |
Output is correct |
50 |
Correct |
213 ms |
17832 KB |
Output is correct |
51 |
Correct |
224 ms |
17748 KB |
Output is correct |
52 |
Correct |
241 ms |
17748 KB |
Output is correct |
53 |
Correct |
294 ms |
18596 KB |
Output is correct |
54 |
Correct |
9 ms |
5980 KB |
Output is correct |
55 |
Correct |
1 ms |
4440 KB |
Output is correct |
56 |
Correct |
1 ms |
4444 KB |
Output is correct |
57 |
Correct |
12 ms |
5032 KB |
Output is correct |
58 |
Correct |
11 ms |
4956 KB |
Output is correct |
59 |
Correct |
262 ms |
19124 KB |
Output is correct |
60 |
Correct |
232 ms |
16100 KB |
Output is correct |
61 |
Correct |
236 ms |
19528 KB |
Output is correct |
62 |
Correct |
224 ms |
19488 KB |
Output is correct |
63 |
Correct |
352 ms |
27048 KB |
Output is correct |
64 |
Correct |
395 ms |
29360 KB |
Output is correct |
65 |
Correct |
397 ms |
29392 KB |
Output is correct |
66 |
Correct |
301 ms |
19760 KB |
Output is correct |
67 |
Correct |
278 ms |
19504 KB |
Output is correct |
68 |
Correct |
259 ms |
19280 KB |
Output is correct |
69 |
Correct |
440 ms |
24480 KB |
Output is correct |
70 |
Correct |
79 ms |
14800 KB |
Output is correct |
71 |
Correct |
2 ms |
4440 KB |
Output is correct |
72 |
Correct |
1 ms |
4444 KB |
Output is correct |
73 |
Correct |
92 ms |
7260 KB |
Output is correct |
74 |
Correct |
92 ms |
5588 KB |
Output is correct |
75 |
Correct |
112 ms |
9260 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4556 KB |
Output is correct |
2 |
Correct |
1 ms |
4444 KB |
Output is correct |
3 |
Correct |
1 ms |
4444 KB |
Output is correct |
4 |
Correct |
1 ms |
4444 KB |
Output is correct |
5 |
Correct |
824 ms |
88536 KB |
Output is correct |
6 |
Correct |
1 ms |
4440 KB |
Output is correct |
7 |
Correct |
1 ms |
4440 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
2 ms |
4444 KB |
Output is correct |
10 |
Correct |
898 ms |
26128 KB |
Output is correct |
11 |
Correct |
911 ms |
25804 KB |
Output is correct |
12 |
Correct |
1076 ms |
34028 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4556 KB |
Output is correct |
15 |
Correct |
1 ms |
4440 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
1 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
4444 KB |
Output is correct |
19 |
Correct |
1 ms |
4440 KB |
Output is correct |
20 |
Correct |
1 ms |
4444 KB |
Output is correct |
21 |
Correct |
1 ms |
4568 KB |
Output is correct |
22 |
Correct |
1 ms |
4556 KB |
Output is correct |
23 |
Correct |
1 ms |
4444 KB |
Output is correct |
24 |
Correct |
1 ms |
4700 KB |
Output is correct |
25 |
Correct |
1 ms |
4700 KB |
Output is correct |
26 |
Correct |
1 ms |
4456 KB |
Output is correct |
27 |
Correct |
1 ms |
4444 KB |
Output is correct |
28 |
Correct |
1 ms |
4444 KB |
Output is correct |
29 |
Correct |
1 ms |
4444 KB |
Output is correct |
30 |
Correct |
1 ms |
4444 KB |
Output is correct |
31 |
Correct |
1 ms |
4444 KB |
Output is correct |
32 |
Correct |
1 ms |
4444 KB |
Output is correct |
33 |
Correct |
1 ms |
4444 KB |
Output is correct |
34 |
Correct |
1 ms |
4444 KB |
Output is correct |
35 |
Correct |
1 ms |
4444 KB |
Output is correct |
36 |
Correct |
1 ms |
4560 KB |
Output is correct |
37 |
Correct |
1 ms |
4576 KB |
Output is correct |
38 |
Correct |
2 ms |
4444 KB |
Output is correct |
39 |
Correct |
2 ms |
4444 KB |
Output is correct |
40 |
Correct |
1 ms |
4444 KB |
Output is correct |
41 |
Correct |
9 ms |
5980 KB |
Output is correct |
42 |
Correct |
1 ms |
4440 KB |
Output is correct |
43 |
Correct |
1 ms |
4560 KB |
Output is correct |
44 |
Correct |
9 ms |
4812 KB |
Output is correct |
45 |
Correct |
10 ms |
4816 KB |
Output is correct |
46 |
Correct |
74 ms |
14728 KB |
Output is correct |
47 |
Correct |
2 ms |
4440 KB |
Output is correct |
48 |
Correct |
2 ms |
4696 KB |
Output is correct |
49 |
Correct |
96 ms |
7348 KB |
Output is correct |
50 |
Correct |
92 ms |
7640 KB |
Output is correct |
51 |
Correct |
6 ms |
4696 KB |
Output is correct |
52 |
Correct |
4 ms |
4696 KB |
Output is correct |
53 |
Correct |
6 ms |
4700 KB |
Output is correct |
54 |
Correct |
1006 ms |
42784 KB |
Output is correct |
55 |
Correct |
2 ms |
4564 KB |
Output is correct |
56 |
Correct |
103 ms |
9412 KB |
Output is correct |
57 |
Correct |
1 ms |
4552 KB |
Output is correct |
58 |
Correct |
47 ms |
10548 KB |
Output is correct |
59 |
Correct |
52 ms |
10576 KB |
Output is correct |
60 |
Correct |
40 ms |
10064 KB |
Output is correct |
61 |
Correct |
65 ms |
10940 KB |
Output is correct |
62 |
Correct |
49 ms |
9920 KB |
Output is correct |
63 |
Correct |
55 ms |
10672 KB |
Output is correct |
64 |
Correct |
1 ms |
4696 KB |
Output is correct |
65 |
Correct |
1 ms |
4700 KB |
Output is correct |
66 |
Correct |
1 ms |
4440 KB |
Output is correct |
67 |
Correct |
1 ms |
4444 KB |
Output is correct |
68 |
Correct |
1 ms |
4444 KB |
Output is correct |
69 |
Correct |
1 ms |
4444 KB |
Output is correct |
70 |
Correct |
1 ms |
4440 KB |
Output is correct |
71 |
Correct |
1 ms |
4444 KB |
Output is correct |
72 |
Correct |
2 ms |
4556 KB |
Output is correct |
73 |
Correct |
1 ms |
4560 KB |
Output is correct |
74 |
Correct |
1 ms |
4556 KB |
Output is correct |
75 |
Correct |
1 ms |
4444 KB |
Output is correct |
76 |
Correct |
193 ms |
15404 KB |
Output is correct |
77 |
Correct |
183 ms |
14672 KB |
Output is correct |
78 |
Correct |
180 ms |
14640 KB |
Output is correct |
79 |
Correct |
165 ms |
15680 KB |
Output is correct |
80 |
Correct |
167 ms |
15280 KB |
Output is correct |
81 |
Correct |
168 ms |
15296 KB |
Output is correct |
82 |
Correct |
200 ms |
15444 KB |
Output is correct |
83 |
Correct |
1 ms |
4444 KB |
Output is correct |
84 |
Correct |
1 ms |
4700 KB |
Output is correct |
85 |
Correct |
1 ms |
4700 KB |
Output is correct |
86 |
Correct |
1 ms |
4440 KB |
Output is correct |
87 |
Correct |
1 ms |
4444 KB |
Output is correct |
88 |
Correct |
1 ms |
4444 KB |
Output is correct |
89 |
Correct |
1 ms |
4444 KB |
Output is correct |
90 |
Correct |
1 ms |
4444 KB |
Output is correct |
91 |
Correct |
1 ms |
4444 KB |
Output is correct |
92 |
Correct |
1 ms |
4444 KB |
Output is correct |
93 |
Correct |
1 ms |
4444 KB |
Output is correct |
94 |
Correct |
1 ms |
4444 KB |
Output is correct |
95 |
Correct |
1 ms |
4564 KB |
Output is correct |
96 |
Correct |
1 ms |
4444 KB |
Output is correct |
97 |
Correct |
1 ms |
4440 KB |
Output is correct |
98 |
Correct |
1 ms |
4700 KB |
Output is correct |
99 |
Correct |
1 ms |
4444 KB |
Output is correct |
100 |
Correct |
2 ms |
4440 KB |
Output is correct |
101 |
Correct |
2 ms |
4444 KB |
Output is correct |
102 |
Correct |
1 ms |
4440 KB |
Output is correct |
103 |
Correct |
238 ms |
19884 KB |
Output is correct |
104 |
Correct |
228 ms |
17848 KB |
Output is correct |
105 |
Correct |
266 ms |
17724 KB |
Output is correct |
106 |
Correct |
213 ms |
17832 KB |
Output is correct |
107 |
Correct |
224 ms |
17748 KB |
Output is correct |
108 |
Correct |
241 ms |
17748 KB |
Output is correct |
109 |
Correct |
294 ms |
18596 KB |
Output is correct |
110 |
Correct |
9 ms |
5980 KB |
Output is correct |
111 |
Correct |
1 ms |
4440 KB |
Output is correct |
112 |
Correct |
1 ms |
4444 KB |
Output is correct |
113 |
Correct |
12 ms |
5032 KB |
Output is correct |
114 |
Correct |
11 ms |
4956 KB |
Output is correct |
115 |
Correct |
262 ms |
19124 KB |
Output is correct |
116 |
Correct |
232 ms |
16100 KB |
Output is correct |
117 |
Correct |
236 ms |
19528 KB |
Output is correct |
118 |
Correct |
224 ms |
19488 KB |
Output is correct |
119 |
Correct |
352 ms |
27048 KB |
Output is correct |
120 |
Correct |
395 ms |
29360 KB |
Output is correct |
121 |
Correct |
397 ms |
29392 KB |
Output is correct |
122 |
Correct |
301 ms |
19760 KB |
Output is correct |
123 |
Correct |
278 ms |
19504 KB |
Output is correct |
124 |
Correct |
259 ms |
19280 KB |
Output is correct |
125 |
Correct |
440 ms |
24480 KB |
Output is correct |
126 |
Correct |
79 ms |
14800 KB |
Output is correct |
127 |
Correct |
2 ms |
4440 KB |
Output is correct |
128 |
Correct |
1 ms |
4444 KB |
Output is correct |
129 |
Correct |
92 ms |
7260 KB |
Output is correct |
130 |
Correct |
92 ms |
5588 KB |
Output is correct |
131 |
Correct |
112 ms |
9260 KB |
Output is correct |
132 |
Correct |
1287 ms |
74888 KB |
Output is correct |
133 |
Correct |
2041 ms |
152732 KB |
Output is correct |
134 |
Correct |
1324 ms |
74856 KB |
Output is correct |
135 |
Correct |
1607 ms |
151944 KB |
Output is correct |
136 |
Correct |
2024 ms |
152980 KB |
Output is correct |
137 |
Correct |
803 ms |
61864 KB |
Output is correct |
138 |
Correct |
877 ms |
61084 KB |
Output is correct |
139 |
Correct |
271 ms |
21328 KB |
Output is correct |
140 |
Correct |
248 ms |
21072 KB |
Output is correct |
141 |
Correct |
388 ms |
21164 KB |
Output is correct |
142 |
Correct |
1375 ms |
59796 KB |
Output is correct |