#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
struct dsu {
vector<int> e;
int cc=0;
dsu(int n) {
e=vector<int>(n, -1);
cc=n;
}
int get(int x) {
if(e[x]<0)return x;
return e[x]=get(e[x]);
}
bool unite(int x, int y) {
x=get(x),y=get(y);
if(x==y)return false;
if(-e[x] < -e[y]){
swap(x, y);
}
cc--;
e[x]+=e[y];
e[y] = x;
return true;
}
};
int construct_roads(vector<int> x, vector<int> y) {
vector<pair<int,int>> bc;
int n = x.size();
dsu d(n);
map<pair<int,int>, int> mp;
for(int i = 0;i<n;i++) {
mp[{x[i], y[i]}] = i;
bc.push_back({x[i]-1, y[i]-1});
bc.push_back({x[i]-1, y[i]+1});
bc.push_back({x[i]+1, y[i]-1});
bc.push_back({x[i]+1, y[i]+1});
}
vector<int> a, b, c, D;
map<pair<int,int>, int> vis;
for(auto [u,v]:bc) {
if(vis[{u, v}])continue;
vis[{u,v}]=1;
if((u+v)%4 == 2) {
if(mp.find(pair{u-1, v+1})!=mp.end() and mp.find(pair{u+1, v+1}) != mp.end() and d.unite(mp[{u-1, v+1}], mp[{u+1, v+1}])) {
a.push_back(mp[{u-1, v+1}]);
b.push_back(mp[{u+1, v+1}]);
c.push_back(u);
D.push_back(v);
}
else if(mp.find(pair{u-1, v-1})!=mp.end() and mp.find(pair{u+1, v-1}) != mp.end() and d.unite(mp[{u-1, v-1}], mp[{u+1, v-1}])) {
a.push_back(mp[{u-1, v-1}]);
b.push_back(mp[{u+1, v-1}]);
c.push_back(u);
D.push_back(v);
}
}
else {
if(mp.find(pair{u+1, v+1})!=mp.end() and mp.find(pair{u+1, v-1}) != mp.end() and d.unite(mp[{u+1, v+1}], mp[{u+1, v-1}])) {
a.push_back(mp[{u+1, v+1}]);
b.push_back(mp[{u+1, v-1}]);
c.push_back(u);
D.push_back(v);
}
else if(mp.find(pair{u-1, v-1})!=mp.end() and mp.find(pair{u-1, v+1}) != mp.end() and d.unite(mp[{u-1, v-1}], mp[{u-1, v+1}])) {
a.push_back(mp[{u-1, v-1}]);
b.push_back(mp[{u-1, v+1}]);
c.push_back(u);
D.push_back(v);
}
}
}
if(d.cc!=1)return false;
build(a, b, c, D);
return true;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 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 |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
226 ms |
29140 KB |
Output is correct |
10 |
Correct |
15 ms |
3284 KB |
Output is correct |
11 |
Correct |
84 ms |
15688 KB |
Output is correct |
12 |
Correct |
19 ms |
4564 KB |
Output is correct |
13 |
Correct |
60 ms |
11652 KB |
Output is correct |
14 |
Correct |
1 ms |
604 KB |
Output is correct |
15 |
Correct |
3 ms |
856 KB |
Output is correct |
16 |
Correct |
244 ms |
28968 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 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 |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
226 ms |
29140 KB |
Output is correct |
10 |
Correct |
15 ms |
3284 KB |
Output is correct |
11 |
Correct |
84 ms |
15688 KB |
Output is correct |
12 |
Correct |
19 ms |
4564 KB |
Output is correct |
13 |
Correct |
60 ms |
11652 KB |
Output is correct |
14 |
Correct |
1 ms |
604 KB |
Output is correct |
15 |
Correct |
3 ms |
856 KB |
Output is correct |
16 |
Correct |
244 ms |
28968 KB |
Output is correct |
17 |
Correct |
0 ms |
344 KB |
Output is correct |
18 |
Correct |
0 ms |
416 KB |
Output is correct |
19 |
Correct |
0 ms |
436 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 |
515 ms |
53780 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
2 ms |
604 KB |
Output is correct |
26 |
Correct |
3 ms |
1116 KB |
Output is correct |
27 |
Correct |
5 ms |
1372 KB |
Output is correct |
28 |
Correct |
161 ms |
22380 KB |
Output is correct |
29 |
Correct |
272 ms |
31932 KB |
Output is correct |
30 |
Correct |
404 ms |
44324 KB |
Output is correct |
31 |
Correct |
508 ms |
53432 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 |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
360 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
432 KB |
Output is correct |
42 |
Correct |
0 ms |
436 KB |
Output is correct |
43 |
Correct |
3 ms |
860 KB |
Output is correct |
44 |
Correct |
4 ms |
1248 KB |
Output is correct |
45 |
Correct |
276 ms |
29788 KB |
Output is correct |
46 |
Correct |
401 ms |
44208 KB |
Output is correct |
47 |
Correct |
397 ms |
44144 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 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 |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
226 ms |
29140 KB |
Output is correct |
10 |
Correct |
15 ms |
3284 KB |
Output is correct |
11 |
Correct |
84 ms |
15688 KB |
Output is correct |
12 |
Correct |
19 ms |
4564 KB |
Output is correct |
13 |
Correct |
60 ms |
11652 KB |
Output is correct |
14 |
Correct |
1 ms |
604 KB |
Output is correct |
15 |
Correct |
3 ms |
856 KB |
Output is correct |
16 |
Correct |
244 ms |
28968 KB |
Output is correct |
17 |
Correct |
0 ms |
344 KB |
Output is correct |
18 |
Correct |
0 ms |
416 KB |
Output is correct |
19 |
Correct |
0 ms |
436 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 |
515 ms |
53780 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
2 ms |
604 KB |
Output is correct |
26 |
Correct |
3 ms |
1116 KB |
Output is correct |
27 |
Correct |
5 ms |
1372 KB |
Output is correct |
28 |
Correct |
161 ms |
22380 KB |
Output is correct |
29 |
Correct |
272 ms |
31932 KB |
Output is correct |
30 |
Correct |
404 ms |
44324 KB |
Output is correct |
31 |
Correct |
508 ms |
53432 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 |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
360 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
432 KB |
Output is correct |
42 |
Correct |
0 ms |
436 KB |
Output is correct |
43 |
Correct |
3 ms |
860 KB |
Output is correct |
44 |
Correct |
4 ms |
1248 KB |
Output is correct |
45 |
Correct |
276 ms |
29788 KB |
Output is correct |
46 |
Correct |
401 ms |
44208 KB |
Output is correct |
47 |
Correct |
397 ms |
44144 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
0 ms |
436 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 |
534 ms |
51444 KB |
Output is correct |
56 |
Correct |
1 ms |
344 KB |
Output is correct |
57 |
Correct |
2 ms |
860 KB |
Output is correct |
58 |
Correct |
9 ms |
1880 KB |
Output is correct |
59 |
Correct |
19 ms |
2516 KB |
Output is correct |
60 |
Correct |
222 ms |
25720 KB |
Output is correct |
61 |
Correct |
306 ms |
37300 KB |
Output is correct |
62 |
Correct |
384 ms |
42624 KB |
Output is correct |
63 |
Correct |
530 ms |
51768 KB |
Output is correct |
64 |
Correct |
0 ms |
344 KB |
Output is correct |
65 |
Correct |
0 ms |
348 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
560 ms |
59684 KB |
Output is correct |
68 |
Correct |
550 ms |
61108 KB |
Output is correct |
69 |
Correct |
543 ms |
60848 KB |
Output is correct |
70 |
Correct |
6 ms |
1368 KB |
Output is correct |
71 |
Correct |
13 ms |
2264 KB |
Output is correct |
72 |
Correct |
245 ms |
29928 KB |
Output is correct |
73 |
Correct |
441 ms |
44724 KB |
Output is correct |
74 |
Correct |
710 ms |
58804 KB |
Output is correct |
75 |
Correct |
641 ms |
55216 KB |
Output is correct |
76 |
Correct |
684 ms |
60776 KB |
Output is correct |
77 |
Correct |
8 ms |
1496 KB |
Output is correct |
78 |
Correct |
19 ms |
2616 KB |
Output is correct |
79 |
Correct |
307 ms |
28448 KB |
Output is correct |
80 |
Correct |
476 ms |
44320 KB |
Output is correct |
81 |
Correct |
604 ms |
56496 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 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 |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
226 ms |
29140 KB |
Output is correct |
10 |
Correct |
15 ms |
3284 KB |
Output is correct |
11 |
Correct |
84 ms |
15688 KB |
Output is correct |
12 |
Correct |
19 ms |
4564 KB |
Output is correct |
13 |
Correct |
60 ms |
11652 KB |
Output is correct |
14 |
Correct |
1 ms |
604 KB |
Output is correct |
15 |
Correct |
3 ms |
856 KB |
Output is correct |
16 |
Correct |
244 ms |
28968 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 |
58104 KB |
Output is correct |
21 |
Correct |
577 ms |
58976 KB |
Output is correct |
22 |
Correct |
591 ms |
58940 KB |
Output is correct |
23 |
Correct |
448 ms |
49584 KB |
Output is correct |
24 |
Correct |
714 ms |
73908 KB |
Output is correct |
25 |
Correct |
632 ms |
51668 KB |
Output is correct |
26 |
Correct |
591 ms |
52404 KB |
Output is correct |
27 |
Correct |
645 ms |
58948 KB |
Output is correct |
28 |
Correct |
654 ms |
59568 KB |
Output is correct |
29 |
Correct |
661 ms |
57780 KB |
Output is correct |
30 |
Correct |
657 ms |
58036 KB |
Output is correct |
31 |
Correct |
0 ms |
344 KB |
Output is correct |
32 |
Correct |
28 ms |
4292 KB |
Output is correct |
33 |
Correct |
231 ms |
30384 KB |
Output is correct |
34 |
Correct |
640 ms |
58940 KB |
Output is correct |
35 |
Correct |
18 ms |
2772 KB |
Output is correct |
36 |
Correct |
120 ms |
12156 KB |
Output is correct |
37 |
Correct |
286 ms |
24572 KB |
Output is correct |
38 |
Correct |
223 ms |
22200 KB |
Output is correct |
39 |
Correct |
317 ms |
29628 KB |
Output is correct |
40 |
Correct |
418 ms |
39896 KB |
Output is correct |
41 |
Correct |
584 ms |
46256 KB |
Output is correct |
42 |
Correct |
705 ms |
53936 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 |
344 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 |
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 |
860 KB |
Output is correct |
55 |
Correct |
4 ms |
1116 KB |
Output is correct |
56 |
Correct |
252 ms |
29140 KB |
Output is correct |
57 |
Correct |
385 ms |
43700 KB |
Output is correct |
58 |
Correct |
439 ms |
43688 KB |
Output is correct |
59 |
Correct |
0 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 |
565 ms |
59192 KB |
Output is correct |
63 |
Correct |
556 ms |
59860 KB |
Output is correct |
64 |
Correct |
543 ms |
58548 KB |
Output is correct |
65 |
Correct |
5 ms |
1368 KB |
Output is correct |
66 |
Correct |
13 ms |
2352 KB |
Output is correct |
67 |
Correct |
253 ms |
28440 KB |
Output is correct |
68 |
Correct |
422 ms |
43752 KB |
Output is correct |
69 |
Correct |
618 ms |
57140 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 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 |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
226 ms |
29140 KB |
Output is correct |
10 |
Correct |
15 ms |
3284 KB |
Output is correct |
11 |
Correct |
84 ms |
15688 KB |
Output is correct |
12 |
Correct |
19 ms |
4564 KB |
Output is correct |
13 |
Correct |
60 ms |
11652 KB |
Output is correct |
14 |
Correct |
1 ms |
604 KB |
Output is correct |
15 |
Correct |
3 ms |
856 KB |
Output is correct |
16 |
Correct |
244 ms |
28968 KB |
Output is correct |
17 |
Correct |
554 ms |
58544 KB |
Output is correct |
18 |
Correct |
560 ms |
58548 KB |
Output is correct |
19 |
Correct |
603 ms |
57672 KB |
Output is correct |
20 |
Correct |
565 ms |
49088 KB |
Output is correct |
21 |
Correct |
521 ms |
50352 KB |
Output is correct |
22 |
Correct |
0 ms |
344 KB |
Output is correct |
23 |
Correct |
84 ms |
8644 KB |
Output is correct |
24 |
Correct |
36 ms |
4792 KB |
Output is correct |
25 |
Correct |
151 ms |
16708 KB |
Output is correct |
26 |
Correct |
281 ms |
27320 KB |
Output is correct |
27 |
Correct |
251 ms |
26552 KB |
Output is correct |
28 |
Correct |
334 ms |
31928 KB |
Output is correct |
29 |
Correct |
434 ms |
40884 KB |
Output is correct |
30 |
Correct |
502 ms |
45488 KB |
Output is correct |
31 |
Correct |
612 ms |
51816 KB |
Output is correct |
32 |
Correct |
566 ms |
53684 KB |
Output is correct |
33 |
Correct |
537 ms |
58596 KB |
Output is correct |
34 |
Correct |
7 ms |
1492 KB |
Output is correct |
35 |
Correct |
14 ms |
2516 KB |
Output is correct |
36 |
Correct |
237 ms |
27672 KB |
Output is correct |
37 |
Correct |
398 ms |
42416 KB |
Output is correct |
38 |
Correct |
614 ms |
56580 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 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 |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
226 ms |
29140 KB |
Output is correct |
10 |
Correct |
15 ms |
3284 KB |
Output is correct |
11 |
Correct |
84 ms |
15688 KB |
Output is correct |
12 |
Correct |
19 ms |
4564 KB |
Output is correct |
13 |
Correct |
60 ms |
11652 KB |
Output is correct |
14 |
Correct |
1 ms |
604 KB |
Output is correct |
15 |
Correct |
3 ms |
856 KB |
Output is correct |
16 |
Correct |
244 ms |
28968 KB |
Output is correct |
17 |
Correct |
0 ms |
344 KB |
Output is correct |
18 |
Correct |
0 ms |
416 KB |
Output is correct |
19 |
Correct |
0 ms |
436 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 |
515 ms |
53780 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
2 ms |
604 KB |
Output is correct |
26 |
Correct |
3 ms |
1116 KB |
Output is correct |
27 |
Correct |
5 ms |
1372 KB |
Output is correct |
28 |
Correct |
161 ms |
22380 KB |
Output is correct |
29 |
Correct |
272 ms |
31932 KB |
Output is correct |
30 |
Correct |
404 ms |
44324 KB |
Output is correct |
31 |
Correct |
508 ms |
53432 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 |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
360 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
432 KB |
Output is correct |
42 |
Correct |
0 ms |
436 KB |
Output is correct |
43 |
Correct |
3 ms |
860 KB |
Output is correct |
44 |
Correct |
4 ms |
1248 KB |
Output is correct |
45 |
Correct |
276 ms |
29788 KB |
Output is correct |
46 |
Correct |
401 ms |
44208 KB |
Output is correct |
47 |
Correct |
397 ms |
44144 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
0 ms |
436 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 |
534 ms |
51444 KB |
Output is correct |
56 |
Correct |
1 ms |
344 KB |
Output is correct |
57 |
Correct |
2 ms |
860 KB |
Output is correct |
58 |
Correct |
9 ms |
1880 KB |
Output is correct |
59 |
Correct |
19 ms |
2516 KB |
Output is correct |
60 |
Correct |
222 ms |
25720 KB |
Output is correct |
61 |
Correct |
306 ms |
37300 KB |
Output is correct |
62 |
Correct |
384 ms |
42624 KB |
Output is correct |
63 |
Correct |
530 ms |
51768 KB |
Output is correct |
64 |
Correct |
0 ms |
344 KB |
Output is correct |
65 |
Correct |
0 ms |
348 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
560 ms |
59684 KB |
Output is correct |
68 |
Correct |
550 ms |
61108 KB |
Output is correct |
69 |
Correct |
543 ms |
60848 KB |
Output is correct |
70 |
Correct |
6 ms |
1368 KB |
Output is correct |
71 |
Correct |
13 ms |
2264 KB |
Output is correct |
72 |
Correct |
245 ms |
29928 KB |
Output is correct |
73 |
Correct |
441 ms |
44724 KB |
Output is correct |
74 |
Correct |
710 ms |
58804 KB |
Output is correct |
75 |
Correct |
641 ms |
55216 KB |
Output is correct |
76 |
Correct |
684 ms |
60776 KB |
Output is correct |
77 |
Correct |
8 ms |
1496 KB |
Output is correct |
78 |
Correct |
19 ms |
2616 KB |
Output is correct |
79 |
Correct |
307 ms |
28448 KB |
Output is correct |
80 |
Correct |
476 ms |
44320 KB |
Output is correct |
81 |
Correct |
604 ms |
56496 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 |
58104 KB |
Output is correct |
86 |
Correct |
577 ms |
58976 KB |
Output is correct |
87 |
Correct |
591 ms |
58940 KB |
Output is correct |
88 |
Correct |
448 ms |
49584 KB |
Output is correct |
89 |
Correct |
714 ms |
73908 KB |
Output is correct |
90 |
Correct |
632 ms |
51668 KB |
Output is correct |
91 |
Correct |
591 ms |
52404 KB |
Output is correct |
92 |
Correct |
645 ms |
58948 KB |
Output is correct |
93 |
Correct |
654 ms |
59568 KB |
Output is correct |
94 |
Correct |
661 ms |
57780 KB |
Output is correct |
95 |
Correct |
657 ms |
58036 KB |
Output is correct |
96 |
Correct |
0 ms |
344 KB |
Output is correct |
97 |
Correct |
28 ms |
4292 KB |
Output is correct |
98 |
Correct |
231 ms |
30384 KB |
Output is correct |
99 |
Correct |
640 ms |
58940 KB |
Output is correct |
100 |
Correct |
18 ms |
2772 KB |
Output is correct |
101 |
Correct |
120 ms |
12156 KB |
Output is correct |
102 |
Correct |
286 ms |
24572 KB |
Output is correct |
103 |
Correct |
223 ms |
22200 KB |
Output is correct |
104 |
Correct |
317 ms |
29628 KB |
Output is correct |
105 |
Correct |
418 ms |
39896 KB |
Output is correct |
106 |
Correct |
584 ms |
46256 KB |
Output is correct |
107 |
Correct |
705 ms |
53936 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 |
344 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 |
348 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 |
860 KB |
Output is correct |
120 |
Correct |
4 ms |
1116 KB |
Output is correct |
121 |
Correct |
252 ms |
29140 KB |
Output is correct |
122 |
Correct |
385 ms |
43700 KB |
Output is correct |
123 |
Correct |
439 ms |
43688 KB |
Output is correct |
124 |
Correct |
0 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 |
565 ms |
59192 KB |
Output is correct |
128 |
Correct |
556 ms |
59860 KB |
Output is correct |
129 |
Correct |
543 ms |
58548 KB |
Output is correct |
130 |
Correct |
5 ms |
1368 KB |
Output is correct |
131 |
Correct |
13 ms |
2352 KB |
Output is correct |
132 |
Correct |
253 ms |
28440 KB |
Output is correct |
133 |
Correct |
422 ms |
43752 KB |
Output is correct |
134 |
Correct |
618 ms |
57140 KB |
Output is correct |
135 |
Correct |
554 ms |
58544 KB |
Output is correct |
136 |
Correct |
560 ms |
58548 KB |
Output is correct |
137 |
Correct |
603 ms |
57672 KB |
Output is correct |
138 |
Correct |
565 ms |
49088 KB |
Output is correct |
139 |
Correct |
521 ms |
50352 KB |
Output is correct |
140 |
Correct |
0 ms |
344 KB |
Output is correct |
141 |
Correct |
84 ms |
8644 KB |
Output is correct |
142 |
Correct |
36 ms |
4792 KB |
Output is correct |
143 |
Correct |
151 ms |
16708 KB |
Output is correct |
144 |
Correct |
281 ms |
27320 KB |
Output is correct |
145 |
Correct |
251 ms |
26552 KB |
Output is correct |
146 |
Correct |
334 ms |
31928 KB |
Output is correct |
147 |
Correct |
434 ms |
40884 KB |
Output is correct |
148 |
Correct |
502 ms |
45488 KB |
Output is correct |
149 |
Correct |
612 ms |
51816 KB |
Output is correct |
150 |
Correct |
566 ms |
53684 KB |
Output is correct |
151 |
Correct |
537 ms |
58596 KB |
Output is correct |
152 |
Correct |
7 ms |
1492 KB |
Output is correct |
153 |
Correct |
14 ms |
2516 KB |
Output is correct |
154 |
Correct |
237 ms |
27672 KB |
Output is correct |
155 |
Correct |
398 ms |
42416 KB |
Output is correct |
156 |
Correct |
614 ms |
56580 KB |
Output is correct |
157 |
Correct |
0 ms |
344 KB |
Output is correct |
158 |
Correct |
0 ms |
432 KB |
Output is correct |
159 |
Correct |
0 ms |
348 KB |
Output is correct |
160 |
Correct |
0 ms |
348 KB |
Output is correct |
161 |
Correct |
501 ms |
48192 KB |
Output is correct |
162 |
Correct |
542 ms |
61104 KB |
Output is correct |
163 |
Correct |
547 ms |
57008 KB |
Output is correct |
164 |
Correct |
515 ms |
56612 KB |
Output is correct |
165 |
Correct |
470 ms |
51468 KB |
Output is correct |
166 |
Correct |
481 ms |
48820 KB |
Output is correct |
167 |
Correct |
87 ms |
12044 KB |
Output is correct |
168 |
Correct |
48 ms |
6676 KB |
Output is correct |
169 |
Correct |
145 ms |
17116 KB |
Output is correct |
170 |
Correct |
312 ms |
31920 KB |
Output is correct |
171 |
Correct |
452 ms |
43568 KB |
Output is correct |
172 |
Correct |
224 ms |
24460 KB |
Output is correct |
173 |
Correct |
253 ms |
28708 KB |
Output is correct |
174 |
Correct |
306 ms |
35336 KB |
Output is correct |
175 |
Correct |
361 ms |
39348 KB |
Output is correct |
176 |
Correct |
437 ms |
44472 KB |
Output is correct |
177 |
Correct |
533 ms |
48816 KB |
Output is correct |