# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1029917 |
2024-07-21T13:49:28 Z |
adaawf |
Council (JOI23_council) |
C++17 |
|
2556 ms |
1048576 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], d[300005];
vector<vector<int>> g;
vector<vector<deque<pair<int, int>>>> dd;
priority_queue<pair<long long int, pair<int, int>>> q;
int ch(int x) {
return __builtin_popcount(x);
}
void trans(int x, int y, int z, int t, int w, int l) {
int h = dd[z][t].size();
for (auto w : dd[x][y]) {
dd[z][t].push_back({w.first - l, w.second});
}
pair<int, int> k = {-1, -1}, res = k;
for (auto w : dd[z][t]) {
if (w.first > k.first) k = w;
}
for (auto w : dd[z][t]) {
if (w.first > res.first && w.second != k.second) {
res = w;
}
}
dd[z][t].clear();
dd[z][t].push_back(k);
if (res.first != -1) dd[z][t].push_back(res);
if (dd[z][t].size() != 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;
d[i] = k;
}
g = vector<vector<int>>((1 << z), vector<int>(1 << zz, 0));
dd = vector<vector<deque<pair<int, int>>>>((1 << z), vector<deque<pair<int, int>>>(1 << zz));
for (int i = 1; i <= n; i++) {
dd[x[i]][y[i]].push_back({ch(x[i]) + ch(y[i]), i});
if (dd[x[i]][y[i]].size() > 2) dd[x[i]][y[i]].pop_back();
//cout << i << " " << x[i] << " " << y[i] << " " << d[i] << '\n';
if (dd[x[i]][y[i]].size() == 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;
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;
for (auto w : dd[x[i]][d[i]]) {
if (w.second != i) {
h = max(h, w.first);
//cout << i << " " << x[i] << " " << d[i] << " " << w.first << " " << w.second << '\n';
}
}
h += ch(y[i]);
cout << m - (z + zz - h) - l << '\n';
}
}
Compilation message
council.cpp: In function 'void trans(int, int, int, int, int, int)':
council.cpp:29:25: warning: comparison of integer expressions of different signedness: 'std::deque<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
29 | if (dd[z][t].size() != h) q.push({w, {z, t}});
| ~~~~~~~~~~~~~~~~^~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
2 ms |
5212 KB |
Output is correct |
3 |
Correct |
1 ms |
4444 KB |
Output is correct |
4 |
Correct |
1 ms |
4440 KB |
Output is correct |
5 |
Correct |
2105 ms |
776632 KB |
Output is correct |
6 |
Correct |
1 ms |
4444 KB |
Output is correct |
7 |
Correct |
2 ms |
4700 KB |
Output is correct |
8 |
Correct |
2 ms |
5212 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
2255 ms |
715612 KB |
Output is correct |
11 |
Correct |
2375 ms |
715468 KB |
Output is correct |
12 |
Correct |
2512 ms |
726276 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
0 ms |
4444 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 |
4556 KB |
Output is correct |
20 |
Correct |
1 ms |
4444 KB |
Output is correct |
21 |
Correct |
1 ms |
4440 KB |
Output is correct |
22 |
Correct |
2 ms |
5212 KB |
Output is correct |
23 |
Correct |
1 ms |
4440 KB |
Output is correct |
24 |
Correct |
1 ms |
4440 KB |
Output is correct |
25 |
Correct |
1 ms |
4444 KB |
Output is correct |
26 |
Correct |
1 ms |
4440 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 |
4440 KB |
Output is correct |
31 |
Correct |
1 ms |
4444 KB |
Output is correct |
32 |
Correct |
1 ms |
4440 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 |
4700 KB |
Output is correct |
38 |
Correct |
2 ms |
4700 KB |
Output is correct |
39 |
Correct |
2 ms |
5208 KB |
Output is correct |
40 |
Correct |
2 ms |
5208 KB |
Output is correct |
41 |
Correct |
20 ms |
16728 KB |
Output is correct |
42 |
Correct |
1 ms |
4444 KB |
Output is correct |
43 |
Correct |
1 ms |
4444 KB |
Output is correct |
44 |
Correct |
25 ms |
15708 KB |
Output is correct |
45 |
Correct |
22 ms |
16216 KB |
Output is correct |
46 |
Correct |
202 ms |
100908 KB |
Output is correct |
47 |
Correct |
3 ms |
5720 KB |
Output is correct |
48 |
Correct |
1 ms |
4700 KB |
Output is correct |
49 |
Correct |
193 ms |
93544 KB |
Output is correct |
50 |
Correct |
217 ms |
93884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
2 ms |
5212 KB |
Output is correct |
3 |
Correct |
1 ms |
4444 KB |
Output is correct |
4 |
Correct |
1 ms |
4440 KB |
Output is correct |
5 |
Correct |
2105 ms |
776632 KB |
Output is correct |
6 |
Correct |
1 ms |
4444 KB |
Output is correct |
7 |
Correct |
2 ms |
4700 KB |
Output is correct |
8 |
Correct |
2 ms |
5212 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
2255 ms |
715612 KB |
Output is correct |
11 |
Correct |
2375 ms |
715468 KB |
Output is correct |
12 |
Correct |
2512 ms |
726276 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
0 ms |
4444 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 |
4556 KB |
Output is correct |
20 |
Correct |
1 ms |
4444 KB |
Output is correct |
21 |
Correct |
1 ms |
4440 KB |
Output is correct |
22 |
Correct |
2 ms |
5212 KB |
Output is correct |
23 |
Correct |
1 ms |
4440 KB |
Output is correct |
24 |
Correct |
1 ms |
4440 KB |
Output is correct |
25 |
Correct |
1 ms |
4444 KB |
Output is correct |
26 |
Correct |
1 ms |
4440 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 |
4440 KB |
Output is correct |
31 |
Correct |
1 ms |
4444 KB |
Output is correct |
32 |
Correct |
1 ms |
4440 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 |
4700 KB |
Output is correct |
38 |
Correct |
2 ms |
4700 KB |
Output is correct |
39 |
Correct |
2 ms |
5208 KB |
Output is correct |
40 |
Correct |
2 ms |
5208 KB |
Output is correct |
41 |
Correct |
20 ms |
16728 KB |
Output is correct |
42 |
Correct |
1 ms |
4444 KB |
Output is correct |
43 |
Correct |
1 ms |
4444 KB |
Output is correct |
44 |
Correct |
25 ms |
15708 KB |
Output is correct |
45 |
Correct |
22 ms |
16216 KB |
Output is correct |
46 |
Correct |
202 ms |
100908 KB |
Output is correct |
47 |
Correct |
3 ms |
5720 KB |
Output is correct |
48 |
Correct |
1 ms |
4700 KB |
Output is correct |
49 |
Correct |
193 ms |
93544 KB |
Output is correct |
50 |
Correct |
217 ms |
93884 KB |
Output is correct |
51 |
Correct |
3 ms |
4444 KB |
Output is correct |
52 |
Correct |
4 ms |
4444 KB |
Output is correct |
53 |
Correct |
3 ms |
4444 KB |
Output is correct |
54 |
Correct |
2556 ms |
732984 KB |
Output is correct |
55 |
Correct |
2 ms |
4440 KB |
Output is correct |
56 |
Correct |
206 ms |
95884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4448 KB |
Output is correct |
2 |
Correct |
44 ms |
10580 KB |
Output is correct |
3 |
Correct |
41 ms |
10576 KB |
Output is correct |
4 |
Correct |
41 ms |
10576 KB |
Output is correct |
5 |
Correct |
53 ms |
10648 KB |
Output is correct |
6 |
Correct |
55 ms |
10580 KB |
Output is correct |
7 |
Correct |
43 ms |
10576 KB |
Output is correct |
8 |
Correct |
1 ms |
4440 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 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 |
1 ms |
4440 KB |
Output is correct |
17 |
Correct |
1 ms |
4444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4448 KB |
Output is correct |
2 |
Correct |
44 ms |
10580 KB |
Output is correct |
3 |
Correct |
41 ms |
10576 KB |
Output is correct |
4 |
Correct |
41 ms |
10576 KB |
Output is correct |
5 |
Correct |
53 ms |
10648 KB |
Output is correct |
6 |
Correct |
55 ms |
10580 KB |
Output is correct |
7 |
Correct |
43 ms |
10576 KB |
Output is correct |
8 |
Correct |
1 ms |
4440 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 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 |
1 ms |
4440 KB |
Output is correct |
17 |
Correct |
1 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
4440 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
176 ms |
11456 KB |
Output is correct |
21 |
Correct |
149 ms |
11092 KB |
Output is correct |
22 |
Correct |
178 ms |
11028 KB |
Output is correct |
23 |
Correct |
170 ms |
10836 KB |
Output is correct |
24 |
Correct |
130 ms |
10580 KB |
Output is correct |
25 |
Correct |
172 ms |
10688 KB |
Output is correct |
26 |
Correct |
160 ms |
11348 KB |
Output is correct |
27 |
Correct |
2 ms |
5208 KB |
Output is correct |
28 |
Correct |
1 ms |
4440 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 |
4444 KB |
Output is correct |
37 |
Correct |
1 ms |
4440 KB |
Output is correct |
38 |
Correct |
1 ms |
4444 KB |
Output is correct |
39 |
Correct |
1 ms |
4444 KB |
Output is correct |
40 |
Correct |
1 ms |
4444 KB |
Output is correct |
41 |
Correct |
1 ms |
4444 KB |
Output is correct |
42 |
Correct |
1 ms |
4700 KB |
Output is correct |
43 |
Correct |
1 ms |
4740 KB |
Output is correct |
44 |
Correct |
1 ms |
5212 KB |
Output is correct |
45 |
Correct |
2 ms |
5212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4448 KB |
Output is correct |
2 |
Correct |
44 ms |
10580 KB |
Output is correct |
3 |
Correct |
41 ms |
10576 KB |
Output is correct |
4 |
Correct |
41 ms |
10576 KB |
Output is correct |
5 |
Correct |
53 ms |
10648 KB |
Output is correct |
6 |
Correct |
55 ms |
10580 KB |
Output is correct |
7 |
Correct |
43 ms |
10576 KB |
Output is correct |
8 |
Correct |
1 ms |
4440 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 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 |
1 ms |
4440 KB |
Output is correct |
17 |
Correct |
1 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
4440 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
176 ms |
11456 KB |
Output is correct |
21 |
Correct |
149 ms |
11092 KB |
Output is correct |
22 |
Correct |
178 ms |
11028 KB |
Output is correct |
23 |
Correct |
170 ms |
10836 KB |
Output is correct |
24 |
Correct |
130 ms |
10580 KB |
Output is correct |
25 |
Correct |
172 ms |
10688 KB |
Output is correct |
26 |
Correct |
160 ms |
11348 KB |
Output is correct |
27 |
Correct |
2 ms |
5208 KB |
Output is correct |
28 |
Correct |
1 ms |
4440 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 |
4444 KB |
Output is correct |
37 |
Correct |
1 ms |
4440 KB |
Output is correct |
38 |
Correct |
1 ms |
4444 KB |
Output is correct |
39 |
Correct |
1 ms |
4444 KB |
Output is correct |
40 |
Correct |
1 ms |
4444 KB |
Output is correct |
41 |
Correct |
1 ms |
4444 KB |
Output is correct |
42 |
Correct |
1 ms |
4700 KB |
Output is correct |
43 |
Correct |
1 ms |
4740 KB |
Output is correct |
44 |
Correct |
1 ms |
5212 KB |
Output is correct |
45 |
Correct |
2 ms |
5212 KB |
Output is correct |
46 |
Correct |
2 ms |
5212 KB |
Output is correct |
47 |
Correct |
303 ms |
23620 KB |
Output is correct |
48 |
Correct |
227 ms |
16832 KB |
Output is correct |
49 |
Correct |
247 ms |
16832 KB |
Output is correct |
50 |
Correct |
212 ms |
10832 KB |
Output is correct |
51 |
Correct |
171 ms |
10576 KB |
Output is correct |
52 |
Correct |
246 ms |
10640 KB |
Output is correct |
53 |
Correct |
259 ms |
22480 KB |
Output is correct |
54 |
Correct |
25 ms |
16728 KB |
Output is correct |
55 |
Correct |
1 ms |
4444 KB |
Output is correct |
56 |
Correct |
1 ms |
4444 KB |
Output is correct |
57 |
Correct |
19 ms |
15800 KB |
Output is correct |
58 |
Correct |
25 ms |
16216 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4448 KB |
Output is correct |
2 |
Correct |
44 ms |
10580 KB |
Output is correct |
3 |
Correct |
41 ms |
10576 KB |
Output is correct |
4 |
Correct |
41 ms |
10576 KB |
Output is correct |
5 |
Correct |
53 ms |
10648 KB |
Output is correct |
6 |
Correct |
55 ms |
10580 KB |
Output is correct |
7 |
Correct |
43 ms |
10576 KB |
Output is correct |
8 |
Correct |
1 ms |
4440 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 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 |
1 ms |
4440 KB |
Output is correct |
17 |
Correct |
1 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
4440 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
176 ms |
11456 KB |
Output is correct |
21 |
Correct |
149 ms |
11092 KB |
Output is correct |
22 |
Correct |
178 ms |
11028 KB |
Output is correct |
23 |
Correct |
170 ms |
10836 KB |
Output is correct |
24 |
Correct |
130 ms |
10580 KB |
Output is correct |
25 |
Correct |
172 ms |
10688 KB |
Output is correct |
26 |
Correct |
160 ms |
11348 KB |
Output is correct |
27 |
Correct |
2 ms |
5208 KB |
Output is correct |
28 |
Correct |
1 ms |
4440 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 |
4444 KB |
Output is correct |
37 |
Correct |
1 ms |
4440 KB |
Output is correct |
38 |
Correct |
1 ms |
4444 KB |
Output is correct |
39 |
Correct |
1 ms |
4444 KB |
Output is correct |
40 |
Correct |
1 ms |
4444 KB |
Output is correct |
41 |
Correct |
1 ms |
4444 KB |
Output is correct |
42 |
Correct |
1 ms |
4700 KB |
Output is correct |
43 |
Correct |
1 ms |
4740 KB |
Output is correct |
44 |
Correct |
1 ms |
5212 KB |
Output is correct |
45 |
Correct |
2 ms |
5212 KB |
Output is correct |
46 |
Correct |
2 ms |
5212 KB |
Output is correct |
47 |
Correct |
303 ms |
23620 KB |
Output is correct |
48 |
Correct |
227 ms |
16832 KB |
Output is correct |
49 |
Correct |
247 ms |
16832 KB |
Output is correct |
50 |
Correct |
212 ms |
10832 KB |
Output is correct |
51 |
Correct |
171 ms |
10576 KB |
Output is correct |
52 |
Correct |
246 ms |
10640 KB |
Output is correct |
53 |
Correct |
259 ms |
22480 KB |
Output is correct |
54 |
Correct |
25 ms |
16728 KB |
Output is correct |
55 |
Correct |
1 ms |
4444 KB |
Output is correct |
56 |
Correct |
1 ms |
4444 KB |
Output is correct |
57 |
Correct |
19 ms |
15800 KB |
Output is correct |
58 |
Correct |
25 ms |
16216 KB |
Output is correct |
59 |
Correct |
252 ms |
10944 KB |
Output is correct |
60 |
Correct |
417 ms |
183740 KB |
Output is correct |
61 |
Correct |
436 ms |
183740 KB |
Output is correct |
62 |
Correct |
418 ms |
183748 KB |
Output is correct |
63 |
Correct |
396 ms |
62024 KB |
Output is correct |
64 |
Correct |
545 ms |
106800 KB |
Output is correct |
65 |
Correct |
564 ms |
106796 KB |
Output is correct |
66 |
Correct |
273 ms |
10836 KB |
Output is correct |
67 |
Correct |
252 ms |
10528 KB |
Output is correct |
68 |
Correct |
351 ms |
10692 KB |
Output is correct |
69 |
Correct |
606 ms |
103080 KB |
Output is correct |
70 |
Correct |
220 ms |
101060 KB |
Output is correct |
71 |
Correct |
4 ms |
5724 KB |
Output is correct |
72 |
Correct |
1 ms |
4696 KB |
Output is correct |
73 |
Correct |
218 ms |
93652 KB |
Output is correct |
74 |
Correct |
212 ms |
93904 KB |
Output is correct |
75 |
Correct |
250 ms |
96032 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
2 ms |
5212 KB |
Output is correct |
3 |
Correct |
1 ms |
4444 KB |
Output is correct |
4 |
Correct |
1 ms |
4440 KB |
Output is correct |
5 |
Correct |
2105 ms |
776632 KB |
Output is correct |
6 |
Correct |
1 ms |
4444 KB |
Output is correct |
7 |
Correct |
2 ms |
4700 KB |
Output is correct |
8 |
Correct |
2 ms |
5212 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
2255 ms |
715612 KB |
Output is correct |
11 |
Correct |
2375 ms |
715468 KB |
Output is correct |
12 |
Correct |
2512 ms |
726276 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
0 ms |
4444 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 |
4556 KB |
Output is correct |
20 |
Correct |
1 ms |
4444 KB |
Output is correct |
21 |
Correct |
1 ms |
4440 KB |
Output is correct |
22 |
Correct |
2 ms |
5212 KB |
Output is correct |
23 |
Correct |
1 ms |
4440 KB |
Output is correct |
24 |
Correct |
1 ms |
4440 KB |
Output is correct |
25 |
Correct |
1 ms |
4444 KB |
Output is correct |
26 |
Correct |
1 ms |
4440 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 |
4440 KB |
Output is correct |
31 |
Correct |
1 ms |
4444 KB |
Output is correct |
32 |
Correct |
1 ms |
4440 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 |
4700 KB |
Output is correct |
38 |
Correct |
2 ms |
4700 KB |
Output is correct |
39 |
Correct |
2 ms |
5208 KB |
Output is correct |
40 |
Correct |
2 ms |
5208 KB |
Output is correct |
41 |
Correct |
20 ms |
16728 KB |
Output is correct |
42 |
Correct |
1 ms |
4444 KB |
Output is correct |
43 |
Correct |
1 ms |
4444 KB |
Output is correct |
44 |
Correct |
25 ms |
15708 KB |
Output is correct |
45 |
Correct |
22 ms |
16216 KB |
Output is correct |
46 |
Correct |
202 ms |
100908 KB |
Output is correct |
47 |
Correct |
3 ms |
5720 KB |
Output is correct |
48 |
Correct |
1 ms |
4700 KB |
Output is correct |
49 |
Correct |
193 ms |
93544 KB |
Output is correct |
50 |
Correct |
217 ms |
93884 KB |
Output is correct |
51 |
Correct |
3 ms |
4444 KB |
Output is correct |
52 |
Correct |
4 ms |
4444 KB |
Output is correct |
53 |
Correct |
3 ms |
4444 KB |
Output is correct |
54 |
Correct |
2556 ms |
732984 KB |
Output is correct |
55 |
Correct |
2 ms |
4440 KB |
Output is correct |
56 |
Correct |
206 ms |
95884 KB |
Output is correct |
57 |
Correct |
1 ms |
4448 KB |
Output is correct |
58 |
Correct |
44 ms |
10580 KB |
Output is correct |
59 |
Correct |
41 ms |
10576 KB |
Output is correct |
60 |
Correct |
41 ms |
10576 KB |
Output is correct |
61 |
Correct |
53 ms |
10648 KB |
Output is correct |
62 |
Correct |
55 ms |
10580 KB |
Output is correct |
63 |
Correct |
43 ms |
10576 KB |
Output is correct |
64 |
Correct |
1 ms |
4440 KB |
Output is correct |
65 |
Correct |
1 ms |
4444 KB |
Output is correct |
66 |
Correct |
1 ms |
4444 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 |
1 ms |
4440 KB |
Output is correct |
73 |
Correct |
1 ms |
4444 KB |
Output is correct |
74 |
Correct |
1 ms |
4440 KB |
Output is correct |
75 |
Correct |
1 ms |
4444 KB |
Output is correct |
76 |
Correct |
176 ms |
11456 KB |
Output is correct |
77 |
Correct |
149 ms |
11092 KB |
Output is correct |
78 |
Correct |
178 ms |
11028 KB |
Output is correct |
79 |
Correct |
170 ms |
10836 KB |
Output is correct |
80 |
Correct |
130 ms |
10580 KB |
Output is correct |
81 |
Correct |
172 ms |
10688 KB |
Output is correct |
82 |
Correct |
160 ms |
11348 KB |
Output is correct |
83 |
Correct |
2 ms |
5208 KB |
Output is correct |
84 |
Correct |
1 ms |
4440 KB |
Output is correct |
85 |
Correct |
1 ms |
4444 KB |
Output is correct |
86 |
Correct |
1 ms |
4444 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 |
4440 KB |
Output is correct |
94 |
Correct |
1 ms |
4444 KB |
Output is correct |
95 |
Correct |
1 ms |
4444 KB |
Output is correct |
96 |
Correct |
1 ms |
4444 KB |
Output is correct |
97 |
Correct |
1 ms |
4444 KB |
Output is correct |
98 |
Correct |
1 ms |
4700 KB |
Output is correct |
99 |
Correct |
1 ms |
4740 KB |
Output is correct |
100 |
Correct |
1 ms |
5212 KB |
Output is correct |
101 |
Correct |
2 ms |
5212 KB |
Output is correct |
102 |
Correct |
2 ms |
5212 KB |
Output is correct |
103 |
Correct |
303 ms |
23620 KB |
Output is correct |
104 |
Correct |
227 ms |
16832 KB |
Output is correct |
105 |
Correct |
247 ms |
16832 KB |
Output is correct |
106 |
Correct |
212 ms |
10832 KB |
Output is correct |
107 |
Correct |
171 ms |
10576 KB |
Output is correct |
108 |
Correct |
246 ms |
10640 KB |
Output is correct |
109 |
Correct |
259 ms |
22480 KB |
Output is correct |
110 |
Correct |
25 ms |
16728 KB |
Output is correct |
111 |
Correct |
1 ms |
4444 KB |
Output is correct |
112 |
Correct |
1 ms |
4444 KB |
Output is correct |
113 |
Correct |
19 ms |
15800 KB |
Output is correct |
114 |
Correct |
25 ms |
16216 KB |
Output is correct |
115 |
Correct |
252 ms |
10944 KB |
Output is correct |
116 |
Correct |
417 ms |
183740 KB |
Output is correct |
117 |
Correct |
436 ms |
183740 KB |
Output is correct |
118 |
Correct |
418 ms |
183748 KB |
Output is correct |
119 |
Correct |
396 ms |
62024 KB |
Output is correct |
120 |
Correct |
545 ms |
106800 KB |
Output is correct |
121 |
Correct |
564 ms |
106796 KB |
Output is correct |
122 |
Correct |
273 ms |
10836 KB |
Output is correct |
123 |
Correct |
252 ms |
10528 KB |
Output is correct |
124 |
Correct |
351 ms |
10692 KB |
Output is correct |
125 |
Correct |
606 ms |
103080 KB |
Output is correct |
126 |
Correct |
220 ms |
101060 KB |
Output is correct |
127 |
Correct |
4 ms |
5724 KB |
Output is correct |
128 |
Correct |
1 ms |
4696 KB |
Output is correct |
129 |
Correct |
218 ms |
93652 KB |
Output is correct |
130 |
Correct |
212 ms |
93904 KB |
Output is correct |
131 |
Correct |
250 ms |
96032 KB |
Output is correct |
132 |
Runtime error |
738 ms |
1048576 KB |
Execution killed with signal 9 |
133 |
Halted |
0 ms |
0 KB |
- |