#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
const int fx[] = {1, 1, -1, -1};
const int fy[] = {1, -1, 1, -1};
const int dx[] = {2, 0, -2, 0};
const int dy[] = {0, 2, 0, -2};
int construct_roads(vector<int> x, vector<int> y) {
int n = (int)x.size();
map<pair<int, int>, int> id;
set<pair<int, int>> pos;
for (int i = 0; i < n; i++) {
id[{x[i], y[i]}] = i;
for (int k = 0; k < 4; k++) {
int nx = x[i] + fx[k];
int ny = y[i] + fy[k];
pos.insert({nx, ny});
}
}
vector<int> vis(n);
function<void(int)> dfs = [&](int z) {
vis[z] = 1;
for (int k = 0; k < 4; k++) {
int nx = x[z] + dx[k];
int ny = y[z] + dy[k];
if (id.count({nx, ny})) {
int p = id[{nx, ny}];
if (!vis[p]) {
dfs(p);
}
}
}
};
dfs(0);
if (count(vis.begin(), vis.end(), 1) != n) {
return 0;
}
vector<int> u, v, a, b;
for (auto [cx, cy] : pos) {
if ((cx + cy) % 4 == 0) {
if (id.count({cx - 1, cy - 1}) && id.count({cx - 1, cy + 1})) {
u.push_back(id[{cx - 1, cy - 1}]);
v.push_back(id[{cx - 1, cy + 1}]);
a.push_back(cx);
b.push_back(cy);
} else if (id.count({cx + 1, cy - 1}) && id.count({cx + 1, cy + 1})) {
u.push_back(id[{cx + 1, cy - 1}]);
v.push_back(id[{cx + 1, cy + 1}]);
a.push_back(cx);
b.push_back(cy);
}
} else if ((cx + cy) % 4 == 2) {
if (id.count({cx - 1, cy - 1}) && id.count({cx + 1, cy - 1})) {
u.push_back(id[{cx - 1, cy - 1}]);
v.push_back(id[{cx + 1, cy - 1}]);
a.push_back(cx);
b.push_back(cy);
} else if (id.count({cx - 1, cy + 1}) && id.count({cx + 1, cy + 1})) {
u.push_back(id[{cx - 1, cy + 1}]);
v.push_back(id[{cx + 1, cy + 1}]);
a.push_back(cx);
b.push_back(cy);
}
}
}
build(u, v, a, b);
return 1;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
604 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
232 ms |
35236 KB |
Output is correct |
10 |
Correct |
15 ms |
4184 KB |
Output is correct |
11 |
Correct |
100 ms |
19660 KB |
Output is correct |
12 |
Correct |
24 ms |
6008 KB |
Output is correct |
13 |
Correct |
52 ms |
12368 KB |
Output is correct |
14 |
Correct |
1 ms |
600 KB |
Output is correct |
15 |
Correct |
3 ms |
604 KB |
Output is correct |
16 |
Correct |
226 ms |
30032 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
604 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
232 ms |
35236 KB |
Output is correct |
10 |
Correct |
15 ms |
4184 KB |
Output is correct |
11 |
Correct |
100 ms |
19660 KB |
Output is correct |
12 |
Correct |
24 ms |
6008 KB |
Output is correct |
13 |
Correct |
52 ms |
12368 KB |
Output is correct |
14 |
Correct |
1 ms |
600 KB |
Output is correct |
15 |
Correct |
3 ms |
604 KB |
Output is correct |
16 |
Correct |
226 ms |
30032 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
529 ms |
66976 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
2 ms |
696 KB |
Output is correct |
26 |
Correct |
3 ms |
860 KB |
Output is correct |
27 |
Correct |
3 ms |
1044 KB |
Output is correct |
28 |
Correct |
179 ms |
26804 KB |
Output is correct |
29 |
Correct |
298 ms |
36956 KB |
Output is correct |
30 |
Correct |
420 ms |
52140 KB |
Output is correct |
31 |
Correct |
539 ms |
66988 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
440 KB |
Output is correct |
39 |
Correct |
1 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 |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
3 ms |
860 KB |
Output is correct |
44 |
Correct |
3 ms |
860 KB |
Output is correct |
45 |
Correct |
234 ms |
31416 KB |
Output is correct |
46 |
Correct |
377 ms |
45932 KB |
Output is correct |
47 |
Correct |
426 ms |
45224 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
604 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
232 ms |
35236 KB |
Output is correct |
10 |
Correct |
15 ms |
4184 KB |
Output is correct |
11 |
Correct |
100 ms |
19660 KB |
Output is correct |
12 |
Correct |
24 ms |
6008 KB |
Output is correct |
13 |
Correct |
52 ms |
12368 KB |
Output is correct |
14 |
Correct |
1 ms |
600 KB |
Output is correct |
15 |
Correct |
3 ms |
604 KB |
Output is correct |
16 |
Correct |
226 ms |
30032 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
529 ms |
66976 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
2 ms |
696 KB |
Output is correct |
26 |
Correct |
3 ms |
860 KB |
Output is correct |
27 |
Correct |
3 ms |
1044 KB |
Output is correct |
28 |
Correct |
179 ms |
26804 KB |
Output is correct |
29 |
Correct |
298 ms |
36956 KB |
Output is correct |
30 |
Correct |
420 ms |
52140 KB |
Output is correct |
31 |
Correct |
539 ms |
66988 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
440 KB |
Output is correct |
39 |
Correct |
1 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 |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
3 ms |
860 KB |
Output is correct |
44 |
Correct |
3 ms |
860 KB |
Output is correct |
45 |
Correct |
234 ms |
31416 KB |
Output is correct |
46 |
Correct |
377 ms |
45932 KB |
Output is correct |
47 |
Correct |
426 ms |
45224 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
0 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
51 |
Correct |
0 ms |
372 KB |
Output is correct |
52 |
Correct |
0 ms |
348 KB |
Output is correct |
53 |
Correct |
0 ms |
348 KB |
Output is correct |
54 |
Correct |
0 ms |
348 KB |
Output is correct |
55 |
Correct |
552 ms |
65580 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
3 ms |
860 KB |
Output is correct |
58 |
Correct |
10 ms |
2512 KB |
Output is correct |
59 |
Correct |
10 ms |
1956 KB |
Output is correct |
60 |
Correct |
234 ms |
32948 KB |
Output is correct |
61 |
Correct |
353 ms |
44204 KB |
Output is correct |
62 |
Correct |
462 ms |
54384 KB |
Output is correct |
63 |
Correct |
581 ms |
65452 KB |
Output is correct |
64 |
Correct |
0 ms |
348 KB |
Output is correct |
65 |
Correct |
0 ms |
348 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
542 ms |
64592 KB |
Output is correct |
68 |
Correct |
556 ms |
64940 KB |
Output is correct |
69 |
Correct |
526 ms |
67500 KB |
Output is correct |
70 |
Correct |
4 ms |
1116 KB |
Output is correct |
71 |
Correct |
8 ms |
2000 KB |
Output is correct |
72 |
Correct |
249 ms |
27324 KB |
Output is correct |
73 |
Correct |
363 ms |
43752 KB |
Output is correct |
74 |
Correct |
609 ms |
54444 KB |
Output is correct |
75 |
Correct |
584 ms |
64400 KB |
Output is correct |
76 |
Correct |
554 ms |
71848 KB |
Output is correct |
77 |
Correct |
5 ms |
1372 KB |
Output is correct |
78 |
Correct |
10 ms |
2176 KB |
Output is correct |
79 |
Correct |
230 ms |
29480 KB |
Output is correct |
80 |
Correct |
436 ms |
45076 KB |
Output is correct |
81 |
Correct |
591 ms |
56596 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
604 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
232 ms |
35236 KB |
Output is correct |
10 |
Correct |
15 ms |
4184 KB |
Output is correct |
11 |
Correct |
100 ms |
19660 KB |
Output is correct |
12 |
Correct |
24 ms |
6008 KB |
Output is correct |
13 |
Correct |
52 ms |
12368 KB |
Output is correct |
14 |
Correct |
1 ms |
600 KB |
Output is correct |
15 |
Correct |
3 ms |
604 KB |
Output is correct |
16 |
Correct |
226 ms |
30032 KB |
Output is correct |
17 |
Correct |
0 ms |
344 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
598 ms |
72080 KB |
Output is correct |
21 |
Correct |
597 ms |
66964 KB |
Output is correct |
22 |
Correct |
597 ms |
64428 KB |
Output is correct |
23 |
Correct |
513 ms |
53776 KB |
Output is correct |
24 |
Correct |
450 ms |
56108 KB |
Output is correct |
25 |
Correct |
352 ms |
37208 KB |
Output is correct |
26 |
Correct |
367 ms |
37132 KB |
Output is correct |
27 |
Correct |
516 ms |
47020 KB |
Output is correct |
28 |
Correct |
480 ms |
46792 KB |
Output is correct |
29 |
Correct |
668 ms |
46764 KB |
Output is correct |
30 |
Correct |
608 ms |
46764 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
29 ms |
4748 KB |
Output is correct |
33 |
Correct |
154 ms |
23856 KB |
Output is correct |
34 |
Correct |
563 ms |
68012 KB |
Output is correct |
35 |
Correct |
12 ms |
2140 KB |
Output is correct |
36 |
Correct |
62 ms |
9044 KB |
Output is correct |
37 |
Correct |
142 ms |
17668 KB |
Output is correct |
38 |
Correct |
214 ms |
18364 KB |
Output is correct |
39 |
Correct |
255 ms |
24836 KB |
Output is correct |
40 |
Correct |
357 ms |
31404 KB |
Output is correct |
41 |
Correct |
479 ms |
38152 KB |
Output is correct |
42 |
Correct |
601 ms |
44896 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
0 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
0 ms |
348 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
1 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
51 |
Correct |
0 ms |
348 KB |
Output is correct |
52 |
Correct |
1 ms |
348 KB |
Output is correct |
53 |
Correct |
1 ms |
348 KB |
Output is correct |
54 |
Correct |
2 ms |
860 KB |
Output is correct |
55 |
Correct |
3 ms |
860 KB |
Output is correct |
56 |
Correct |
242 ms |
31316 KB |
Output is correct |
57 |
Correct |
426 ms |
46036 KB |
Output is correct |
58 |
Correct |
370 ms |
45228 KB |
Output is correct |
59 |
Correct |
1 ms |
348 KB |
Output is correct |
60 |
Correct |
0 ms |
348 KB |
Output is correct |
61 |
Correct |
0 ms |
348 KB |
Output is correct |
62 |
Correct |
519 ms |
64428 KB |
Output is correct |
63 |
Correct |
514 ms |
64936 KB |
Output is correct |
64 |
Correct |
499 ms |
67496 KB |
Output is correct |
65 |
Correct |
4 ms |
1116 KB |
Output is correct |
66 |
Correct |
8 ms |
1884 KB |
Output is correct |
67 |
Correct |
226 ms |
27304 KB |
Output is correct |
68 |
Correct |
441 ms |
43784 KB |
Output is correct |
69 |
Correct |
539 ms |
54448 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
604 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
232 ms |
35236 KB |
Output is correct |
10 |
Correct |
15 ms |
4184 KB |
Output is correct |
11 |
Correct |
100 ms |
19660 KB |
Output is correct |
12 |
Correct |
24 ms |
6008 KB |
Output is correct |
13 |
Correct |
52 ms |
12368 KB |
Output is correct |
14 |
Correct |
1 ms |
600 KB |
Output is correct |
15 |
Correct |
3 ms |
604 KB |
Output is correct |
16 |
Correct |
226 ms |
30032 KB |
Output is correct |
17 |
Correct |
535 ms |
72216 KB |
Output is correct |
18 |
Correct |
482 ms |
62380 KB |
Output is correct |
19 |
Correct |
525 ms |
72380 KB |
Output is correct |
20 |
Correct |
630 ms |
59056 KB |
Output is correct |
21 |
Correct |
502 ms |
52396 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
65 ms |
8512 KB |
Output is correct |
24 |
Correct |
23 ms |
4392 KB |
Output is correct |
25 |
Correct |
83 ms |
12620 KB |
Output is correct |
26 |
Correct |
148 ms |
20820 KB |
Output is correct |
27 |
Correct |
231 ms |
29888 KB |
Output is correct |
28 |
Correct |
327 ms |
37560 KB |
Output is correct |
29 |
Correct |
385 ms |
44808 KB |
Output is correct |
30 |
Correct |
460 ms |
52208 KB |
Output is correct |
31 |
Correct |
576 ms |
59312 KB |
Output is correct |
32 |
Correct |
556 ms |
64428 KB |
Output is correct |
33 |
Correct |
578 ms |
71824 KB |
Output is correct |
34 |
Correct |
5 ms |
1372 KB |
Output is correct |
35 |
Correct |
9 ms |
2116 KB |
Output is correct |
36 |
Correct |
257 ms |
29416 KB |
Output is correct |
37 |
Correct |
378 ms |
45064 KB |
Output is correct |
38 |
Correct |
563 ms |
56676 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
604 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
232 ms |
35236 KB |
Output is correct |
10 |
Correct |
15 ms |
4184 KB |
Output is correct |
11 |
Correct |
100 ms |
19660 KB |
Output is correct |
12 |
Correct |
24 ms |
6008 KB |
Output is correct |
13 |
Correct |
52 ms |
12368 KB |
Output is correct |
14 |
Correct |
1 ms |
600 KB |
Output is correct |
15 |
Correct |
3 ms |
604 KB |
Output is correct |
16 |
Correct |
226 ms |
30032 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
529 ms |
66976 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
2 ms |
696 KB |
Output is correct |
26 |
Correct |
3 ms |
860 KB |
Output is correct |
27 |
Correct |
3 ms |
1044 KB |
Output is correct |
28 |
Correct |
179 ms |
26804 KB |
Output is correct |
29 |
Correct |
298 ms |
36956 KB |
Output is correct |
30 |
Correct |
420 ms |
52140 KB |
Output is correct |
31 |
Correct |
539 ms |
66988 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
440 KB |
Output is correct |
39 |
Correct |
1 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 |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
3 ms |
860 KB |
Output is correct |
44 |
Correct |
3 ms |
860 KB |
Output is correct |
45 |
Correct |
234 ms |
31416 KB |
Output is correct |
46 |
Correct |
377 ms |
45932 KB |
Output is correct |
47 |
Correct |
426 ms |
45224 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
0 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
51 |
Correct |
0 ms |
372 KB |
Output is correct |
52 |
Correct |
0 ms |
348 KB |
Output is correct |
53 |
Correct |
0 ms |
348 KB |
Output is correct |
54 |
Correct |
0 ms |
348 KB |
Output is correct |
55 |
Correct |
552 ms |
65580 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
3 ms |
860 KB |
Output is correct |
58 |
Correct |
10 ms |
2512 KB |
Output is correct |
59 |
Correct |
10 ms |
1956 KB |
Output is correct |
60 |
Correct |
234 ms |
32948 KB |
Output is correct |
61 |
Correct |
353 ms |
44204 KB |
Output is correct |
62 |
Correct |
462 ms |
54384 KB |
Output is correct |
63 |
Correct |
581 ms |
65452 KB |
Output is correct |
64 |
Correct |
0 ms |
348 KB |
Output is correct |
65 |
Correct |
0 ms |
348 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
542 ms |
64592 KB |
Output is correct |
68 |
Correct |
556 ms |
64940 KB |
Output is correct |
69 |
Correct |
526 ms |
67500 KB |
Output is correct |
70 |
Correct |
4 ms |
1116 KB |
Output is correct |
71 |
Correct |
8 ms |
2000 KB |
Output is correct |
72 |
Correct |
249 ms |
27324 KB |
Output is correct |
73 |
Correct |
363 ms |
43752 KB |
Output is correct |
74 |
Correct |
609 ms |
54444 KB |
Output is correct |
75 |
Correct |
584 ms |
64400 KB |
Output is correct |
76 |
Correct |
554 ms |
71848 KB |
Output is correct |
77 |
Correct |
5 ms |
1372 KB |
Output is correct |
78 |
Correct |
10 ms |
2176 KB |
Output is correct |
79 |
Correct |
230 ms |
29480 KB |
Output is correct |
80 |
Correct |
436 ms |
45076 KB |
Output is correct |
81 |
Correct |
591 ms |
56596 KB |
Output is correct |
82 |
Correct |
0 ms |
344 KB |
Output is correct |
83 |
Correct |
0 ms |
348 KB |
Output is correct |
84 |
Correct |
0 ms |
348 KB |
Output is correct |
85 |
Correct |
598 ms |
72080 KB |
Output is correct |
86 |
Correct |
597 ms |
66964 KB |
Output is correct |
87 |
Correct |
597 ms |
64428 KB |
Output is correct |
88 |
Correct |
513 ms |
53776 KB |
Output is correct |
89 |
Correct |
450 ms |
56108 KB |
Output is correct |
90 |
Correct |
352 ms |
37208 KB |
Output is correct |
91 |
Correct |
367 ms |
37132 KB |
Output is correct |
92 |
Correct |
516 ms |
47020 KB |
Output is correct |
93 |
Correct |
480 ms |
46792 KB |
Output is correct |
94 |
Correct |
668 ms |
46764 KB |
Output is correct |
95 |
Correct |
608 ms |
46764 KB |
Output is correct |
96 |
Correct |
0 ms |
348 KB |
Output is correct |
97 |
Correct |
29 ms |
4748 KB |
Output is correct |
98 |
Correct |
154 ms |
23856 KB |
Output is correct |
99 |
Correct |
563 ms |
68012 KB |
Output is correct |
100 |
Correct |
12 ms |
2140 KB |
Output is correct |
101 |
Correct |
62 ms |
9044 KB |
Output is correct |
102 |
Correct |
142 ms |
17668 KB |
Output is correct |
103 |
Correct |
214 ms |
18364 KB |
Output is correct |
104 |
Correct |
255 ms |
24836 KB |
Output is correct |
105 |
Correct |
357 ms |
31404 KB |
Output is correct |
106 |
Correct |
479 ms |
38152 KB |
Output is correct |
107 |
Correct |
601 ms |
44896 KB |
Output is correct |
108 |
Correct |
0 ms |
348 KB |
Output is correct |
109 |
Correct |
0 ms |
348 KB |
Output is correct |
110 |
Correct |
0 ms |
348 KB |
Output is correct |
111 |
Correct |
0 ms |
348 KB |
Output is correct |
112 |
Correct |
0 ms |
348 KB |
Output is correct |
113 |
Correct |
0 ms |
348 KB |
Output is correct |
114 |
Correct |
1 ms |
348 KB |
Output is correct |
115 |
Correct |
0 ms |
348 KB |
Output is correct |
116 |
Correct |
0 ms |
348 KB |
Output is correct |
117 |
Correct |
1 ms |
348 KB |
Output is correct |
118 |
Correct |
1 ms |
348 KB |
Output is correct |
119 |
Correct |
2 ms |
860 KB |
Output is correct |
120 |
Correct |
3 ms |
860 KB |
Output is correct |
121 |
Correct |
242 ms |
31316 KB |
Output is correct |
122 |
Correct |
426 ms |
46036 KB |
Output is correct |
123 |
Correct |
370 ms |
45228 KB |
Output is correct |
124 |
Correct |
1 ms |
348 KB |
Output is correct |
125 |
Correct |
0 ms |
348 KB |
Output is correct |
126 |
Correct |
0 ms |
348 KB |
Output is correct |
127 |
Correct |
519 ms |
64428 KB |
Output is correct |
128 |
Correct |
514 ms |
64936 KB |
Output is correct |
129 |
Correct |
499 ms |
67496 KB |
Output is correct |
130 |
Correct |
4 ms |
1116 KB |
Output is correct |
131 |
Correct |
8 ms |
1884 KB |
Output is correct |
132 |
Correct |
226 ms |
27304 KB |
Output is correct |
133 |
Correct |
441 ms |
43784 KB |
Output is correct |
134 |
Correct |
539 ms |
54448 KB |
Output is correct |
135 |
Correct |
535 ms |
72216 KB |
Output is correct |
136 |
Correct |
482 ms |
62380 KB |
Output is correct |
137 |
Correct |
525 ms |
72380 KB |
Output is correct |
138 |
Correct |
630 ms |
59056 KB |
Output is correct |
139 |
Correct |
502 ms |
52396 KB |
Output is correct |
140 |
Correct |
0 ms |
348 KB |
Output is correct |
141 |
Correct |
65 ms |
8512 KB |
Output is correct |
142 |
Correct |
23 ms |
4392 KB |
Output is correct |
143 |
Correct |
83 ms |
12620 KB |
Output is correct |
144 |
Correct |
148 ms |
20820 KB |
Output is correct |
145 |
Correct |
231 ms |
29888 KB |
Output is correct |
146 |
Correct |
327 ms |
37560 KB |
Output is correct |
147 |
Correct |
385 ms |
44808 KB |
Output is correct |
148 |
Correct |
460 ms |
52208 KB |
Output is correct |
149 |
Correct |
576 ms |
59312 KB |
Output is correct |
150 |
Correct |
556 ms |
64428 KB |
Output is correct |
151 |
Correct |
578 ms |
71824 KB |
Output is correct |
152 |
Correct |
5 ms |
1372 KB |
Output is correct |
153 |
Correct |
9 ms |
2116 KB |
Output is correct |
154 |
Correct |
257 ms |
29416 KB |
Output is correct |
155 |
Correct |
378 ms |
45064 KB |
Output is correct |
156 |
Correct |
563 ms |
56676 KB |
Output is correct |
157 |
Correct |
1 ms |
348 KB |
Output is correct |
158 |
Correct |
0 ms |
348 KB |
Output is correct |
159 |
Correct |
0 ms |
348 KB |
Output is correct |
160 |
Correct |
0 ms |
348 KB |
Output is correct |
161 |
Correct |
599 ms |
62792 KB |
Output is correct |
162 |
Correct |
492 ms |
64196 KB |
Output is correct |
163 |
Correct |
477 ms |
54956 KB |
Output is correct |
164 |
Correct |
484 ms |
54036 KB |
Output is correct |
165 |
Correct |
563 ms |
61848 KB |
Output is correct |
166 |
Correct |
518 ms |
62520 KB |
Output is correct |
167 |
Correct |
95 ms |
11724 KB |
Output is correct |
168 |
Correct |
41 ms |
6392 KB |
Output is correct |
169 |
Correct |
102 ms |
13072 KB |
Output is correct |
170 |
Correct |
198 ms |
23636 KB |
Output is correct |
171 |
Correct |
275 ms |
30092 KB |
Output is correct |
172 |
Correct |
232 ms |
31640 KB |
Output is correct |
173 |
Correct |
344 ms |
38088 KB |
Output is correct |
174 |
Correct |
400 ms |
44208 KB |
Output is correct |
175 |
Correct |
407 ms |
50092 KB |
Output is correct |
176 |
Correct |
574 ms |
56748 KB |
Output is correct |
177 |
Correct |
583 ms |
63140 KB |
Output is correct |