#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using ii = pair<int, int>;
int DX[] = {-1, 0, 1, 0};
int DY[] = {0, 1, 0, -1};
const int MV = 1e9;
struct DSU {
int nrc;
vi e;
DSU(int n) : nrc(n), e(n, -1) {}
int repr(int u) {
while(e[u] >= 0) u = e[u];
return u;
}
void join(int u, int v) {
u = repr(u); v = repr(v);
if(u == v) return;
if(e[u] >= e[v]) swap(u, v);
e[u] += e[v];
e[v] = u;
--nrc;
}
};
int construct_roads(vi x, vi y) {
auto get_bench_coord = [&](int u, int v) -> pair<ii, ii> {
int xcm = (x[u] + x[v]) / 2, ycm = (y[u] + y[v]) / 2;
int dx = 2 - abs(x[u] - x[v]), dy = 2 - abs(y[u] - y[v]);
return make_pair(ii{xcm - dx / 2, ycm - dy / 2}, ii{xcm + dx / 2, ycm + dy / 2});
};
int n = x.size();
vector<ii> B;
map<ii, int> Id;
for(int i = 0; i < n; ++i)
Id[ii{x[i], y[i]}] = i;
for(int i = 0; i < n; ++i) {
for(int d = 0; d < 4; ++d) {
int nx = x[i] + 2 * DX[d], ny = y[i] + 2 * DY[d];
if(Id.count({nx, ny})) {
int u = Id[{nx, ny}];
auto [a, b] = get_bench_coord(u, i);
B.push_back(a);
B.push_back(b);
}
}
}
sort(B.begin(), B.end());
B.resize(unique(B.begin(), B.end()) - B.begin());
map<ii, int> IdB;
int m = B.size();
for(int i = 0; i < m; ++i) {
IdB[B[i]] = i;
}
vi U, V, RA, RB;
DSU Sol(n);
auto leaga = [&](int x, int y, int x1, int y1, int x2, int y2) -> bool {
if(Id.count({x1, y1}) && Id.count({x2, y2})) {
int u = Id[{x1, y1}], v = Id[{x2, y2}];
U.push_back(u);
V.push_back(v);
RA.push_back(x);
RB.push_back(y);
Sol.join(u, v);
return true;
}
return false;
};
for(int i = 0; i < m; ++i) {
auto [x, y] = B[i];
int tip = ((((x + MV) / 2) & 1) + (((y + MV) / 2) & 1)) % 2;
if(tip) {
//leg la ceva vertical
leaga(x, y, x + 1, y - 1, x + 1, y + 1) ||
leaga(x, y, x - 1, y - 1, x - 1, y + 1);
} else {
//leg la ceva orizontal
leaga(x, y, x - 1, y + 1, x + 1, y + 1) ||
leaga(x, y, x - 1, y - 1, x + 1, y - 1);
}
}
if(Sol.nrc != 1) return 0;
build(U, V, RA, RB);
return 1;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
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 |
221 ms |
30056 KB |
Output is correct |
10 |
Correct |
14 ms |
3292 KB |
Output is correct |
11 |
Correct |
89 ms |
16180 KB |
Output is correct |
12 |
Correct |
20 ms |
4820 KB |
Output is correct |
13 |
Correct |
67 ms |
12576 KB |
Output is correct |
14 |
Correct |
1 ms |
600 KB |
Output is correct |
15 |
Correct |
3 ms |
860 KB |
Output is correct |
16 |
Correct |
223 ms |
30136 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
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 |
221 ms |
30056 KB |
Output is correct |
10 |
Correct |
14 ms |
3292 KB |
Output is correct |
11 |
Correct |
89 ms |
16180 KB |
Output is correct |
12 |
Correct |
20 ms |
4820 KB |
Output is correct |
13 |
Correct |
67 ms |
12576 KB |
Output is correct |
14 |
Correct |
1 ms |
600 KB |
Output is correct |
15 |
Correct |
3 ms |
860 KB |
Output is correct |
16 |
Correct |
223 ms |
30136 KB |
Output is correct |
17 |
Correct |
1 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 |
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 |
620 ms |
56736 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
2 ms |
604 KB |
Output is correct |
26 |
Correct |
4 ms |
988 KB |
Output is correct |
27 |
Correct |
7 ms |
1240 KB |
Output is correct |
28 |
Correct |
200 ms |
23236 KB |
Output is correct |
29 |
Correct |
307 ms |
33788 KB |
Output is correct |
30 |
Correct |
485 ms |
46200 KB |
Output is correct |
31 |
Correct |
661 ms |
58528 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
436 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 |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
1 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
344 KB |
Output is correct |
41 |
Correct |
0 ms |
436 KB |
Output is correct |
42 |
Correct |
0 ms |
344 KB |
Output is correct |
43 |
Correct |
2 ms |
876 KB |
Output is correct |
44 |
Correct |
4 ms |
1112 KB |
Output is correct |
45 |
Correct |
225 ms |
26180 KB |
Output is correct |
46 |
Correct |
355 ms |
38784 KB |
Output is correct |
47 |
Correct |
372 ms |
38600 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
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 |
221 ms |
30056 KB |
Output is correct |
10 |
Correct |
14 ms |
3292 KB |
Output is correct |
11 |
Correct |
89 ms |
16180 KB |
Output is correct |
12 |
Correct |
20 ms |
4820 KB |
Output is correct |
13 |
Correct |
67 ms |
12576 KB |
Output is correct |
14 |
Correct |
1 ms |
600 KB |
Output is correct |
15 |
Correct |
3 ms |
860 KB |
Output is correct |
16 |
Correct |
223 ms |
30136 KB |
Output is correct |
17 |
Correct |
1 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 |
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 |
620 ms |
56736 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
2 ms |
604 KB |
Output is correct |
26 |
Correct |
4 ms |
988 KB |
Output is correct |
27 |
Correct |
7 ms |
1240 KB |
Output is correct |
28 |
Correct |
200 ms |
23236 KB |
Output is correct |
29 |
Correct |
307 ms |
33788 KB |
Output is correct |
30 |
Correct |
485 ms |
46200 KB |
Output is correct |
31 |
Correct |
661 ms |
58528 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
436 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 |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
1 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
344 KB |
Output is correct |
41 |
Correct |
0 ms |
436 KB |
Output is correct |
42 |
Correct |
0 ms |
344 KB |
Output is correct |
43 |
Correct |
2 ms |
876 KB |
Output is correct |
44 |
Correct |
4 ms |
1112 KB |
Output is correct |
45 |
Correct |
225 ms |
26180 KB |
Output is correct |
46 |
Correct |
355 ms |
38784 KB |
Output is correct |
47 |
Correct |
372 ms |
38600 KB |
Output is correct |
48 |
Correct |
0 ms |
344 KB |
Output is correct |
49 |
Correct |
0 ms |
440 KB |
Output is correct |
50 |
Correct |
1 ms |
348 KB |
Output is correct |
51 |
Correct |
1 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 |
537 ms |
56272 KB |
Output is correct |
56 |
Correct |
1 ms |
344 KB |
Output is correct |
57 |
Correct |
3 ms |
860 KB |
Output is correct |
58 |
Correct |
9 ms |
1928 KB |
Output is correct |
59 |
Correct |
17 ms |
2900 KB |
Output is correct |
60 |
Correct |
219 ms |
29620 KB |
Output is correct |
61 |
Correct |
315 ms |
39492 KB |
Output is correct |
62 |
Correct |
397 ms |
47272 KB |
Output is correct |
63 |
Correct |
530 ms |
56244 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 |
437 ms |
61736 KB |
Output is correct |
68 |
Correct |
443 ms |
59900 KB |
Output is correct |
69 |
Correct |
431 ms |
59568 KB |
Output is correct |
70 |
Correct |
6 ms |
1496 KB |
Output is correct |
71 |
Correct |
12 ms |
2016 KB |
Output is correct |
72 |
Correct |
194 ms |
25840 KB |
Output is correct |
73 |
Correct |
324 ms |
40696 KB |
Output is correct |
74 |
Correct |
454 ms |
51388 KB |
Output is correct |
75 |
Correct |
489 ms |
57784 KB |
Output is correct |
76 |
Correct |
439 ms |
60860 KB |
Output is correct |
77 |
Correct |
7 ms |
1500 KB |
Output is correct |
78 |
Correct |
13 ms |
2464 KB |
Output is correct |
79 |
Correct |
205 ms |
27076 KB |
Output is correct |
80 |
Correct |
346 ms |
42416 KB |
Output is correct |
81 |
Correct |
487 ms |
54968 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
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 |
221 ms |
30056 KB |
Output is correct |
10 |
Correct |
14 ms |
3292 KB |
Output is correct |
11 |
Correct |
89 ms |
16180 KB |
Output is correct |
12 |
Correct |
20 ms |
4820 KB |
Output is correct |
13 |
Correct |
67 ms |
12576 KB |
Output is correct |
14 |
Correct |
1 ms |
600 KB |
Output is correct |
15 |
Correct |
3 ms |
860 KB |
Output is correct |
16 |
Correct |
223 ms |
30136 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 |
406 ms |
49640 KB |
Output is correct |
21 |
Correct |
421 ms |
49084 KB |
Output is correct |
22 |
Correct |
432 ms |
49340 KB |
Output is correct |
23 |
Correct |
385 ms |
51892 KB |
Output is correct |
24 |
Correct |
194 ms |
18516 KB |
Output is correct |
25 |
Correct |
488 ms |
54972 KB |
Output is correct |
26 |
Correct |
482 ms |
57020 KB |
Output is correct |
27 |
Correct |
476 ms |
61628 KB |
Output is correct |
28 |
Correct |
487 ms |
61392 KB |
Output is correct |
29 |
Correct |
516 ms |
59832 KB |
Output is correct |
30 |
Correct |
523 ms |
59576 KB |
Output is correct |
31 |
Correct |
0 ms |
344 KB |
Output is correct |
32 |
Correct |
27 ms |
3892 KB |
Output is correct |
33 |
Correct |
75 ms |
9812 KB |
Output is correct |
34 |
Correct |
387 ms |
49320 KB |
Output is correct |
35 |
Correct |
15 ms |
2780 KB |
Output is correct |
36 |
Correct |
88 ms |
11720 KB |
Output is correct |
37 |
Correct |
190 ms |
24000 KB |
Output is correct |
38 |
Correct |
163 ms |
21332 KB |
Output is correct |
39 |
Correct |
233 ms |
28104 KB |
Output is correct |
40 |
Correct |
333 ms |
38320 KB |
Output is correct |
41 |
Correct |
393 ms |
43460 KB |
Output is correct |
42 |
Correct |
512 ms |
51892 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
440 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 |
348 KB |
Output is correct |
51 |
Correct |
0 ms |
348 KB |
Output is correct |
52 |
Correct |
0 ms |
344 KB |
Output is correct |
53 |
Correct |
0 ms |
348 KB |
Output is correct |
54 |
Correct |
2 ms |
860 KB |
Output is correct |
55 |
Correct |
4 ms |
1112 KB |
Output is correct |
56 |
Correct |
196 ms |
26296 KB |
Output is correct |
57 |
Correct |
323 ms |
39356 KB |
Output is correct |
58 |
Correct |
306 ms |
38904 KB |
Output is correct |
59 |
Correct |
1 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 |
431 ms |
61616 KB |
Output is correct |
63 |
Correct |
429 ms |
59896 KB |
Output is correct |
64 |
Correct |
443 ms |
59572 KB |
Output is correct |
65 |
Correct |
5 ms |
1116 KB |
Output is correct |
66 |
Correct |
11 ms |
2032 KB |
Output is correct |
67 |
Correct |
196 ms |
26072 KB |
Output is correct |
68 |
Correct |
333 ms |
41392 KB |
Output is correct |
69 |
Correct |
505 ms |
51384 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
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 |
221 ms |
30056 KB |
Output is correct |
10 |
Correct |
14 ms |
3292 KB |
Output is correct |
11 |
Correct |
89 ms |
16180 KB |
Output is correct |
12 |
Correct |
20 ms |
4820 KB |
Output is correct |
13 |
Correct |
67 ms |
12576 KB |
Output is correct |
14 |
Correct |
1 ms |
600 KB |
Output is correct |
15 |
Correct |
3 ms |
860 KB |
Output is correct |
16 |
Correct |
223 ms |
30136 KB |
Output is correct |
17 |
Correct |
456 ms |
60204 KB |
Output is correct |
18 |
Correct |
489 ms |
60744 KB |
Output is correct |
19 |
Correct |
453 ms |
49488 KB |
Output is correct |
20 |
Correct |
591 ms |
54716 KB |
Output is correct |
21 |
Correct |
503 ms |
51628 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
69 ms |
8808 KB |
Output is correct |
24 |
Correct |
35 ms |
5252 KB |
Output is correct |
25 |
Correct |
142 ms |
18556 KB |
Output is correct |
26 |
Correct |
274 ms |
30652 KB |
Output is correct |
27 |
Correct |
258 ms |
27536 KB |
Output is correct |
28 |
Correct |
316 ms |
35624 KB |
Output is correct |
29 |
Correct |
402 ms |
41900 KB |
Output is correct |
30 |
Correct |
480 ms |
47984 KB |
Output is correct |
31 |
Correct |
568 ms |
54700 KB |
Output is correct |
32 |
Correct |
542 ms |
57524 KB |
Output is correct |
33 |
Correct |
478 ms |
59824 KB |
Output is correct |
34 |
Correct |
7 ms |
1500 KB |
Output is correct |
35 |
Correct |
18 ms |
2516 KB |
Output is correct |
36 |
Correct |
244 ms |
27184 KB |
Output is correct |
37 |
Correct |
378 ms |
41912 KB |
Output is correct |
38 |
Correct |
569 ms |
54692 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
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 |
221 ms |
30056 KB |
Output is correct |
10 |
Correct |
14 ms |
3292 KB |
Output is correct |
11 |
Correct |
89 ms |
16180 KB |
Output is correct |
12 |
Correct |
20 ms |
4820 KB |
Output is correct |
13 |
Correct |
67 ms |
12576 KB |
Output is correct |
14 |
Correct |
1 ms |
600 KB |
Output is correct |
15 |
Correct |
3 ms |
860 KB |
Output is correct |
16 |
Correct |
223 ms |
30136 KB |
Output is correct |
17 |
Correct |
1 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 |
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 |
620 ms |
56736 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
2 ms |
604 KB |
Output is correct |
26 |
Correct |
4 ms |
988 KB |
Output is correct |
27 |
Correct |
7 ms |
1240 KB |
Output is correct |
28 |
Correct |
200 ms |
23236 KB |
Output is correct |
29 |
Correct |
307 ms |
33788 KB |
Output is correct |
30 |
Correct |
485 ms |
46200 KB |
Output is correct |
31 |
Correct |
661 ms |
58528 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
436 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 |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
1 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
344 KB |
Output is correct |
41 |
Correct |
0 ms |
436 KB |
Output is correct |
42 |
Correct |
0 ms |
344 KB |
Output is correct |
43 |
Correct |
2 ms |
876 KB |
Output is correct |
44 |
Correct |
4 ms |
1112 KB |
Output is correct |
45 |
Correct |
225 ms |
26180 KB |
Output is correct |
46 |
Correct |
355 ms |
38784 KB |
Output is correct |
47 |
Correct |
372 ms |
38600 KB |
Output is correct |
48 |
Correct |
0 ms |
344 KB |
Output is correct |
49 |
Correct |
0 ms |
440 KB |
Output is correct |
50 |
Correct |
1 ms |
348 KB |
Output is correct |
51 |
Correct |
1 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 |
537 ms |
56272 KB |
Output is correct |
56 |
Correct |
1 ms |
344 KB |
Output is correct |
57 |
Correct |
3 ms |
860 KB |
Output is correct |
58 |
Correct |
9 ms |
1928 KB |
Output is correct |
59 |
Correct |
17 ms |
2900 KB |
Output is correct |
60 |
Correct |
219 ms |
29620 KB |
Output is correct |
61 |
Correct |
315 ms |
39492 KB |
Output is correct |
62 |
Correct |
397 ms |
47272 KB |
Output is correct |
63 |
Correct |
530 ms |
56244 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 |
437 ms |
61736 KB |
Output is correct |
68 |
Correct |
443 ms |
59900 KB |
Output is correct |
69 |
Correct |
431 ms |
59568 KB |
Output is correct |
70 |
Correct |
6 ms |
1496 KB |
Output is correct |
71 |
Correct |
12 ms |
2016 KB |
Output is correct |
72 |
Correct |
194 ms |
25840 KB |
Output is correct |
73 |
Correct |
324 ms |
40696 KB |
Output is correct |
74 |
Correct |
454 ms |
51388 KB |
Output is correct |
75 |
Correct |
489 ms |
57784 KB |
Output is correct |
76 |
Correct |
439 ms |
60860 KB |
Output is correct |
77 |
Correct |
7 ms |
1500 KB |
Output is correct |
78 |
Correct |
13 ms |
2464 KB |
Output is correct |
79 |
Correct |
205 ms |
27076 KB |
Output is correct |
80 |
Correct |
346 ms |
42416 KB |
Output is correct |
81 |
Correct |
487 ms |
54968 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 |
406 ms |
49640 KB |
Output is correct |
86 |
Correct |
421 ms |
49084 KB |
Output is correct |
87 |
Correct |
432 ms |
49340 KB |
Output is correct |
88 |
Correct |
385 ms |
51892 KB |
Output is correct |
89 |
Correct |
194 ms |
18516 KB |
Output is correct |
90 |
Correct |
488 ms |
54972 KB |
Output is correct |
91 |
Correct |
482 ms |
57020 KB |
Output is correct |
92 |
Correct |
476 ms |
61628 KB |
Output is correct |
93 |
Correct |
487 ms |
61392 KB |
Output is correct |
94 |
Correct |
516 ms |
59832 KB |
Output is correct |
95 |
Correct |
523 ms |
59576 KB |
Output is correct |
96 |
Correct |
0 ms |
344 KB |
Output is correct |
97 |
Correct |
27 ms |
3892 KB |
Output is correct |
98 |
Correct |
75 ms |
9812 KB |
Output is correct |
99 |
Correct |
387 ms |
49320 KB |
Output is correct |
100 |
Correct |
15 ms |
2780 KB |
Output is correct |
101 |
Correct |
88 ms |
11720 KB |
Output is correct |
102 |
Correct |
190 ms |
24000 KB |
Output is correct |
103 |
Correct |
163 ms |
21332 KB |
Output is correct |
104 |
Correct |
233 ms |
28104 KB |
Output is correct |
105 |
Correct |
333 ms |
38320 KB |
Output is correct |
106 |
Correct |
393 ms |
43460 KB |
Output is correct |
107 |
Correct |
512 ms |
51892 KB |
Output is correct |
108 |
Correct |
0 ms |
348 KB |
Output is correct |
109 |
Correct |
0 ms |
440 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 |
348 KB |
Output is correct |
116 |
Correct |
0 ms |
348 KB |
Output is correct |
117 |
Correct |
0 ms |
344 KB |
Output is correct |
118 |
Correct |
0 ms |
348 KB |
Output is correct |
119 |
Correct |
2 ms |
860 KB |
Output is correct |
120 |
Correct |
4 ms |
1112 KB |
Output is correct |
121 |
Correct |
196 ms |
26296 KB |
Output is correct |
122 |
Correct |
323 ms |
39356 KB |
Output is correct |
123 |
Correct |
306 ms |
38904 KB |
Output is correct |
124 |
Correct |
1 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 |
431 ms |
61616 KB |
Output is correct |
128 |
Correct |
429 ms |
59896 KB |
Output is correct |
129 |
Correct |
443 ms |
59572 KB |
Output is correct |
130 |
Correct |
5 ms |
1116 KB |
Output is correct |
131 |
Correct |
11 ms |
2032 KB |
Output is correct |
132 |
Correct |
196 ms |
26072 KB |
Output is correct |
133 |
Correct |
333 ms |
41392 KB |
Output is correct |
134 |
Correct |
505 ms |
51384 KB |
Output is correct |
135 |
Correct |
456 ms |
60204 KB |
Output is correct |
136 |
Correct |
489 ms |
60744 KB |
Output is correct |
137 |
Correct |
453 ms |
49488 KB |
Output is correct |
138 |
Correct |
591 ms |
54716 KB |
Output is correct |
139 |
Correct |
503 ms |
51628 KB |
Output is correct |
140 |
Correct |
0 ms |
348 KB |
Output is correct |
141 |
Correct |
69 ms |
8808 KB |
Output is correct |
142 |
Correct |
35 ms |
5252 KB |
Output is correct |
143 |
Correct |
142 ms |
18556 KB |
Output is correct |
144 |
Correct |
274 ms |
30652 KB |
Output is correct |
145 |
Correct |
258 ms |
27536 KB |
Output is correct |
146 |
Correct |
316 ms |
35624 KB |
Output is correct |
147 |
Correct |
402 ms |
41900 KB |
Output is correct |
148 |
Correct |
480 ms |
47984 KB |
Output is correct |
149 |
Correct |
568 ms |
54700 KB |
Output is correct |
150 |
Correct |
542 ms |
57524 KB |
Output is correct |
151 |
Correct |
478 ms |
59824 KB |
Output is correct |
152 |
Correct |
7 ms |
1500 KB |
Output is correct |
153 |
Correct |
18 ms |
2516 KB |
Output is correct |
154 |
Correct |
244 ms |
27184 KB |
Output is correct |
155 |
Correct |
378 ms |
41912 KB |
Output is correct |
156 |
Correct |
569 ms |
54692 KB |
Output is correct |
157 |
Correct |
0 ms |
344 KB |
Output is correct |
158 |
Correct |
0 ms |
348 KB |
Output is correct |
159 |
Correct |
0 ms |
348 KB |
Output is correct |
160 |
Correct |
1 ms |
436 KB |
Output is correct |
161 |
Correct |
660 ms |
54708 KB |
Output is correct |
162 |
Correct |
459 ms |
50016 KB |
Output is correct |
163 |
Correct |
532 ms |
50200 KB |
Output is correct |
164 |
Correct |
534 ms |
51880 KB |
Output is correct |
165 |
Correct |
598 ms |
53812 KB |
Output is correct |
166 |
Correct |
639 ms |
53480 KB |
Output is correct |
167 |
Correct |
103 ms |
14008 KB |
Output is correct |
168 |
Correct |
60 ms |
7884 KB |
Output is correct |
169 |
Correct |
185 ms |
20816 KB |
Output is correct |
170 |
Correct |
427 ms |
38048 KB |
Output is correct |
171 |
Correct |
586 ms |
49544 KB |
Output is correct |
172 |
Correct |
273 ms |
27328 KB |
Output is correct |
173 |
Correct |
319 ms |
32488 KB |
Output is correct |
174 |
Correct |
402 ms |
39068 KB |
Output is correct |
175 |
Correct |
492 ms |
44044 KB |
Output is correct |
176 |
Correct |
551 ms |
49312 KB |
Output is correct |
177 |
Correct |
616 ms |
54484 KB |
Output is correct |