#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
#define sz(s) ((int)s.size())
typedef array<int, 2> ar2;
// set<ar2> pts;
map<ar2, ar2> edges;
map<ar2, int> pts;
// set<ar2> edges;
set<ar2> vis;
int n;
vector<int> u, v, a, b;
set<ar2> matched;
vector<ar2> adj2({{2, 0}, {0, 2}, {-2, 0}, {0, -2}});
vector<ar2> adj({{1, 0}, {0, 1}, {-1, 0}, {0, -1}});
ar2 operator+(ar2 a, ar2 b) {
return {a[0]+b[0], a[1]+b[1]};
}
ar2 operator-(ar2 a, ar2 b) {
return {a[0]-b[0], a[1]-b[1]};
}
void dfs(ar2 cur) {
vis.insert(cur);
for (int i = 0; i < 4; i++) {
ar2 nxt = cur+adj2[i];
if (pts.find(nxt) == pts.end()) {
continue;
}
ar2 epos = cur+adj[i];
edges[epos] = {pts[cur], pts[nxt]};
if (vis.find(nxt) == vis.end()) dfs(nxt);
}
}
bool is_real(ar2 &square) {
int s = 0;
for (ar2 v1: adj) s += (edges.find(square+v1) != edges.end());
return s <= 2;
}
void match(ar2 e);
bool match(ar2 edge, ar2 sq_orig) {
bool comp = !is_real(sq_orig);
bool virt = ((edge[1]&1)&&comp);
ar2 sq = (virt ? ar2({-sq_orig[0], -sq_orig[1]}) : sq_orig);
if (matched.find(sq) != matched.end()) return 0;
if (!virt) {
u.push_back(edges[edge][0]);
v.push_back(edges[edge][1]);
a.push_back(sq[0]);
b.push_back(sq[1]);
}
matched.insert(sq);
matched.insert(edge);
if (comp) match(sq_orig+sq_orig-edge); // must exist
else {
for (ar2 v1: adj) {
if (edges.find(sq_orig+v1) != edges.end() && matched.find(sq_orig+v1) == matched.end()) match(sq_orig+v1);
}
}
return 1;
}
void match(ar2 edge) {
if (matched.find(edge) != matched.end()) return;
if (edge[0]&1) { // horizontal edge
if (!match(edge, edge+ar2({0,1}))) assert(match(edge, edge+ar2({0, -1})));
}
else if (!match(edge, edge+ar2({1, 0}))) assert(match(edge, edge+ar2({-1, 0})));
}
int construct_roads(vector<int> x, vector<int> y) {
n = sz(x);
for (int i = 0; i < n; i++) {
// pts.insert({x[i], y[i]});
pts[{x[i], y[i]}] = i;
}
dfs({x[0], y[0]});
if (sz(vis) != n) return 0;
for (auto v: edges) match(v.first);
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 |
344 KB |
Output is correct |
5 |
Correct |
0 ms |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
344 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
334 ms |
43192 KB |
Output is correct |
10 |
Correct |
24 ms |
4956 KB |
Output is correct |
11 |
Correct |
183 ms |
24028 KB |
Output is correct |
12 |
Correct |
38 ms |
7112 KB |
Output is correct |
13 |
Correct |
49 ms |
10508 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
672 KB |
Output is correct |
16 |
Correct |
324 ms |
38840 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 |
344 KB |
Output is correct |
5 |
Correct |
0 ms |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
344 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
334 ms |
43192 KB |
Output is correct |
10 |
Correct |
24 ms |
4956 KB |
Output is correct |
11 |
Correct |
183 ms |
24028 KB |
Output is correct |
12 |
Correct |
38 ms |
7112 KB |
Output is correct |
13 |
Correct |
49 ms |
10508 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
672 KB |
Output is correct |
16 |
Correct |
324 ms |
38840 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 |
1 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
1018 ms |
105388 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
3 ms |
860 KB |
Output is correct |
26 |
Correct |
3 ms |
860 KB |
Output is correct |
27 |
Correct |
2 ms |
860 KB |
Output is correct |
28 |
Correct |
329 ms |
42104 KB |
Output is correct |
29 |
Correct |
573 ms |
61452 KB |
Output is correct |
30 |
Correct |
728 ms |
82992 KB |
Output is correct |
31 |
Correct |
968 ms |
105284 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 |
360 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
440 KB |
Output is correct |
37 |
Correct |
0 ms |
360 KB |
Output is correct |
38 |
Correct |
0 ms |
348 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 |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
2 ms |
604 KB |
Output is correct |
44 |
Correct |
2 ms |
604 KB |
Output is correct |
45 |
Correct |
329 ms |
40888 KB |
Output is correct |
46 |
Correct |
498 ms |
59752 KB |
Output is correct |
47 |
Correct |
475 ms |
59048 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 |
344 KB |
Output is correct |
5 |
Correct |
0 ms |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
344 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
334 ms |
43192 KB |
Output is correct |
10 |
Correct |
24 ms |
4956 KB |
Output is correct |
11 |
Correct |
183 ms |
24028 KB |
Output is correct |
12 |
Correct |
38 ms |
7112 KB |
Output is correct |
13 |
Correct |
49 ms |
10508 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
672 KB |
Output is correct |
16 |
Correct |
324 ms |
38840 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 |
1 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
1018 ms |
105388 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
3 ms |
860 KB |
Output is correct |
26 |
Correct |
3 ms |
860 KB |
Output is correct |
27 |
Correct |
2 ms |
860 KB |
Output is correct |
28 |
Correct |
329 ms |
42104 KB |
Output is correct |
29 |
Correct |
573 ms |
61452 KB |
Output is correct |
30 |
Correct |
728 ms |
82992 KB |
Output is correct |
31 |
Correct |
968 ms |
105284 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 |
360 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
440 KB |
Output is correct |
37 |
Correct |
0 ms |
360 KB |
Output is correct |
38 |
Correct |
0 ms |
348 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 |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
2 ms |
604 KB |
Output is correct |
44 |
Correct |
2 ms |
604 KB |
Output is correct |
45 |
Correct |
329 ms |
40888 KB |
Output is correct |
46 |
Correct |
498 ms |
59752 KB |
Output is correct |
47 |
Correct |
475 ms |
59048 KB |
Output is correct |
48 |
Correct |
1 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 |
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 |
1074 ms |
110592 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
5 ms |
1388 KB |
Output is correct |
58 |
Correct |
21 ms |
3676 KB |
Output is correct |
59 |
Correct |
6 ms |
1880 KB |
Output is correct |
60 |
Correct |
472 ms |
55248 KB |
Output is correct |
61 |
Correct |
690 ms |
74660 KB |
Output is correct |
62 |
Correct |
860 ms |
91328 KB |
Output is correct |
63 |
Correct |
1078 ms |
110544 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 |
664 ms |
83424 KB |
Output is correct |
68 |
Correct |
679 ms |
83872 KB |
Output is correct |
69 |
Correct |
678 ms |
86056 KB |
Output is correct |
70 |
Correct |
3 ms |
856 KB |
Output is correct |
71 |
Correct |
4 ms |
1452 KB |
Output is correct |
72 |
Correct |
345 ms |
37524 KB |
Output is correct |
73 |
Correct |
525 ms |
59052 KB |
Output is correct |
74 |
Correct |
726 ms |
75428 KB |
Output is correct |
75 |
Correct |
942 ms |
92840 KB |
Output is correct |
76 |
Correct |
700 ms |
89616 KB |
Output is correct |
77 |
Correct |
5 ms |
1116 KB |
Output is correct |
78 |
Correct |
6 ms |
1836 KB |
Output is correct |
79 |
Correct |
389 ms |
41824 KB |
Output is correct |
80 |
Correct |
617 ms |
63652 KB |
Output is correct |
81 |
Correct |
820 ms |
81796 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 |
344 KB |
Output is correct |
5 |
Correct |
0 ms |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
344 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
334 ms |
43192 KB |
Output is correct |
10 |
Correct |
24 ms |
4956 KB |
Output is correct |
11 |
Correct |
183 ms |
24028 KB |
Output is correct |
12 |
Correct |
38 ms |
7112 KB |
Output is correct |
13 |
Correct |
49 ms |
10508 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
672 KB |
Output is correct |
16 |
Correct |
324 ms |
38840 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
883 ms |
104180 KB |
Output is correct |
21 |
Correct |
735 ms |
85064 KB |
Output is correct |
22 |
Correct |
791 ms |
85060 KB |
Output is correct |
23 |
Correct |
540 ms |
68208 KB |
Output is correct |
24 |
Correct |
94 ms |
15956 KB |
Output is correct |
25 |
Correct |
98 ms |
15956 KB |
Output is correct |
26 |
Correct |
87 ms |
15956 KB |
Output is correct |
27 |
Correct |
524 ms |
66264 KB |
Output is correct |
28 |
Correct |
575 ms |
66216 KB |
Output is correct |
29 |
Correct |
734 ms |
66276 KB |
Output is correct |
30 |
Correct |
718 ms |
66212 KB |
Output is correct |
31 |
Correct |
0 ms |
344 KB |
Output is correct |
32 |
Correct |
41 ms |
6060 KB |
Output is correct |
33 |
Correct |
43 ms |
8048 KB |
Output is correct |
34 |
Correct |
770 ms |
104264 KB |
Output is correct |
35 |
Correct |
8 ms |
1628 KB |
Output is correct |
36 |
Correct |
30 ms |
5440 KB |
Output is correct |
37 |
Correct |
50 ms |
9296 KB |
Output is correct |
38 |
Correct |
279 ms |
26956 KB |
Output is correct |
39 |
Correct |
364 ms |
36756 KB |
Output is correct |
40 |
Correct |
500 ms |
46832 KB |
Output is correct |
41 |
Correct |
604 ms |
56828 KB |
Output is correct |
42 |
Correct |
751 ms |
66712 KB |
Output is correct |
43 |
Correct |
0 ms |
344 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 |
0 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
344 KB |
Output is correct |
51 |
Correct |
0 ms |
348 KB |
Output is correct |
52 |
Correct |
0 ms |
348 KB |
Output is correct |
53 |
Correct |
0 ms |
348 KB |
Output is correct |
54 |
Correct |
3 ms |
600 KB |
Output is correct |
55 |
Correct |
2 ms |
600 KB |
Output is correct |
56 |
Correct |
325 ms |
39864 KB |
Output is correct |
57 |
Correct |
493 ms |
58532 KB |
Output is correct |
58 |
Correct |
513 ms |
57772 KB |
Output is correct |
59 |
Correct |
0 ms |
344 KB |
Output is correct |
60 |
Correct |
0 ms |
348 KB |
Output is correct |
61 |
Correct |
0 ms |
348 KB |
Output is correct |
62 |
Correct |
724 ms |
81624 KB |
Output is correct |
63 |
Correct |
694 ms |
82084 KB |
Output is correct |
64 |
Correct |
686 ms |
84132 KB |
Output is correct |
65 |
Correct |
3 ms |
856 KB |
Output is correct |
66 |
Correct |
5 ms |
1368 KB |
Output is correct |
67 |
Correct |
320 ms |
36728 KB |
Output is correct |
68 |
Correct |
539 ms |
57924 KB |
Output is correct |
69 |
Correct |
753 ms |
73640 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 |
344 KB |
Output is correct |
5 |
Correct |
0 ms |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
344 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
334 ms |
43192 KB |
Output is correct |
10 |
Correct |
24 ms |
4956 KB |
Output is correct |
11 |
Correct |
183 ms |
24028 KB |
Output is correct |
12 |
Correct |
38 ms |
7112 KB |
Output is correct |
13 |
Correct |
49 ms |
10508 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
672 KB |
Output is correct |
16 |
Correct |
324 ms |
38840 KB |
Output is correct |
17 |
Correct |
640 ms |
88076 KB |
Output is correct |
18 |
Correct |
647 ms |
79296 KB |
Output is correct |
19 |
Correct |
786 ms |
103876 KB |
Output is correct |
20 |
Correct |
947 ms |
92540 KB |
Output is correct |
21 |
Correct |
652 ms |
72616 KB |
Output is correct |
22 |
Correct |
0 ms |
344 KB |
Output is correct |
23 |
Correct |
103 ms |
12212 KB |
Output is correct |
24 |
Correct |
20 ms |
3676 KB |
Output is correct |
25 |
Correct |
43 ms |
7760 KB |
Output is correct |
26 |
Correct |
91 ms |
11804 KB |
Output is correct |
27 |
Correct |
416 ms |
44120 KB |
Output is correct |
28 |
Correct |
521 ms |
55196 KB |
Output is correct |
29 |
Correct |
661 ms |
66096 KB |
Output is correct |
30 |
Correct |
769 ms |
76916 KB |
Output is correct |
31 |
Correct |
884 ms |
87980 KB |
Output is correct |
32 |
Correct |
918 ms |
91520 KB |
Output is correct |
33 |
Correct |
707 ms |
87892 KB |
Output is correct |
34 |
Correct |
4 ms |
1116 KB |
Output is correct |
35 |
Correct |
6 ms |
1776 KB |
Output is correct |
36 |
Correct |
357 ms |
41140 KB |
Output is correct |
37 |
Correct |
549 ms |
62120 KB |
Output is correct |
38 |
Correct |
754 ms |
80036 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 |
344 KB |
Output is correct |
5 |
Correct |
0 ms |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
344 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
334 ms |
43192 KB |
Output is correct |
10 |
Correct |
24 ms |
4956 KB |
Output is correct |
11 |
Correct |
183 ms |
24028 KB |
Output is correct |
12 |
Correct |
38 ms |
7112 KB |
Output is correct |
13 |
Correct |
49 ms |
10508 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
672 KB |
Output is correct |
16 |
Correct |
324 ms |
38840 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 |
1 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
1018 ms |
105388 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
3 ms |
860 KB |
Output is correct |
26 |
Correct |
3 ms |
860 KB |
Output is correct |
27 |
Correct |
2 ms |
860 KB |
Output is correct |
28 |
Correct |
329 ms |
42104 KB |
Output is correct |
29 |
Correct |
573 ms |
61452 KB |
Output is correct |
30 |
Correct |
728 ms |
82992 KB |
Output is correct |
31 |
Correct |
968 ms |
105284 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 |
360 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
440 KB |
Output is correct |
37 |
Correct |
0 ms |
360 KB |
Output is correct |
38 |
Correct |
0 ms |
348 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 |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
2 ms |
604 KB |
Output is correct |
44 |
Correct |
2 ms |
604 KB |
Output is correct |
45 |
Correct |
329 ms |
40888 KB |
Output is correct |
46 |
Correct |
498 ms |
59752 KB |
Output is correct |
47 |
Correct |
475 ms |
59048 KB |
Output is correct |
48 |
Correct |
1 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 |
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 |
1074 ms |
110592 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
5 ms |
1388 KB |
Output is correct |
58 |
Correct |
21 ms |
3676 KB |
Output is correct |
59 |
Correct |
6 ms |
1880 KB |
Output is correct |
60 |
Correct |
472 ms |
55248 KB |
Output is correct |
61 |
Correct |
690 ms |
74660 KB |
Output is correct |
62 |
Correct |
860 ms |
91328 KB |
Output is correct |
63 |
Correct |
1078 ms |
110544 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 |
664 ms |
83424 KB |
Output is correct |
68 |
Correct |
679 ms |
83872 KB |
Output is correct |
69 |
Correct |
678 ms |
86056 KB |
Output is correct |
70 |
Correct |
3 ms |
856 KB |
Output is correct |
71 |
Correct |
4 ms |
1452 KB |
Output is correct |
72 |
Correct |
345 ms |
37524 KB |
Output is correct |
73 |
Correct |
525 ms |
59052 KB |
Output is correct |
74 |
Correct |
726 ms |
75428 KB |
Output is correct |
75 |
Correct |
942 ms |
92840 KB |
Output is correct |
76 |
Correct |
700 ms |
89616 KB |
Output is correct |
77 |
Correct |
5 ms |
1116 KB |
Output is correct |
78 |
Correct |
6 ms |
1836 KB |
Output is correct |
79 |
Correct |
389 ms |
41824 KB |
Output is correct |
80 |
Correct |
617 ms |
63652 KB |
Output is correct |
81 |
Correct |
820 ms |
81796 KB |
Output is correct |
82 |
Correct |
0 ms |
348 KB |
Output is correct |
83 |
Correct |
0 ms |
348 KB |
Output is correct |
84 |
Correct |
0 ms |
348 KB |
Output is correct |
85 |
Correct |
883 ms |
104180 KB |
Output is correct |
86 |
Correct |
735 ms |
85064 KB |
Output is correct |
87 |
Correct |
791 ms |
85060 KB |
Output is correct |
88 |
Correct |
540 ms |
68208 KB |
Output is correct |
89 |
Correct |
94 ms |
15956 KB |
Output is correct |
90 |
Correct |
98 ms |
15956 KB |
Output is correct |
91 |
Correct |
87 ms |
15956 KB |
Output is correct |
92 |
Correct |
524 ms |
66264 KB |
Output is correct |
93 |
Correct |
575 ms |
66216 KB |
Output is correct |
94 |
Correct |
734 ms |
66276 KB |
Output is correct |
95 |
Correct |
718 ms |
66212 KB |
Output is correct |
96 |
Correct |
0 ms |
344 KB |
Output is correct |
97 |
Correct |
41 ms |
6060 KB |
Output is correct |
98 |
Correct |
43 ms |
8048 KB |
Output is correct |
99 |
Correct |
770 ms |
104264 KB |
Output is correct |
100 |
Correct |
8 ms |
1628 KB |
Output is correct |
101 |
Correct |
30 ms |
5440 KB |
Output is correct |
102 |
Correct |
50 ms |
9296 KB |
Output is correct |
103 |
Correct |
279 ms |
26956 KB |
Output is correct |
104 |
Correct |
364 ms |
36756 KB |
Output is correct |
105 |
Correct |
500 ms |
46832 KB |
Output is correct |
106 |
Correct |
604 ms |
56828 KB |
Output is correct |
107 |
Correct |
751 ms |
66712 KB |
Output is correct |
108 |
Correct |
0 ms |
344 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 |
0 ms |
348 KB |
Output is correct |
115 |
Correct |
0 ms |
344 KB |
Output is correct |
116 |
Correct |
0 ms |
348 KB |
Output is correct |
117 |
Correct |
0 ms |
348 KB |
Output is correct |
118 |
Correct |
0 ms |
348 KB |
Output is correct |
119 |
Correct |
3 ms |
600 KB |
Output is correct |
120 |
Correct |
2 ms |
600 KB |
Output is correct |
121 |
Correct |
325 ms |
39864 KB |
Output is correct |
122 |
Correct |
493 ms |
58532 KB |
Output is correct |
123 |
Correct |
513 ms |
57772 KB |
Output is correct |
124 |
Correct |
0 ms |
344 KB |
Output is correct |
125 |
Correct |
0 ms |
348 KB |
Output is correct |
126 |
Correct |
0 ms |
348 KB |
Output is correct |
127 |
Correct |
724 ms |
81624 KB |
Output is correct |
128 |
Correct |
694 ms |
82084 KB |
Output is correct |
129 |
Correct |
686 ms |
84132 KB |
Output is correct |
130 |
Correct |
3 ms |
856 KB |
Output is correct |
131 |
Correct |
5 ms |
1368 KB |
Output is correct |
132 |
Correct |
320 ms |
36728 KB |
Output is correct |
133 |
Correct |
539 ms |
57924 KB |
Output is correct |
134 |
Correct |
753 ms |
73640 KB |
Output is correct |
135 |
Correct |
640 ms |
88076 KB |
Output is correct |
136 |
Correct |
647 ms |
79296 KB |
Output is correct |
137 |
Correct |
786 ms |
103876 KB |
Output is correct |
138 |
Correct |
947 ms |
92540 KB |
Output is correct |
139 |
Correct |
652 ms |
72616 KB |
Output is correct |
140 |
Correct |
0 ms |
344 KB |
Output is correct |
141 |
Correct |
103 ms |
12212 KB |
Output is correct |
142 |
Correct |
20 ms |
3676 KB |
Output is correct |
143 |
Correct |
43 ms |
7760 KB |
Output is correct |
144 |
Correct |
91 ms |
11804 KB |
Output is correct |
145 |
Correct |
416 ms |
44120 KB |
Output is correct |
146 |
Correct |
521 ms |
55196 KB |
Output is correct |
147 |
Correct |
661 ms |
66096 KB |
Output is correct |
148 |
Correct |
769 ms |
76916 KB |
Output is correct |
149 |
Correct |
884 ms |
87980 KB |
Output is correct |
150 |
Correct |
918 ms |
91520 KB |
Output is correct |
151 |
Correct |
707 ms |
87892 KB |
Output is correct |
152 |
Correct |
4 ms |
1116 KB |
Output is correct |
153 |
Correct |
6 ms |
1776 KB |
Output is correct |
154 |
Correct |
357 ms |
41140 KB |
Output is correct |
155 |
Correct |
549 ms |
62120 KB |
Output is correct |
156 |
Correct |
754 ms |
80036 KB |
Output is correct |
157 |
Correct |
0 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 |
1105 ms |
121000 KB |
Output is correct |
162 |
Correct |
746 ms |
106820 KB |
Output is correct |
163 |
Correct |
720 ms |
104264 KB |
Output is correct |
164 |
Correct |
710 ms |
104448 KB |
Output is correct |
165 |
Correct |
975 ms |
112040 KB |
Output is correct |
166 |
Correct |
1100 ms |
118696 KB |
Output is correct |
167 |
Correct |
206 ms |
23496 KB |
Output is correct |
168 |
Correct |
37 ms |
6736 KB |
Output is correct |
169 |
Correct |
57 ms |
10576 KB |
Output is correct |
170 |
Correct |
92 ms |
17704 KB |
Output is correct |
171 |
Correct |
103 ms |
20172 KB |
Output is correct |
172 |
Correct |
628 ms |
60548 KB |
Output is correct |
173 |
Correct |
766 ms |
72608 KB |
Output is correct |
174 |
Correct |
960 ms |
84924 KB |
Output is correct |
175 |
Correct |
1045 ms |
96760 KB |
Output is correct |
176 |
Correct |
1227 ms |
109336 KB |
Output is correct |
177 |
Correct |
1335 ms |
121416 KB |
Output is correct |