#include "parks.h"
#include <bits/stdc++.h>
#define SIZE 200001
using namespace std;
struct point
{
int x, y, idx;
};
set<pair<int, int> > vis;
map<pair<int, int>, int> fnt;
point p[SIZE];
int root[SIZE], cnt;
int dx[5][3]=
{
{ 1, 1 },
{ 1, -1 },
{ -1, 1 },
{ -1, -1 }
};
int Find(int x)
{
if (x==root[x]) return x;
return root[x]=Find(root[x]);
}
void Union(int x, int y)
{
if (Find(x)==Find(y)) return;
root[root[y]]=root[x], cnt++;
}
bool comp1(point a, point b)
{
if (a.x==b.x) return a.y<b.y;
return a.x<b.x;
}
bool comp2(point a, point b)
{
if (a.y==b.y) return a.x<b.x;
return a.y<b.y;
}
int construct_roads(vector<int> X, vector<int> Y)
{
int N=X.size();
for (int i=0; i<N; i++) {
p[i].x=X[i], p[i].y=Y[i], p[i].idx=i, root[i]=i;
fnt.insert({{X[i], Y[i]}, i});
}
sort(p, p+N, comp1);
for (int i=0; i<N-1; i++) if (p[i].x==p[i+1].x && p[i].y==p[i+1].y-2) Union(p[i].idx, p[i+1].idx);
sort(p, p+N, comp2);
for (int i=0; i<N-1; i++) if (p[i].y==p[i+1].y && p[i].x==p[i+1].x-2) Union(p[i].idx, p[i+1].idx);
if (cnt!=N-1) return 0;
int bx, by;
vector<int> u, v, a, b;
for (int i=0; i<N; i++) for (int j=0; j<4; j++) {
bx=p[i].x+dx[j][0], by=p[i].y+dx[j][1];
if (vis.find({bx, by})==vis.end()) {
vis.insert({bx, by});
if ((bx+by)%4==0) {
if (fnt.find({bx-1, by-1})!=fnt.end() && fnt.find({bx-1, by+1})!=fnt.end()) u.push_back(fnt[{bx-1, by-1}]), v.push_back(fnt[{bx-1, by+1}]), a.push_back(bx), b.push_back(by);
else if (fnt.find({bx+1, by-1})!=fnt.end() && fnt.find({bx+1, by+1})!=fnt.end()) u.push_back(fnt[{bx+1, by-1}]), v.push_back(fnt[{bx+1, by+1}]), a.push_back(bx), b.push_back(by);
}
else {
if (fnt.find({bx-1, by-1})!=fnt.end() && fnt.find({bx+1, by-1})!=fnt.end()) u.push_back(fnt[{bx-1, by-1}]), v.push_back(fnt[{bx+1, by-1}]), a.push_back(bx), b.push_back(by);
else if (fnt.find({bx-1, by+1})!=fnt.end() && fnt.find({bx+1, by+1})!=fnt.end()) u.push_back(fnt[{bx-1, by+1}]), v.push_back(fnt[{bx+1, by+1}]), a.push_back(bx), b.push_back(by);
}
}
}
build(u, v, a, b);
return 1;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
300 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
296 ms |
24596 KB |
Output is correct |
10 |
Correct |
23 ms |
2868 KB |
Output is correct |
11 |
Correct |
144 ms |
13388 KB |
Output is correct |
12 |
Correct |
36 ms |
4212 KB |
Output is correct |
13 |
Correct |
25 ms |
4724 KB |
Output is correct |
14 |
Correct |
1 ms |
332 KB |
Output is correct |
15 |
Correct |
2 ms |
460 KB |
Output is correct |
16 |
Correct |
320 ms |
24568 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
300 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
296 ms |
24596 KB |
Output is correct |
10 |
Correct |
23 ms |
2868 KB |
Output is correct |
11 |
Correct |
144 ms |
13388 KB |
Output is correct |
12 |
Correct |
36 ms |
4212 KB |
Output is correct |
13 |
Correct |
25 ms |
4724 KB |
Output is correct |
14 |
Correct |
1 ms |
332 KB |
Output is correct |
15 |
Correct |
2 ms |
460 KB |
Output is correct |
16 |
Correct |
320 ms |
24568 KB |
Output is correct |
17 |
Correct |
1 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
204 KB |
Output is correct |
19 |
Correct |
1 ms |
204 KB |
Output is correct |
20 |
Correct |
1 ms |
204 KB |
Output is correct |
21 |
Correct |
1 ms |
204 KB |
Output is correct |
22 |
Correct |
1 ms |
204 KB |
Output is correct |
23 |
Correct |
687 ms |
44336 KB |
Output is correct |
24 |
Correct |
1 ms |
304 KB |
Output is correct |
25 |
Correct |
3 ms |
568 KB |
Output is correct |
26 |
Correct |
3 ms |
588 KB |
Output is correct |
27 |
Correct |
3 ms |
588 KB |
Output is correct |
28 |
Correct |
215 ms |
17832 KB |
Output is correct |
29 |
Correct |
340 ms |
26712 KB |
Output is correct |
30 |
Correct |
498 ms |
35500 KB |
Output is correct |
31 |
Correct |
673 ms |
44256 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
1 ms |
204 KB |
Output is correct |
34 |
Correct |
1 ms |
204 KB |
Output is correct |
35 |
Correct |
1 ms |
204 KB |
Output is correct |
36 |
Correct |
1 ms |
204 KB |
Output is correct |
37 |
Correct |
0 ms |
204 KB |
Output is correct |
38 |
Correct |
1 ms |
204 KB |
Output is correct |
39 |
Correct |
1 ms |
304 KB |
Output is correct |
40 |
Correct |
1 ms |
204 KB |
Output is correct |
41 |
Correct |
1 ms |
204 KB |
Output is correct |
42 |
Correct |
1 ms |
204 KB |
Output is correct |
43 |
Correct |
2 ms |
460 KB |
Output is correct |
44 |
Correct |
3 ms |
588 KB |
Output is correct |
45 |
Correct |
303 ms |
24636 KB |
Output is correct |
46 |
Correct |
475 ms |
35592 KB |
Output is correct |
47 |
Correct |
458 ms |
35556 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
300 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
296 ms |
24596 KB |
Output is correct |
10 |
Correct |
23 ms |
2868 KB |
Output is correct |
11 |
Correct |
144 ms |
13388 KB |
Output is correct |
12 |
Correct |
36 ms |
4212 KB |
Output is correct |
13 |
Correct |
25 ms |
4724 KB |
Output is correct |
14 |
Correct |
1 ms |
332 KB |
Output is correct |
15 |
Correct |
2 ms |
460 KB |
Output is correct |
16 |
Correct |
320 ms |
24568 KB |
Output is correct |
17 |
Correct |
1 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
204 KB |
Output is correct |
19 |
Correct |
1 ms |
204 KB |
Output is correct |
20 |
Correct |
1 ms |
204 KB |
Output is correct |
21 |
Correct |
1 ms |
204 KB |
Output is correct |
22 |
Correct |
1 ms |
204 KB |
Output is correct |
23 |
Correct |
687 ms |
44336 KB |
Output is correct |
24 |
Correct |
1 ms |
304 KB |
Output is correct |
25 |
Correct |
3 ms |
568 KB |
Output is correct |
26 |
Correct |
3 ms |
588 KB |
Output is correct |
27 |
Correct |
3 ms |
588 KB |
Output is correct |
28 |
Correct |
215 ms |
17832 KB |
Output is correct |
29 |
Correct |
340 ms |
26712 KB |
Output is correct |
30 |
Correct |
498 ms |
35500 KB |
Output is correct |
31 |
Correct |
673 ms |
44256 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
1 ms |
204 KB |
Output is correct |
34 |
Correct |
1 ms |
204 KB |
Output is correct |
35 |
Correct |
1 ms |
204 KB |
Output is correct |
36 |
Correct |
1 ms |
204 KB |
Output is correct |
37 |
Correct |
0 ms |
204 KB |
Output is correct |
38 |
Correct |
1 ms |
204 KB |
Output is correct |
39 |
Correct |
1 ms |
304 KB |
Output is correct |
40 |
Correct |
1 ms |
204 KB |
Output is correct |
41 |
Correct |
1 ms |
204 KB |
Output is correct |
42 |
Correct |
1 ms |
204 KB |
Output is correct |
43 |
Correct |
2 ms |
460 KB |
Output is correct |
44 |
Correct |
3 ms |
588 KB |
Output is correct |
45 |
Correct |
303 ms |
24636 KB |
Output is correct |
46 |
Correct |
475 ms |
35592 KB |
Output is correct |
47 |
Correct |
458 ms |
35556 KB |
Output is correct |
48 |
Correct |
1 ms |
300 KB |
Output is correct |
49 |
Correct |
1 ms |
204 KB |
Output is correct |
50 |
Correct |
1 ms |
204 KB |
Output is correct |
51 |
Correct |
1 ms |
204 KB |
Output is correct |
52 |
Correct |
1 ms |
204 KB |
Output is correct |
53 |
Correct |
1 ms |
204 KB |
Output is correct |
54 |
Correct |
1 ms |
300 KB |
Output is correct |
55 |
Correct |
643 ms |
42520 KB |
Output is correct |
56 |
Correct |
1 ms |
204 KB |
Output is correct |
57 |
Correct |
4 ms |
716 KB |
Output is correct |
58 |
Correct |
12 ms |
1596 KB |
Output is correct |
59 |
Correct |
7 ms |
1208 KB |
Output is correct |
60 |
Correct |
272 ms |
21408 KB |
Output is correct |
61 |
Correct |
382 ms |
28808 KB |
Output is correct |
62 |
Correct |
478 ms |
35352 KB |
Output is correct |
63 |
Correct |
615 ms |
42644 KB |
Output is correct |
64 |
Correct |
0 ms |
204 KB |
Output is correct |
65 |
Correct |
1 ms |
204 KB |
Output is correct |
66 |
Correct |
1 ms |
204 KB |
Output is correct |
67 |
Correct |
738 ms |
49092 KB |
Output is correct |
68 |
Correct |
706 ms |
48868 KB |
Output is correct |
69 |
Correct |
751 ms |
48632 KB |
Output is correct |
70 |
Correct |
3 ms |
716 KB |
Output is correct |
71 |
Correct |
6 ms |
1100 KB |
Output is correct |
72 |
Correct |
294 ms |
24052 KB |
Output is correct |
73 |
Correct |
463 ms |
35996 KB |
Output is correct |
74 |
Correct |
640 ms |
47900 KB |
Output is correct |
75 |
Correct |
714 ms |
47056 KB |
Output is correct |
76 |
Correct |
780 ms |
49064 KB |
Output is correct |
77 |
Correct |
4 ms |
716 KB |
Output is correct |
78 |
Correct |
6 ms |
1100 KB |
Output is correct |
79 |
Correct |
283 ms |
23956 KB |
Output is correct |
80 |
Correct |
503 ms |
35988 KB |
Output is correct |
81 |
Correct |
643 ms |
47736 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
300 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
296 ms |
24596 KB |
Output is correct |
10 |
Correct |
23 ms |
2868 KB |
Output is correct |
11 |
Correct |
144 ms |
13388 KB |
Output is correct |
12 |
Correct |
36 ms |
4212 KB |
Output is correct |
13 |
Correct |
25 ms |
4724 KB |
Output is correct |
14 |
Correct |
1 ms |
332 KB |
Output is correct |
15 |
Correct |
2 ms |
460 KB |
Output is correct |
16 |
Correct |
320 ms |
24568 KB |
Output is correct |
17 |
Correct |
1 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
204 KB |
Output is correct |
19 |
Correct |
1 ms |
204 KB |
Output is correct |
20 |
Correct |
654 ms |
49148 KB |
Output is correct |
21 |
Correct |
697 ms |
49164 KB |
Output is correct |
22 |
Correct |
647 ms |
49176 KB |
Output is correct |
23 |
Correct |
542 ms |
41900 KB |
Output is correct |
24 |
Correct |
223 ms |
20764 KB |
Output is correct |
25 |
Correct |
234 ms |
20676 KB |
Output is correct |
26 |
Correct |
217 ms |
20676 KB |
Output is correct |
27 |
Correct |
804 ms |
48828 KB |
Output is correct |
28 |
Correct |
802 ms |
48840 KB |
Output is correct |
29 |
Correct |
761 ms |
48928 KB |
Output is correct |
30 |
Correct |
771 ms |
48804 KB |
Output is correct |
31 |
Correct |
1 ms |
204 KB |
Output is correct |
32 |
Correct |
53 ms |
3964 KB |
Output is correct |
33 |
Correct |
101 ms |
10924 KB |
Output is correct |
34 |
Correct |
620 ms |
49120 KB |
Output is correct |
35 |
Correct |
8 ms |
1356 KB |
Output is correct |
36 |
Correct |
43 ms |
5572 KB |
Output is correct |
37 |
Correct |
103 ms |
10900 KB |
Output is correct |
38 |
Correct |
328 ms |
18988 KB |
Output is correct |
39 |
Correct |
425 ms |
25884 KB |
Output is correct |
40 |
Correct |
599 ms |
32808 KB |
Output is correct |
41 |
Correct |
786 ms |
39560 KB |
Output is correct |
42 |
Correct |
845 ms |
46204 KB |
Output is correct |
43 |
Correct |
1 ms |
204 KB |
Output is correct |
44 |
Correct |
0 ms |
204 KB |
Output is correct |
45 |
Correct |
1 ms |
204 KB |
Output is correct |
46 |
Correct |
1 ms |
204 KB |
Output is correct |
47 |
Correct |
1 ms |
332 KB |
Output is correct |
48 |
Correct |
1 ms |
204 KB |
Output is correct |
49 |
Correct |
1 ms |
204 KB |
Output is correct |
50 |
Correct |
1 ms |
204 KB |
Output is correct |
51 |
Correct |
1 ms |
204 KB |
Output is correct |
52 |
Correct |
0 ms |
204 KB |
Output is correct |
53 |
Correct |
1 ms |
204 KB |
Output is correct |
54 |
Correct |
2 ms |
460 KB |
Output is correct |
55 |
Correct |
2 ms |
608 KB |
Output is correct |
56 |
Correct |
287 ms |
24576 KB |
Output is correct |
57 |
Correct |
437 ms |
35480 KB |
Output is correct |
58 |
Correct |
518 ms |
35472 KB |
Output is correct |
59 |
Correct |
1 ms |
204 KB |
Output is correct |
60 |
Correct |
0 ms |
204 KB |
Output is correct |
61 |
Correct |
1 ms |
304 KB |
Output is correct |
62 |
Correct |
686 ms |
48880 KB |
Output is correct |
63 |
Correct |
694 ms |
48840 KB |
Output is correct |
64 |
Correct |
681 ms |
48664 KB |
Output is correct |
65 |
Correct |
3 ms |
588 KB |
Output is correct |
66 |
Correct |
7 ms |
1100 KB |
Output is correct |
67 |
Correct |
288 ms |
24016 KB |
Output is correct |
68 |
Correct |
532 ms |
36152 KB |
Output is correct |
69 |
Correct |
659 ms |
47896 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
300 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
296 ms |
24596 KB |
Output is correct |
10 |
Correct |
23 ms |
2868 KB |
Output is correct |
11 |
Correct |
144 ms |
13388 KB |
Output is correct |
12 |
Correct |
36 ms |
4212 KB |
Output is correct |
13 |
Correct |
25 ms |
4724 KB |
Output is correct |
14 |
Correct |
1 ms |
332 KB |
Output is correct |
15 |
Correct |
2 ms |
460 KB |
Output is correct |
16 |
Correct |
320 ms |
24568 KB |
Output is correct |
17 |
Correct |
701 ms |
49024 KB |
Output is correct |
18 |
Correct |
665 ms |
49176 KB |
Output is correct |
19 |
Correct |
719 ms |
49188 KB |
Output is correct |
20 |
Correct |
809 ms |
44792 KB |
Output is correct |
21 |
Correct |
685 ms |
42036 KB |
Output is correct |
22 |
Correct |
1 ms |
204 KB |
Output is correct |
23 |
Correct |
98 ms |
7652 KB |
Output is correct |
24 |
Correct |
17 ms |
2372 KB |
Output is correct |
25 |
Correct |
67 ms |
7788 KB |
Output is correct |
26 |
Correct |
124 ms |
12996 KB |
Output is correct |
27 |
Correct |
365 ms |
23580 KB |
Output is correct |
28 |
Correct |
506 ms |
29448 KB |
Output is correct |
29 |
Correct |
613 ms |
35096 KB |
Output is correct |
30 |
Correct |
723 ms |
40716 KB |
Output is correct |
31 |
Correct |
816 ms |
46144 KB |
Output is correct |
32 |
Correct |
667 ms |
46924 KB |
Output is correct |
33 |
Correct |
706 ms |
48852 KB |
Output is correct |
34 |
Correct |
4 ms |
716 KB |
Output is correct |
35 |
Correct |
8 ms |
1228 KB |
Output is correct |
36 |
Correct |
299 ms |
23884 KB |
Output is correct |
37 |
Correct |
460 ms |
35844 KB |
Output is correct |
38 |
Correct |
666 ms |
47708 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
300 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
296 ms |
24596 KB |
Output is correct |
10 |
Correct |
23 ms |
2868 KB |
Output is correct |
11 |
Correct |
144 ms |
13388 KB |
Output is correct |
12 |
Correct |
36 ms |
4212 KB |
Output is correct |
13 |
Correct |
25 ms |
4724 KB |
Output is correct |
14 |
Correct |
1 ms |
332 KB |
Output is correct |
15 |
Correct |
2 ms |
460 KB |
Output is correct |
16 |
Correct |
320 ms |
24568 KB |
Output is correct |
17 |
Correct |
1 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
204 KB |
Output is correct |
19 |
Correct |
1 ms |
204 KB |
Output is correct |
20 |
Correct |
1 ms |
204 KB |
Output is correct |
21 |
Correct |
1 ms |
204 KB |
Output is correct |
22 |
Correct |
1 ms |
204 KB |
Output is correct |
23 |
Correct |
687 ms |
44336 KB |
Output is correct |
24 |
Correct |
1 ms |
304 KB |
Output is correct |
25 |
Correct |
3 ms |
568 KB |
Output is correct |
26 |
Correct |
3 ms |
588 KB |
Output is correct |
27 |
Correct |
3 ms |
588 KB |
Output is correct |
28 |
Correct |
215 ms |
17832 KB |
Output is correct |
29 |
Correct |
340 ms |
26712 KB |
Output is correct |
30 |
Correct |
498 ms |
35500 KB |
Output is correct |
31 |
Correct |
673 ms |
44256 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
1 ms |
204 KB |
Output is correct |
34 |
Correct |
1 ms |
204 KB |
Output is correct |
35 |
Correct |
1 ms |
204 KB |
Output is correct |
36 |
Correct |
1 ms |
204 KB |
Output is correct |
37 |
Correct |
0 ms |
204 KB |
Output is correct |
38 |
Correct |
1 ms |
204 KB |
Output is correct |
39 |
Correct |
1 ms |
304 KB |
Output is correct |
40 |
Correct |
1 ms |
204 KB |
Output is correct |
41 |
Correct |
1 ms |
204 KB |
Output is correct |
42 |
Correct |
1 ms |
204 KB |
Output is correct |
43 |
Correct |
2 ms |
460 KB |
Output is correct |
44 |
Correct |
3 ms |
588 KB |
Output is correct |
45 |
Correct |
303 ms |
24636 KB |
Output is correct |
46 |
Correct |
475 ms |
35592 KB |
Output is correct |
47 |
Correct |
458 ms |
35556 KB |
Output is correct |
48 |
Correct |
1 ms |
300 KB |
Output is correct |
49 |
Correct |
1 ms |
204 KB |
Output is correct |
50 |
Correct |
1 ms |
204 KB |
Output is correct |
51 |
Correct |
1 ms |
204 KB |
Output is correct |
52 |
Correct |
1 ms |
204 KB |
Output is correct |
53 |
Correct |
1 ms |
204 KB |
Output is correct |
54 |
Correct |
1 ms |
300 KB |
Output is correct |
55 |
Correct |
643 ms |
42520 KB |
Output is correct |
56 |
Correct |
1 ms |
204 KB |
Output is correct |
57 |
Correct |
4 ms |
716 KB |
Output is correct |
58 |
Correct |
12 ms |
1596 KB |
Output is correct |
59 |
Correct |
7 ms |
1208 KB |
Output is correct |
60 |
Correct |
272 ms |
21408 KB |
Output is correct |
61 |
Correct |
382 ms |
28808 KB |
Output is correct |
62 |
Correct |
478 ms |
35352 KB |
Output is correct |
63 |
Correct |
615 ms |
42644 KB |
Output is correct |
64 |
Correct |
0 ms |
204 KB |
Output is correct |
65 |
Correct |
1 ms |
204 KB |
Output is correct |
66 |
Correct |
1 ms |
204 KB |
Output is correct |
67 |
Correct |
738 ms |
49092 KB |
Output is correct |
68 |
Correct |
706 ms |
48868 KB |
Output is correct |
69 |
Correct |
751 ms |
48632 KB |
Output is correct |
70 |
Correct |
3 ms |
716 KB |
Output is correct |
71 |
Correct |
6 ms |
1100 KB |
Output is correct |
72 |
Correct |
294 ms |
24052 KB |
Output is correct |
73 |
Correct |
463 ms |
35996 KB |
Output is correct |
74 |
Correct |
640 ms |
47900 KB |
Output is correct |
75 |
Correct |
714 ms |
47056 KB |
Output is correct |
76 |
Correct |
780 ms |
49064 KB |
Output is correct |
77 |
Correct |
4 ms |
716 KB |
Output is correct |
78 |
Correct |
6 ms |
1100 KB |
Output is correct |
79 |
Correct |
283 ms |
23956 KB |
Output is correct |
80 |
Correct |
503 ms |
35988 KB |
Output is correct |
81 |
Correct |
643 ms |
47736 KB |
Output is correct |
82 |
Correct |
1 ms |
204 KB |
Output is correct |
83 |
Correct |
1 ms |
204 KB |
Output is correct |
84 |
Correct |
1 ms |
204 KB |
Output is correct |
85 |
Correct |
654 ms |
49148 KB |
Output is correct |
86 |
Correct |
697 ms |
49164 KB |
Output is correct |
87 |
Correct |
647 ms |
49176 KB |
Output is correct |
88 |
Correct |
542 ms |
41900 KB |
Output is correct |
89 |
Correct |
223 ms |
20764 KB |
Output is correct |
90 |
Correct |
234 ms |
20676 KB |
Output is correct |
91 |
Correct |
217 ms |
20676 KB |
Output is correct |
92 |
Correct |
804 ms |
48828 KB |
Output is correct |
93 |
Correct |
802 ms |
48840 KB |
Output is correct |
94 |
Correct |
761 ms |
48928 KB |
Output is correct |
95 |
Correct |
771 ms |
48804 KB |
Output is correct |
96 |
Correct |
1 ms |
204 KB |
Output is correct |
97 |
Correct |
53 ms |
3964 KB |
Output is correct |
98 |
Correct |
101 ms |
10924 KB |
Output is correct |
99 |
Correct |
620 ms |
49120 KB |
Output is correct |
100 |
Correct |
8 ms |
1356 KB |
Output is correct |
101 |
Correct |
43 ms |
5572 KB |
Output is correct |
102 |
Correct |
103 ms |
10900 KB |
Output is correct |
103 |
Correct |
328 ms |
18988 KB |
Output is correct |
104 |
Correct |
425 ms |
25884 KB |
Output is correct |
105 |
Correct |
599 ms |
32808 KB |
Output is correct |
106 |
Correct |
786 ms |
39560 KB |
Output is correct |
107 |
Correct |
845 ms |
46204 KB |
Output is correct |
108 |
Correct |
1 ms |
204 KB |
Output is correct |
109 |
Correct |
0 ms |
204 KB |
Output is correct |
110 |
Correct |
1 ms |
204 KB |
Output is correct |
111 |
Correct |
1 ms |
204 KB |
Output is correct |
112 |
Correct |
1 ms |
332 KB |
Output is correct |
113 |
Correct |
1 ms |
204 KB |
Output is correct |
114 |
Correct |
1 ms |
204 KB |
Output is correct |
115 |
Correct |
1 ms |
204 KB |
Output is correct |
116 |
Correct |
1 ms |
204 KB |
Output is correct |
117 |
Correct |
0 ms |
204 KB |
Output is correct |
118 |
Correct |
1 ms |
204 KB |
Output is correct |
119 |
Correct |
2 ms |
460 KB |
Output is correct |
120 |
Correct |
2 ms |
608 KB |
Output is correct |
121 |
Correct |
287 ms |
24576 KB |
Output is correct |
122 |
Correct |
437 ms |
35480 KB |
Output is correct |
123 |
Correct |
518 ms |
35472 KB |
Output is correct |
124 |
Correct |
1 ms |
204 KB |
Output is correct |
125 |
Correct |
0 ms |
204 KB |
Output is correct |
126 |
Correct |
1 ms |
304 KB |
Output is correct |
127 |
Correct |
686 ms |
48880 KB |
Output is correct |
128 |
Correct |
694 ms |
48840 KB |
Output is correct |
129 |
Correct |
681 ms |
48664 KB |
Output is correct |
130 |
Correct |
3 ms |
588 KB |
Output is correct |
131 |
Correct |
7 ms |
1100 KB |
Output is correct |
132 |
Correct |
288 ms |
24016 KB |
Output is correct |
133 |
Correct |
532 ms |
36152 KB |
Output is correct |
134 |
Correct |
659 ms |
47896 KB |
Output is correct |
135 |
Correct |
701 ms |
49024 KB |
Output is correct |
136 |
Correct |
665 ms |
49176 KB |
Output is correct |
137 |
Correct |
719 ms |
49188 KB |
Output is correct |
138 |
Correct |
809 ms |
44792 KB |
Output is correct |
139 |
Correct |
685 ms |
42036 KB |
Output is correct |
140 |
Correct |
1 ms |
204 KB |
Output is correct |
141 |
Correct |
98 ms |
7652 KB |
Output is correct |
142 |
Correct |
17 ms |
2372 KB |
Output is correct |
143 |
Correct |
67 ms |
7788 KB |
Output is correct |
144 |
Correct |
124 ms |
12996 KB |
Output is correct |
145 |
Correct |
365 ms |
23580 KB |
Output is correct |
146 |
Correct |
506 ms |
29448 KB |
Output is correct |
147 |
Correct |
613 ms |
35096 KB |
Output is correct |
148 |
Correct |
723 ms |
40716 KB |
Output is correct |
149 |
Correct |
816 ms |
46144 KB |
Output is correct |
150 |
Correct |
667 ms |
46924 KB |
Output is correct |
151 |
Correct |
706 ms |
48852 KB |
Output is correct |
152 |
Correct |
4 ms |
716 KB |
Output is correct |
153 |
Correct |
8 ms |
1228 KB |
Output is correct |
154 |
Correct |
299 ms |
23884 KB |
Output is correct |
155 |
Correct |
460 ms |
35844 KB |
Output is correct |
156 |
Correct |
666 ms |
47708 KB |
Output is correct |
157 |
Correct |
1 ms |
204 KB |
Output is correct |
158 |
Correct |
1 ms |
204 KB |
Output is correct |
159 |
Correct |
1 ms |
204 KB |
Output is correct |
160 |
Correct |
1 ms |
204 KB |
Output is correct |
161 |
Correct |
586 ms |
39828 KB |
Output is correct |
162 |
Correct |
653 ms |
49176 KB |
Output is correct |
163 |
Correct |
620 ms |
45980 KB |
Output is correct |
164 |
Correct |
620 ms |
45956 KB |
Output is correct |
165 |
Correct |
541 ms |
41880 KB |
Output is correct |
166 |
Correct |
542 ms |
40336 KB |
Output is correct |
167 |
Correct |
129 ms |
10168 KB |
Output is correct |
168 |
Correct |
26 ms |
3468 KB |
Output is correct |
169 |
Correct |
80 ms |
8844 KB |
Output is correct |
170 |
Correct |
168 ms |
15880 KB |
Output is correct |
171 |
Correct |
237 ms |
21284 KB |
Output is correct |
172 |
Correct |
289 ms |
20660 KB |
Output is correct |
173 |
Correct |
340 ms |
24360 KB |
Output is correct |
174 |
Correct |
419 ms |
28244 KB |
Output is correct |
175 |
Correct |
497 ms |
32152 KB |
Output is correct |
176 |
Correct |
588 ms |
36196 KB |
Output is correct |
177 |
Correct |
622 ms |
40272 KB |
Output is correct |