/**
* @date 2023-07-04 19:59:53
* RAmen!
*/
#include "parks.h"
#include<bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
#define ll long long
using namespace std;
vector<int> U, V, A, B;
map<int, int> c[200005], used[200005];
pii p[200005];
int n, fa[200005];
// B for horizontal edges; W for vertical edges
int fnd(int x) {
return x == fa[x] ? x : fa[x] = fnd(fa[x]);
}
void add_edge(int u, int v, int a, int b) {
U.pb(u - 1); V.pb(v - 1); A.pb(a); B.pb(b); used[a][b] = 1;
}
int construct_roads(vector<int> x, vector<int> y) {
n = (int)x.size();
for(int i = 0; i < n; i++) {
c[x[i]][y[i]] = i + 1; fa[i + 1] = i + 1;
p[i + 1] = mp(x[i], y[i]);
}
sort(p + 1, p + n + 1, [&](pii a, pii b){return mp(a.se, a.fi) < mp(b.se, b.fi);});
for(int l = 1, r; l <= n; l = r + 1) {
r = l; while(r <= n && p[r].se == p[l].se) r++; r--;
for(int i = l; i <= r; i++) {
int a = p[i].fi, b = p[i].se;
if(!c[a].count(b - 2)) continue;
if(fnd(c[a][b]) == fnd(c[a][b - 2])) continue;
if((a + 1) % 4 == (b - 1) % 4) { // W
add_edge(c[a][b - 2], c[a][b], a + 1, b - 1);
fa[fnd(c[a][b])] = c[a][b - 2];
}
else if(!used[a - 1][b - 1]){ // B
add_edge(c[a][b - 2], c[a][b], a - 1, b - 1);
fa[fnd(c[a][b])] = c[a][b - 2];
}
}
for(int i = l; i <= r; i++) {
int a = p[i].fi, b = p[i].se;
if(!c[a - 2].count(b)) continue;
if(fnd(c[a][b]) == fnd(c[a - 2][b])) continue;
fa[fnd(c[a][b])] = c[a - 2][b];
if((a - 1) % 4 != (b + 1) % 4) { // B
add_edge(c[a - 2][b], c[a][b], a - 1, b + 1);
}
else if(!used[a - 1][b - 1]){ // W
add_edge(c[a - 2][b], c[a][b], a - 1, b - 1);
}
}
}
int cnt = 0;
for(int i = 1; i <= n; i++) cnt += (fa[i] == i);
if(cnt > 1) return 0;
build(U, V, A, B);
return 1;
}
/*
.-.
|
.-.
|
.-.
*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
19100 KB |
Output is correct |
2 |
Correct |
8 ms |
19044 KB |
Output is correct |
3 |
Correct |
8 ms |
19028 KB |
Output is correct |
4 |
Correct |
8 ms |
19028 KB |
Output is correct |
5 |
Correct |
8 ms |
19028 KB |
Output is correct |
6 |
Correct |
8 ms |
19076 KB |
Output is correct |
7 |
Correct |
8 ms |
19028 KB |
Output is correct |
8 |
Correct |
8 ms |
19032 KB |
Output is correct |
9 |
Correct |
139 ms |
35840 KB |
Output is correct |
10 |
Correct |
18 ms |
20948 KB |
Output is correct |
11 |
Correct |
71 ms |
28108 KB |
Output is correct |
12 |
Correct |
24 ms |
21836 KB |
Output is correct |
13 |
Correct |
58 ms |
25160 KB |
Output is correct |
14 |
Correct |
9 ms |
19156 KB |
Output is correct |
15 |
Correct |
16 ms |
19364 KB |
Output is correct |
16 |
Correct |
136 ms |
35852 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
19100 KB |
Output is correct |
2 |
Correct |
8 ms |
19044 KB |
Output is correct |
3 |
Correct |
8 ms |
19028 KB |
Output is correct |
4 |
Correct |
8 ms |
19028 KB |
Output is correct |
5 |
Correct |
8 ms |
19028 KB |
Output is correct |
6 |
Correct |
8 ms |
19076 KB |
Output is correct |
7 |
Correct |
8 ms |
19028 KB |
Output is correct |
8 |
Correct |
8 ms |
19032 KB |
Output is correct |
9 |
Correct |
139 ms |
35840 KB |
Output is correct |
10 |
Correct |
18 ms |
20948 KB |
Output is correct |
11 |
Correct |
71 ms |
28108 KB |
Output is correct |
12 |
Correct |
24 ms |
21836 KB |
Output is correct |
13 |
Correct |
58 ms |
25160 KB |
Output is correct |
14 |
Correct |
9 ms |
19156 KB |
Output is correct |
15 |
Correct |
16 ms |
19364 KB |
Output is correct |
16 |
Correct |
136 ms |
35852 KB |
Output is correct |
17 |
Correct |
8 ms |
19028 KB |
Output is correct |
18 |
Correct |
10 ms |
19028 KB |
Output is correct |
19 |
Correct |
9 ms |
19088 KB |
Output is correct |
20 |
Correct |
8 ms |
19100 KB |
Output is correct |
21 |
Correct |
11 ms |
19088 KB |
Output is correct |
22 |
Correct |
9 ms |
19036 KB |
Output is correct |
23 |
Correct |
337 ms |
54408 KB |
Output is correct |
24 |
Correct |
11 ms |
19092 KB |
Output is correct |
25 |
Correct |
12 ms |
19284 KB |
Output is correct |
26 |
Correct |
11 ms |
19540 KB |
Output is correct |
27 |
Correct |
12 ms |
19620 KB |
Output is correct |
28 |
Correct |
123 ms |
33128 KB |
Output is correct |
29 |
Correct |
190 ms |
40368 KB |
Output is correct |
30 |
Correct |
262 ms |
47440 KB |
Output is correct |
31 |
Correct |
325 ms |
54428 KB |
Output is correct |
32 |
Correct |
9 ms |
19028 KB |
Output is correct |
33 |
Correct |
8 ms |
19096 KB |
Output is correct |
34 |
Correct |
8 ms |
18984 KB |
Output is correct |
35 |
Correct |
9 ms |
19092 KB |
Output is correct |
36 |
Correct |
8 ms |
19092 KB |
Output is correct |
37 |
Correct |
9 ms |
19040 KB |
Output is correct |
38 |
Correct |
9 ms |
19028 KB |
Output is correct |
39 |
Correct |
9 ms |
19028 KB |
Output is correct |
40 |
Correct |
11 ms |
19028 KB |
Output is correct |
41 |
Correct |
8 ms |
19028 KB |
Output is correct |
42 |
Correct |
8 ms |
19028 KB |
Output is correct |
43 |
Correct |
10 ms |
19284 KB |
Output is correct |
44 |
Correct |
11 ms |
19472 KB |
Output is correct |
45 |
Correct |
145 ms |
36700 KB |
Output is correct |
46 |
Correct |
233 ms |
44704 KB |
Output is correct |
47 |
Correct |
212 ms |
44684 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
19100 KB |
Output is correct |
2 |
Correct |
8 ms |
19044 KB |
Output is correct |
3 |
Correct |
8 ms |
19028 KB |
Output is correct |
4 |
Correct |
8 ms |
19028 KB |
Output is correct |
5 |
Correct |
8 ms |
19028 KB |
Output is correct |
6 |
Correct |
8 ms |
19076 KB |
Output is correct |
7 |
Correct |
8 ms |
19028 KB |
Output is correct |
8 |
Correct |
8 ms |
19032 KB |
Output is correct |
9 |
Correct |
139 ms |
35840 KB |
Output is correct |
10 |
Correct |
18 ms |
20948 KB |
Output is correct |
11 |
Correct |
71 ms |
28108 KB |
Output is correct |
12 |
Correct |
24 ms |
21836 KB |
Output is correct |
13 |
Correct |
58 ms |
25160 KB |
Output is correct |
14 |
Correct |
9 ms |
19156 KB |
Output is correct |
15 |
Correct |
16 ms |
19364 KB |
Output is correct |
16 |
Correct |
136 ms |
35852 KB |
Output is correct |
17 |
Correct |
8 ms |
19028 KB |
Output is correct |
18 |
Correct |
10 ms |
19028 KB |
Output is correct |
19 |
Correct |
9 ms |
19088 KB |
Output is correct |
20 |
Correct |
8 ms |
19100 KB |
Output is correct |
21 |
Correct |
11 ms |
19088 KB |
Output is correct |
22 |
Correct |
9 ms |
19036 KB |
Output is correct |
23 |
Correct |
337 ms |
54408 KB |
Output is correct |
24 |
Correct |
11 ms |
19092 KB |
Output is correct |
25 |
Correct |
12 ms |
19284 KB |
Output is correct |
26 |
Correct |
11 ms |
19540 KB |
Output is correct |
27 |
Correct |
12 ms |
19620 KB |
Output is correct |
28 |
Correct |
123 ms |
33128 KB |
Output is correct |
29 |
Correct |
190 ms |
40368 KB |
Output is correct |
30 |
Correct |
262 ms |
47440 KB |
Output is correct |
31 |
Correct |
325 ms |
54428 KB |
Output is correct |
32 |
Correct |
9 ms |
19028 KB |
Output is correct |
33 |
Correct |
8 ms |
19096 KB |
Output is correct |
34 |
Correct |
8 ms |
18984 KB |
Output is correct |
35 |
Correct |
9 ms |
19092 KB |
Output is correct |
36 |
Correct |
8 ms |
19092 KB |
Output is correct |
37 |
Correct |
9 ms |
19040 KB |
Output is correct |
38 |
Correct |
9 ms |
19028 KB |
Output is correct |
39 |
Correct |
9 ms |
19028 KB |
Output is correct |
40 |
Correct |
11 ms |
19028 KB |
Output is correct |
41 |
Correct |
8 ms |
19028 KB |
Output is correct |
42 |
Correct |
8 ms |
19028 KB |
Output is correct |
43 |
Correct |
10 ms |
19284 KB |
Output is correct |
44 |
Correct |
11 ms |
19472 KB |
Output is correct |
45 |
Correct |
145 ms |
36700 KB |
Output is correct |
46 |
Correct |
233 ms |
44704 KB |
Output is correct |
47 |
Correct |
212 ms |
44684 KB |
Output is correct |
48 |
Correct |
9 ms |
18992 KB |
Output is correct |
49 |
Correct |
9 ms |
19092 KB |
Output is correct |
50 |
Correct |
9 ms |
19028 KB |
Output is correct |
51 |
Correct |
8 ms |
19100 KB |
Output is correct |
52 |
Correct |
8 ms |
19096 KB |
Output is correct |
53 |
Correct |
9 ms |
19096 KB |
Output is correct |
54 |
Correct |
9 ms |
19092 KB |
Output is correct |
55 |
Correct |
333 ms |
54304 KB |
Output is correct |
56 |
Correct |
8 ms |
19028 KB |
Output is correct |
57 |
Correct |
11 ms |
19436 KB |
Output is correct |
58 |
Correct |
19 ms |
20308 KB |
Output is correct |
59 |
Correct |
21 ms |
20588 KB |
Output is correct |
60 |
Correct |
165 ms |
36612 KB |
Output is correct |
61 |
Correct |
216 ms |
42776 KB |
Output is correct |
62 |
Correct |
276 ms |
48304 KB |
Output is correct |
63 |
Correct |
347 ms |
54472 KB |
Output is correct |
64 |
Correct |
8 ms |
19016 KB |
Output is correct |
65 |
Correct |
8 ms |
19028 KB |
Output is correct |
66 |
Correct |
8 ms |
19092 KB |
Output is correct |
67 |
Correct |
309 ms |
54376 KB |
Output is correct |
68 |
Correct |
316 ms |
54340 KB |
Output is correct |
69 |
Correct |
310 ms |
54264 KB |
Output is correct |
70 |
Correct |
13 ms |
19624 KB |
Output is correct |
71 |
Correct |
16 ms |
20180 KB |
Output is correct |
72 |
Correct |
152 ms |
36724 KB |
Output is correct |
73 |
Correct |
228 ms |
45528 KB |
Output is correct |
74 |
Correct |
317 ms |
54376 KB |
Output is correct |
75 |
Correct |
331 ms |
54292 KB |
Output is correct |
76 |
Correct |
309 ms |
54344 KB |
Output is correct |
77 |
Correct |
13 ms |
19816 KB |
Output is correct |
78 |
Correct |
18 ms |
20352 KB |
Output is correct |
79 |
Correct |
153 ms |
36644 KB |
Output is correct |
80 |
Correct |
240 ms |
45640 KB |
Output is correct |
81 |
Correct |
310 ms |
54356 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
19100 KB |
Output is correct |
2 |
Correct |
8 ms |
19044 KB |
Output is correct |
3 |
Correct |
8 ms |
19028 KB |
Output is correct |
4 |
Correct |
8 ms |
19028 KB |
Output is correct |
5 |
Correct |
8 ms |
19028 KB |
Output is correct |
6 |
Correct |
8 ms |
19076 KB |
Output is correct |
7 |
Correct |
8 ms |
19028 KB |
Output is correct |
8 |
Correct |
8 ms |
19032 KB |
Output is correct |
9 |
Correct |
139 ms |
35840 KB |
Output is correct |
10 |
Correct |
18 ms |
20948 KB |
Output is correct |
11 |
Correct |
71 ms |
28108 KB |
Output is correct |
12 |
Correct |
24 ms |
21836 KB |
Output is correct |
13 |
Correct |
58 ms |
25160 KB |
Output is correct |
14 |
Correct |
9 ms |
19156 KB |
Output is correct |
15 |
Correct |
16 ms |
19364 KB |
Output is correct |
16 |
Correct |
136 ms |
35852 KB |
Output is correct |
17 |
Correct |
8 ms |
19028 KB |
Output is correct |
18 |
Correct |
8 ms |
19028 KB |
Output is correct |
19 |
Correct |
8 ms |
19028 KB |
Output is correct |
20 |
Correct |
180 ms |
55704 KB |
Output is correct |
21 |
Correct |
196 ms |
55328 KB |
Output is correct |
22 |
Correct |
187 ms |
55240 KB |
Output is correct |
23 |
Correct |
213 ms |
49412 KB |
Output is correct |
24 |
Correct |
124 ms |
35612 KB |
Output is correct |
25 |
Correct |
299 ms |
48032 KB |
Output is correct |
26 |
Correct |
218 ms |
47976 KB |
Output is correct |
27 |
Correct |
267 ms |
54396 KB |
Output is correct |
28 |
Correct |
262 ms |
54352 KB |
Output is correct |
29 |
Correct |
294 ms |
54436 KB |
Output is correct |
30 |
Correct |
292 ms |
54304 KB |
Output is correct |
31 |
Correct |
9 ms |
19092 KB |
Output is correct |
32 |
Correct |
24 ms |
21968 KB |
Output is correct |
33 |
Correct |
54 ms |
27676 KB |
Output is correct |
34 |
Correct |
176 ms |
55744 KB |
Output is correct |
35 |
Correct |
16 ms |
20564 KB |
Output is correct |
36 |
Correct |
53 ms |
26496 KB |
Output is correct |
37 |
Correct |
102 ms |
34052 KB |
Output is correct |
38 |
Correct |
122 ms |
33860 KB |
Output is correct |
39 |
Correct |
180 ms |
39228 KB |
Output is correct |
40 |
Correct |
223 ms |
44684 KB |
Output is correct |
41 |
Correct |
332 ms |
50292 KB |
Output is correct |
42 |
Correct |
348 ms |
55744 KB |
Output is correct |
43 |
Correct |
9 ms |
19028 KB |
Output is correct |
44 |
Correct |
9 ms |
19008 KB |
Output is correct |
45 |
Correct |
8 ms |
19092 KB |
Output is correct |
46 |
Correct |
8 ms |
19092 KB |
Output is correct |
47 |
Correct |
8 ms |
19040 KB |
Output is correct |
48 |
Correct |
8 ms |
19096 KB |
Output is correct |
49 |
Correct |
10 ms |
19076 KB |
Output is correct |
50 |
Correct |
8 ms |
19028 KB |
Output is correct |
51 |
Correct |
8 ms |
19028 KB |
Output is correct |
52 |
Correct |
8 ms |
19040 KB |
Output is correct |
53 |
Correct |
8 ms |
19028 KB |
Output is correct |
54 |
Correct |
9 ms |
19284 KB |
Output is correct |
55 |
Correct |
11 ms |
19456 KB |
Output is correct |
56 |
Correct |
150 ms |
36736 KB |
Output is correct |
57 |
Correct |
219 ms |
44740 KB |
Output is correct |
58 |
Correct |
209 ms |
44708 KB |
Output is correct |
59 |
Correct |
10 ms |
19092 KB |
Output is correct |
60 |
Correct |
10 ms |
19028 KB |
Output is correct |
61 |
Correct |
9 ms |
19028 KB |
Output is correct |
62 |
Correct |
305 ms |
54344 KB |
Output is correct |
63 |
Correct |
321 ms |
54372 KB |
Output is correct |
64 |
Correct |
303 ms |
54176 KB |
Output is correct |
65 |
Correct |
11 ms |
19668 KB |
Output is correct |
66 |
Correct |
16 ms |
20164 KB |
Output is correct |
67 |
Correct |
146 ms |
36628 KB |
Output is correct |
68 |
Correct |
230 ms |
45600 KB |
Output is correct |
69 |
Correct |
313 ms |
54376 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
19100 KB |
Output is correct |
2 |
Correct |
8 ms |
19044 KB |
Output is correct |
3 |
Correct |
8 ms |
19028 KB |
Output is correct |
4 |
Correct |
8 ms |
19028 KB |
Output is correct |
5 |
Correct |
8 ms |
19028 KB |
Output is correct |
6 |
Correct |
8 ms |
19076 KB |
Output is correct |
7 |
Correct |
8 ms |
19028 KB |
Output is correct |
8 |
Correct |
8 ms |
19032 KB |
Output is correct |
9 |
Correct |
139 ms |
35840 KB |
Output is correct |
10 |
Correct |
18 ms |
20948 KB |
Output is correct |
11 |
Correct |
71 ms |
28108 KB |
Output is correct |
12 |
Correct |
24 ms |
21836 KB |
Output is correct |
13 |
Correct |
58 ms |
25160 KB |
Output is correct |
14 |
Correct |
9 ms |
19156 KB |
Output is correct |
15 |
Correct |
16 ms |
19364 KB |
Output is correct |
16 |
Correct |
136 ms |
35852 KB |
Output is correct |
17 |
Correct |
248 ms |
52768 KB |
Output is correct |
18 |
Correct |
247 ms |
52908 KB |
Output is correct |
19 |
Correct |
190 ms |
53032 KB |
Output is correct |
20 |
Correct |
300 ms |
53720 KB |
Output is correct |
21 |
Correct |
258 ms |
49972 KB |
Output is correct |
22 |
Correct |
8 ms |
19028 KB |
Output is correct |
23 |
Correct |
44 ms |
25416 KB |
Output is correct |
24 |
Correct |
32 ms |
22136 KB |
Output is correct |
25 |
Correct |
73 ms |
29520 KB |
Output is correct |
26 |
Correct |
128 ms |
37120 KB |
Output is correct |
27 |
Correct |
161 ms |
37456 KB |
Output is correct |
28 |
Correct |
203 ms |
42236 KB |
Output is correct |
29 |
Correct |
248 ms |
46864 KB |
Output is correct |
30 |
Correct |
296 ms |
50780 KB |
Output is correct |
31 |
Correct |
345 ms |
55760 KB |
Output is correct |
32 |
Correct |
325 ms |
54304 KB |
Output is correct |
33 |
Correct |
357 ms |
54376 KB |
Output is correct |
34 |
Correct |
15 ms |
19796 KB |
Output is correct |
35 |
Correct |
16 ms |
20388 KB |
Output is correct |
36 |
Correct |
151 ms |
36608 KB |
Output is correct |
37 |
Correct |
230 ms |
45640 KB |
Output is correct |
38 |
Correct |
342 ms |
54456 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
19100 KB |
Output is correct |
2 |
Correct |
8 ms |
19044 KB |
Output is correct |
3 |
Correct |
8 ms |
19028 KB |
Output is correct |
4 |
Correct |
8 ms |
19028 KB |
Output is correct |
5 |
Correct |
8 ms |
19028 KB |
Output is correct |
6 |
Correct |
8 ms |
19076 KB |
Output is correct |
7 |
Correct |
8 ms |
19028 KB |
Output is correct |
8 |
Correct |
8 ms |
19032 KB |
Output is correct |
9 |
Correct |
139 ms |
35840 KB |
Output is correct |
10 |
Correct |
18 ms |
20948 KB |
Output is correct |
11 |
Correct |
71 ms |
28108 KB |
Output is correct |
12 |
Correct |
24 ms |
21836 KB |
Output is correct |
13 |
Correct |
58 ms |
25160 KB |
Output is correct |
14 |
Correct |
9 ms |
19156 KB |
Output is correct |
15 |
Correct |
16 ms |
19364 KB |
Output is correct |
16 |
Correct |
136 ms |
35852 KB |
Output is correct |
17 |
Correct |
8 ms |
19028 KB |
Output is correct |
18 |
Correct |
10 ms |
19028 KB |
Output is correct |
19 |
Correct |
9 ms |
19088 KB |
Output is correct |
20 |
Correct |
8 ms |
19100 KB |
Output is correct |
21 |
Correct |
11 ms |
19088 KB |
Output is correct |
22 |
Correct |
9 ms |
19036 KB |
Output is correct |
23 |
Correct |
337 ms |
54408 KB |
Output is correct |
24 |
Correct |
11 ms |
19092 KB |
Output is correct |
25 |
Correct |
12 ms |
19284 KB |
Output is correct |
26 |
Correct |
11 ms |
19540 KB |
Output is correct |
27 |
Correct |
12 ms |
19620 KB |
Output is correct |
28 |
Correct |
123 ms |
33128 KB |
Output is correct |
29 |
Correct |
190 ms |
40368 KB |
Output is correct |
30 |
Correct |
262 ms |
47440 KB |
Output is correct |
31 |
Correct |
325 ms |
54428 KB |
Output is correct |
32 |
Correct |
9 ms |
19028 KB |
Output is correct |
33 |
Correct |
8 ms |
19096 KB |
Output is correct |
34 |
Correct |
8 ms |
18984 KB |
Output is correct |
35 |
Correct |
9 ms |
19092 KB |
Output is correct |
36 |
Correct |
8 ms |
19092 KB |
Output is correct |
37 |
Correct |
9 ms |
19040 KB |
Output is correct |
38 |
Correct |
9 ms |
19028 KB |
Output is correct |
39 |
Correct |
9 ms |
19028 KB |
Output is correct |
40 |
Correct |
11 ms |
19028 KB |
Output is correct |
41 |
Correct |
8 ms |
19028 KB |
Output is correct |
42 |
Correct |
8 ms |
19028 KB |
Output is correct |
43 |
Correct |
10 ms |
19284 KB |
Output is correct |
44 |
Correct |
11 ms |
19472 KB |
Output is correct |
45 |
Correct |
145 ms |
36700 KB |
Output is correct |
46 |
Correct |
233 ms |
44704 KB |
Output is correct |
47 |
Correct |
212 ms |
44684 KB |
Output is correct |
48 |
Correct |
9 ms |
18992 KB |
Output is correct |
49 |
Correct |
9 ms |
19092 KB |
Output is correct |
50 |
Correct |
9 ms |
19028 KB |
Output is correct |
51 |
Correct |
8 ms |
19100 KB |
Output is correct |
52 |
Correct |
8 ms |
19096 KB |
Output is correct |
53 |
Correct |
9 ms |
19096 KB |
Output is correct |
54 |
Correct |
9 ms |
19092 KB |
Output is correct |
55 |
Correct |
333 ms |
54304 KB |
Output is correct |
56 |
Correct |
8 ms |
19028 KB |
Output is correct |
57 |
Correct |
11 ms |
19436 KB |
Output is correct |
58 |
Correct |
19 ms |
20308 KB |
Output is correct |
59 |
Correct |
21 ms |
20588 KB |
Output is correct |
60 |
Correct |
165 ms |
36612 KB |
Output is correct |
61 |
Correct |
216 ms |
42776 KB |
Output is correct |
62 |
Correct |
276 ms |
48304 KB |
Output is correct |
63 |
Correct |
347 ms |
54472 KB |
Output is correct |
64 |
Correct |
8 ms |
19016 KB |
Output is correct |
65 |
Correct |
8 ms |
19028 KB |
Output is correct |
66 |
Correct |
8 ms |
19092 KB |
Output is correct |
67 |
Correct |
309 ms |
54376 KB |
Output is correct |
68 |
Correct |
316 ms |
54340 KB |
Output is correct |
69 |
Correct |
310 ms |
54264 KB |
Output is correct |
70 |
Correct |
13 ms |
19624 KB |
Output is correct |
71 |
Correct |
16 ms |
20180 KB |
Output is correct |
72 |
Correct |
152 ms |
36724 KB |
Output is correct |
73 |
Correct |
228 ms |
45528 KB |
Output is correct |
74 |
Correct |
317 ms |
54376 KB |
Output is correct |
75 |
Correct |
331 ms |
54292 KB |
Output is correct |
76 |
Correct |
309 ms |
54344 KB |
Output is correct |
77 |
Correct |
13 ms |
19816 KB |
Output is correct |
78 |
Correct |
18 ms |
20352 KB |
Output is correct |
79 |
Correct |
153 ms |
36644 KB |
Output is correct |
80 |
Correct |
240 ms |
45640 KB |
Output is correct |
81 |
Correct |
310 ms |
54356 KB |
Output is correct |
82 |
Correct |
8 ms |
19028 KB |
Output is correct |
83 |
Correct |
8 ms |
19028 KB |
Output is correct |
84 |
Correct |
8 ms |
19028 KB |
Output is correct |
85 |
Correct |
180 ms |
55704 KB |
Output is correct |
86 |
Correct |
196 ms |
55328 KB |
Output is correct |
87 |
Correct |
187 ms |
55240 KB |
Output is correct |
88 |
Correct |
213 ms |
49412 KB |
Output is correct |
89 |
Correct |
124 ms |
35612 KB |
Output is correct |
90 |
Correct |
299 ms |
48032 KB |
Output is correct |
91 |
Correct |
218 ms |
47976 KB |
Output is correct |
92 |
Correct |
267 ms |
54396 KB |
Output is correct |
93 |
Correct |
262 ms |
54352 KB |
Output is correct |
94 |
Correct |
294 ms |
54436 KB |
Output is correct |
95 |
Correct |
292 ms |
54304 KB |
Output is correct |
96 |
Correct |
9 ms |
19092 KB |
Output is correct |
97 |
Correct |
24 ms |
21968 KB |
Output is correct |
98 |
Correct |
54 ms |
27676 KB |
Output is correct |
99 |
Correct |
176 ms |
55744 KB |
Output is correct |
100 |
Correct |
16 ms |
20564 KB |
Output is correct |
101 |
Correct |
53 ms |
26496 KB |
Output is correct |
102 |
Correct |
102 ms |
34052 KB |
Output is correct |
103 |
Correct |
122 ms |
33860 KB |
Output is correct |
104 |
Correct |
180 ms |
39228 KB |
Output is correct |
105 |
Correct |
223 ms |
44684 KB |
Output is correct |
106 |
Correct |
332 ms |
50292 KB |
Output is correct |
107 |
Correct |
348 ms |
55744 KB |
Output is correct |
108 |
Correct |
9 ms |
19028 KB |
Output is correct |
109 |
Correct |
9 ms |
19008 KB |
Output is correct |
110 |
Correct |
8 ms |
19092 KB |
Output is correct |
111 |
Correct |
8 ms |
19092 KB |
Output is correct |
112 |
Correct |
8 ms |
19040 KB |
Output is correct |
113 |
Correct |
8 ms |
19096 KB |
Output is correct |
114 |
Correct |
10 ms |
19076 KB |
Output is correct |
115 |
Correct |
8 ms |
19028 KB |
Output is correct |
116 |
Correct |
8 ms |
19028 KB |
Output is correct |
117 |
Correct |
8 ms |
19040 KB |
Output is correct |
118 |
Correct |
8 ms |
19028 KB |
Output is correct |
119 |
Correct |
9 ms |
19284 KB |
Output is correct |
120 |
Correct |
11 ms |
19456 KB |
Output is correct |
121 |
Correct |
150 ms |
36736 KB |
Output is correct |
122 |
Correct |
219 ms |
44740 KB |
Output is correct |
123 |
Correct |
209 ms |
44708 KB |
Output is correct |
124 |
Correct |
10 ms |
19092 KB |
Output is correct |
125 |
Correct |
10 ms |
19028 KB |
Output is correct |
126 |
Correct |
9 ms |
19028 KB |
Output is correct |
127 |
Correct |
305 ms |
54344 KB |
Output is correct |
128 |
Correct |
321 ms |
54372 KB |
Output is correct |
129 |
Correct |
303 ms |
54176 KB |
Output is correct |
130 |
Correct |
11 ms |
19668 KB |
Output is correct |
131 |
Correct |
16 ms |
20164 KB |
Output is correct |
132 |
Correct |
146 ms |
36628 KB |
Output is correct |
133 |
Correct |
230 ms |
45600 KB |
Output is correct |
134 |
Correct |
313 ms |
54376 KB |
Output is correct |
135 |
Correct |
248 ms |
52768 KB |
Output is correct |
136 |
Correct |
247 ms |
52908 KB |
Output is correct |
137 |
Correct |
190 ms |
53032 KB |
Output is correct |
138 |
Correct |
300 ms |
53720 KB |
Output is correct |
139 |
Correct |
258 ms |
49972 KB |
Output is correct |
140 |
Correct |
8 ms |
19028 KB |
Output is correct |
141 |
Correct |
44 ms |
25416 KB |
Output is correct |
142 |
Correct |
32 ms |
22136 KB |
Output is correct |
143 |
Correct |
73 ms |
29520 KB |
Output is correct |
144 |
Correct |
128 ms |
37120 KB |
Output is correct |
145 |
Correct |
161 ms |
37456 KB |
Output is correct |
146 |
Correct |
203 ms |
42236 KB |
Output is correct |
147 |
Correct |
248 ms |
46864 KB |
Output is correct |
148 |
Correct |
296 ms |
50780 KB |
Output is correct |
149 |
Correct |
345 ms |
55760 KB |
Output is correct |
150 |
Correct |
325 ms |
54304 KB |
Output is correct |
151 |
Correct |
357 ms |
54376 KB |
Output is correct |
152 |
Correct |
15 ms |
19796 KB |
Output is correct |
153 |
Correct |
16 ms |
20388 KB |
Output is correct |
154 |
Correct |
151 ms |
36608 KB |
Output is correct |
155 |
Correct |
230 ms |
45640 KB |
Output is correct |
156 |
Correct |
342 ms |
54456 KB |
Output is correct |
157 |
Correct |
8 ms |
19028 KB |
Output is correct |
158 |
Correct |
8 ms |
19096 KB |
Output is correct |
159 |
Correct |
8 ms |
19100 KB |
Output is correct |
160 |
Correct |
8 ms |
19028 KB |
Output is correct |
161 |
Correct |
327 ms |
54644 KB |
Output is correct |
162 |
Correct |
205 ms |
55728 KB |
Output is correct |
163 |
Correct |
193 ms |
55524 KB |
Output is correct |
164 |
Correct |
172 ms |
55452 KB |
Output is correct |
165 |
Correct |
188 ms |
55216 KB |
Output is correct |
166 |
Correct |
262 ms |
54816 KB |
Output is correct |
167 |
Correct |
80 ms |
27468 KB |
Output is correct |
168 |
Correct |
39 ms |
23584 KB |
Output is correct |
169 |
Correct |
104 ms |
31040 KB |
Output is correct |
170 |
Correct |
181 ms |
41404 KB |
Output is correct |
171 |
Correct |
220 ms |
48948 KB |
Output is correct |
172 |
Correct |
169 ms |
37348 KB |
Output is correct |
173 |
Correct |
223 ms |
41028 KB |
Output is correct |
174 |
Correct |
275 ms |
44740 KB |
Output is correct |
175 |
Correct |
293 ms |
48096 KB |
Output is correct |
176 |
Correct |
336 ms |
52108 KB |
Output is correct |
177 |
Correct |
430 ms |
55772 KB |
Output is correct |