#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> g;
vector<int> used;
void dfs(int v) {
used[v] = 1;
for (int u : g[v]) {
if (!used[u]) {
dfs(u);
}
}
}
int construct_roads(std::vector<int> x, std::vector<int> y) {
if (x.size() == 1) {
build({}, {}, {}, {});
return 1;
}
map<pair<int, int>, int> byc;
int n = x.size();
for (int i = 0; i < n; i++) {
byc[{x[i], y[i]}] = i;
}
g.clear();
g.resize(n);
map<pair<int, int>, int> cnt;
auto add = [&](int i, int j) {
if (i < j) {
g[i].push_back(j);
g[j].push_back(i);
if (x[i] == x[j]) {
cnt[{x[i] + 1, (y[i] + y[j]) / 2}] += 1;
cnt[{x[i] - 1, (y[i] + y[j]) / 2}] += 1;
} else {
cnt[{(x[i] + x[j]) / 2, y[i] + 1}] += 1;
cnt[{(x[i] + x[j]) / 2, y[i] - 1}] += 1;
}
}
};
for (int i = 0; i < n; i++) {
pair<int, int> pp;
pp = {x[i] + 2, y[i]};
if (byc.count(pp)) {
add(i, byc[pp]);
}
pp = {x[i], y[i] + 2};
if (byc.count(pp)) {
add(i, byc[pp]);
}
pp = {x[i] - 2, y[i]};
if (byc.count(pp)) {
add(i, byc[pp]);
}
pp = {x[i], y[i] - 2};
if (byc.count(pp)) {
add(i, byc[pp]);
}
}
used.assign(n, 0);
dfs(0);
if (*min_element(used.begin(), used.end()) == 0) {
return 0;
}
vector<int> u, v, a, b;
for (auto [xy, _] : cnt) {
pair<int, int> RU, RD, LD, LU;
RU = RD = LD = LU = xy;
RU.first++, RU.second++;
RD.first++, RD.second--;
LU.first--, LU.second++;
LD.first--, LD.second--;
if ((xy.first + xy.second) % 4) {
// left right
if (byc.count(RU) && byc.count(RD)) {
u.push_back(byc[RU]);
v.push_back(byc[RD]);
a.push_back(xy.first);
b.push_back(xy.second);
} else if (byc.count(LU) && byc.count(LD)) {
u.push_back(byc[LU]);
v.push_back(byc[LD]);
a.push_back(xy.first);
b.push_back(xy.second);
}
} else {
if (byc.count(RU) && byc.count(LU)) {
u.push_back(byc[RU]);
v.push_back(byc[LU]);
a.push_back(xy.first);
b.push_back(xy.second);
} else if (byc.count(RD) && byc.count(LD)) {
u.push_back(byc[RD]);
v.push_back(byc[LD]);
a.push_back(xy.first);
b.push_back(xy.second);
}
}
}
build(u, v, a, b);
return 1;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
504 ms |
34212 KB |
Output is correct |
10 |
Correct |
26 ms |
3904 KB |
Output is correct |
11 |
Correct |
168 ms |
18668 KB |
Output is correct |
12 |
Correct |
41 ms |
5688 KB |
Output is correct |
13 |
Correct |
81 ms |
12724 KB |
Output is correct |
14 |
Correct |
2 ms |
460 KB |
Output is correct |
15 |
Correct |
3 ms |
716 KB |
Output is correct |
16 |
Correct |
505 ms |
32856 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
504 ms |
34212 KB |
Output is correct |
10 |
Correct |
26 ms |
3904 KB |
Output is correct |
11 |
Correct |
168 ms |
18668 KB |
Output is correct |
12 |
Correct |
41 ms |
5688 KB |
Output is correct |
13 |
Correct |
81 ms |
12724 KB |
Output is correct |
14 |
Correct |
2 ms |
460 KB |
Output is correct |
15 |
Correct |
3 ms |
716 KB |
Output is correct |
16 |
Correct |
505 ms |
32856 KB |
Output is correct |
17 |
Correct |
0 ms |
204 KB |
Output is correct |
18 |
Correct |
0 ms |
204 KB |
Output is correct |
19 |
Correct |
0 ms |
204 KB |
Output is correct |
20 |
Correct |
0 ms |
204 KB |
Output is correct |
21 |
Correct |
0 ms |
204 KB |
Output is correct |
22 |
Correct |
0 ms |
204 KB |
Output is correct |
23 |
Correct |
1435 ms |
60556 KB |
Output is correct |
24 |
Correct |
1 ms |
204 KB |
Output is correct |
25 |
Correct |
3 ms |
588 KB |
Output is correct |
26 |
Correct |
9 ms |
972 KB |
Output is correct |
27 |
Correct |
10 ms |
1100 KB |
Output is correct |
28 |
Correct |
432 ms |
24664 KB |
Output is correct |
29 |
Correct |
808 ms |
35896 KB |
Output is correct |
30 |
Correct |
1057 ms |
48104 KB |
Output is correct |
31 |
Correct |
1371 ms |
60116 KB |
Output is correct |
32 |
Correct |
0 ms |
204 KB |
Output is correct |
33 |
Correct |
0 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 |
0 ms |
204 KB |
Output is correct |
37 |
Correct |
0 ms |
204 KB |
Output is correct |
38 |
Correct |
0 ms |
204 KB |
Output is correct |
39 |
Correct |
0 ms |
204 KB |
Output is correct |
40 |
Correct |
0 ms |
204 KB |
Output is correct |
41 |
Correct |
0 ms |
204 KB |
Output is correct |
42 |
Correct |
0 ms |
204 KB |
Output is correct |
43 |
Correct |
4 ms |
720 KB |
Output is correct |
44 |
Correct |
6 ms |
844 KB |
Output is correct |
45 |
Correct |
547 ms |
29348 KB |
Output is correct |
46 |
Correct |
887 ms |
42644 KB |
Output is correct |
47 |
Correct |
860 ms |
42344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
504 ms |
34212 KB |
Output is correct |
10 |
Correct |
26 ms |
3904 KB |
Output is correct |
11 |
Correct |
168 ms |
18668 KB |
Output is correct |
12 |
Correct |
41 ms |
5688 KB |
Output is correct |
13 |
Correct |
81 ms |
12724 KB |
Output is correct |
14 |
Correct |
2 ms |
460 KB |
Output is correct |
15 |
Correct |
3 ms |
716 KB |
Output is correct |
16 |
Correct |
505 ms |
32856 KB |
Output is correct |
17 |
Correct |
0 ms |
204 KB |
Output is correct |
18 |
Correct |
0 ms |
204 KB |
Output is correct |
19 |
Correct |
0 ms |
204 KB |
Output is correct |
20 |
Correct |
0 ms |
204 KB |
Output is correct |
21 |
Correct |
0 ms |
204 KB |
Output is correct |
22 |
Correct |
0 ms |
204 KB |
Output is correct |
23 |
Correct |
1435 ms |
60556 KB |
Output is correct |
24 |
Correct |
1 ms |
204 KB |
Output is correct |
25 |
Correct |
3 ms |
588 KB |
Output is correct |
26 |
Correct |
9 ms |
972 KB |
Output is correct |
27 |
Correct |
10 ms |
1100 KB |
Output is correct |
28 |
Correct |
432 ms |
24664 KB |
Output is correct |
29 |
Correct |
808 ms |
35896 KB |
Output is correct |
30 |
Correct |
1057 ms |
48104 KB |
Output is correct |
31 |
Correct |
1371 ms |
60116 KB |
Output is correct |
32 |
Correct |
0 ms |
204 KB |
Output is correct |
33 |
Correct |
0 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 |
0 ms |
204 KB |
Output is correct |
37 |
Correct |
0 ms |
204 KB |
Output is correct |
38 |
Correct |
0 ms |
204 KB |
Output is correct |
39 |
Correct |
0 ms |
204 KB |
Output is correct |
40 |
Correct |
0 ms |
204 KB |
Output is correct |
41 |
Correct |
0 ms |
204 KB |
Output is correct |
42 |
Correct |
0 ms |
204 KB |
Output is correct |
43 |
Correct |
4 ms |
720 KB |
Output is correct |
44 |
Correct |
6 ms |
844 KB |
Output is correct |
45 |
Correct |
547 ms |
29348 KB |
Output is correct |
46 |
Correct |
887 ms |
42644 KB |
Output is correct |
47 |
Correct |
860 ms |
42344 KB |
Output is correct |
48 |
Correct |
0 ms |
204 KB |
Output is correct |
49 |
Correct |
0 ms |
204 KB |
Output is correct |
50 |
Correct |
1 ms |
204 KB |
Output is correct |
51 |
Correct |
0 ms |
204 KB |
Output is correct |
52 |
Correct |
0 ms |
204 KB |
Output is correct |
53 |
Correct |
0 ms |
204 KB |
Output is correct |
54 |
Correct |
0 ms |
204 KB |
Output is correct |
55 |
Correct |
1474 ms |
57112 KB |
Output is correct |
56 |
Correct |
0 ms |
204 KB |
Output is correct |
57 |
Correct |
7 ms |
716 KB |
Output is correct |
58 |
Correct |
19 ms |
2128 KB |
Output is correct |
59 |
Correct |
27 ms |
2408 KB |
Output is correct |
60 |
Correct |
582 ms |
28684 KB |
Output is correct |
61 |
Correct |
899 ms |
39132 KB |
Output is correct |
62 |
Correct |
1121 ms |
47348 KB |
Output is correct |
63 |
Correct |
1482 ms |
56148 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 |
1201 ms |
66756 KB |
Output is correct |
68 |
Correct |
1216 ms |
66792 KB |
Output is correct |
69 |
Correct |
1133 ms |
67160 KB |
Output is correct |
70 |
Correct |
8 ms |
1100 KB |
Output is correct |
71 |
Correct |
17 ms |
1984 KB |
Output is correct |
72 |
Correct |
583 ms |
28088 KB |
Output is correct |
73 |
Correct |
987 ms |
42928 KB |
Output is correct |
74 |
Correct |
1351 ms |
56096 KB |
Output is correct |
75 |
Correct |
1464 ms |
62772 KB |
Output is correct |
76 |
Correct |
1184 ms |
68636 KB |
Output is correct |
77 |
Correct |
10 ms |
1356 KB |
Output is correct |
78 |
Correct |
20 ms |
2404 KB |
Output is correct |
79 |
Correct |
540 ms |
29696 KB |
Output is correct |
80 |
Correct |
927 ms |
44656 KB |
Output is correct |
81 |
Correct |
1307 ms |
59288 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
504 ms |
34212 KB |
Output is correct |
10 |
Correct |
26 ms |
3904 KB |
Output is correct |
11 |
Correct |
168 ms |
18668 KB |
Output is correct |
12 |
Correct |
41 ms |
5688 KB |
Output is correct |
13 |
Correct |
81 ms |
12724 KB |
Output is correct |
14 |
Correct |
2 ms |
460 KB |
Output is correct |
15 |
Correct |
3 ms |
716 KB |
Output is correct |
16 |
Correct |
505 ms |
32856 KB |
Output is correct |
17 |
Correct |
0 ms |
204 KB |
Output is correct |
18 |
Correct |
0 ms |
204 KB |
Output is correct |
19 |
Correct |
0 ms |
204 KB |
Output is correct |
20 |
Correct |
1101 ms |
55968 KB |
Output is correct |
21 |
Correct |
1188 ms |
54700 KB |
Output is correct |
22 |
Correct |
1165 ms |
54064 KB |
Output is correct |
23 |
Correct |
990 ms |
56316 KB |
Output is correct |
24 |
Correct |
467 ms |
21420 KB |
Output is correct |
25 |
Correct |
1115 ms |
52580 KB |
Output is correct |
26 |
Correct |
996 ms |
52656 KB |
Output is correct |
27 |
Correct |
1245 ms |
62292 KB |
Output is correct |
28 |
Correct |
1295 ms |
62272 KB |
Output is correct |
29 |
Correct |
1345 ms |
62280 KB |
Output is correct |
30 |
Correct |
1408 ms |
62248 KB |
Output is correct |
31 |
Correct |
0 ms |
204 KB |
Output is correct |
32 |
Correct |
49 ms |
4484 KB |
Output is correct |
33 |
Correct |
136 ms |
10804 KB |
Output is correct |
34 |
Correct |
993 ms |
54968 KB |
Output is correct |
35 |
Correct |
26 ms |
2360 KB |
Output is correct |
36 |
Correct |
157 ms |
10876 KB |
Output is correct |
37 |
Correct |
437 ms |
21384 KB |
Output is correct |
38 |
Correct |
423 ms |
21048 KB |
Output is correct |
39 |
Correct |
654 ms |
28828 KB |
Output is correct |
40 |
Correct |
832 ms |
36612 KB |
Output is correct |
41 |
Correct |
1060 ms |
44512 KB |
Output is correct |
42 |
Correct |
1351 ms |
52136 KB |
Output is correct |
43 |
Correct |
0 ms |
204 KB |
Output is correct |
44 |
Correct |
0 ms |
204 KB |
Output is correct |
45 |
Correct |
0 ms |
204 KB |
Output is correct |
46 |
Correct |
0 ms |
204 KB |
Output is correct |
47 |
Correct |
0 ms |
204 KB |
Output is correct |
48 |
Correct |
1 ms |
204 KB |
Output is correct |
49 |
Correct |
0 ms |
204 KB |
Output is correct |
50 |
Correct |
0 ms |
204 KB |
Output is correct |
51 |
Correct |
0 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 |
4 ms |
716 KB |
Output is correct |
55 |
Correct |
6 ms |
844 KB |
Output is correct |
56 |
Correct |
522 ms |
29292 KB |
Output is correct |
57 |
Correct |
873 ms |
42588 KB |
Output is correct |
58 |
Correct |
834 ms |
42468 KB |
Output is correct |
59 |
Correct |
1 ms |
204 KB |
Output is correct |
60 |
Correct |
0 ms |
204 KB |
Output is correct |
61 |
Correct |
0 ms |
204 KB |
Output is correct |
62 |
Correct |
1174 ms |
66696 KB |
Output is correct |
63 |
Correct |
1210 ms |
66912 KB |
Output is correct |
64 |
Correct |
1189 ms |
67340 KB |
Output is correct |
65 |
Correct |
8 ms |
1100 KB |
Output is correct |
66 |
Correct |
16 ms |
2052 KB |
Output is correct |
67 |
Correct |
556 ms |
28120 KB |
Output is correct |
68 |
Correct |
933 ms |
42932 KB |
Output is correct |
69 |
Correct |
1303 ms |
56020 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
504 ms |
34212 KB |
Output is correct |
10 |
Correct |
26 ms |
3904 KB |
Output is correct |
11 |
Correct |
168 ms |
18668 KB |
Output is correct |
12 |
Correct |
41 ms |
5688 KB |
Output is correct |
13 |
Correct |
81 ms |
12724 KB |
Output is correct |
14 |
Correct |
2 ms |
460 KB |
Output is correct |
15 |
Correct |
3 ms |
716 KB |
Output is correct |
16 |
Correct |
505 ms |
32856 KB |
Output is correct |
17 |
Correct |
1227 ms |
68536 KB |
Output is correct |
18 |
Correct |
1174 ms |
66120 KB |
Output is correct |
19 |
Correct |
1117 ms |
56036 KB |
Output is correct |
20 |
Correct |
1439 ms |
57668 KB |
Output is correct |
21 |
Correct |
1350 ms |
54480 KB |
Output is correct |
22 |
Correct |
0 ms |
204 KB |
Output is correct |
23 |
Correct |
145 ms |
8940 KB |
Output is correct |
24 |
Correct |
54 ms |
4764 KB |
Output is correct |
25 |
Correct |
313 ms |
15604 KB |
Output is correct |
26 |
Correct |
609 ms |
26680 KB |
Output is correct |
27 |
Correct |
640 ms |
28836 KB |
Output is correct |
28 |
Correct |
781 ms |
35956 KB |
Output is correct |
29 |
Correct |
994 ms |
43216 KB |
Output is correct |
30 |
Correct |
1190 ms |
50476 KB |
Output is correct |
31 |
Correct |
1580 ms |
57376 KB |
Output is correct |
32 |
Correct |
1431 ms |
62568 KB |
Output is correct |
33 |
Correct |
1192 ms |
68524 KB |
Output is correct |
34 |
Correct |
11 ms |
1356 KB |
Output is correct |
35 |
Correct |
19 ms |
2300 KB |
Output is correct |
36 |
Correct |
548 ms |
29700 KB |
Output is correct |
37 |
Correct |
945 ms |
44752 KB |
Output is correct |
38 |
Correct |
1327 ms |
59296 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
504 ms |
34212 KB |
Output is correct |
10 |
Correct |
26 ms |
3904 KB |
Output is correct |
11 |
Correct |
168 ms |
18668 KB |
Output is correct |
12 |
Correct |
41 ms |
5688 KB |
Output is correct |
13 |
Correct |
81 ms |
12724 KB |
Output is correct |
14 |
Correct |
2 ms |
460 KB |
Output is correct |
15 |
Correct |
3 ms |
716 KB |
Output is correct |
16 |
Correct |
505 ms |
32856 KB |
Output is correct |
17 |
Correct |
0 ms |
204 KB |
Output is correct |
18 |
Correct |
0 ms |
204 KB |
Output is correct |
19 |
Correct |
0 ms |
204 KB |
Output is correct |
20 |
Correct |
0 ms |
204 KB |
Output is correct |
21 |
Correct |
0 ms |
204 KB |
Output is correct |
22 |
Correct |
0 ms |
204 KB |
Output is correct |
23 |
Correct |
1435 ms |
60556 KB |
Output is correct |
24 |
Correct |
1 ms |
204 KB |
Output is correct |
25 |
Correct |
3 ms |
588 KB |
Output is correct |
26 |
Correct |
9 ms |
972 KB |
Output is correct |
27 |
Correct |
10 ms |
1100 KB |
Output is correct |
28 |
Correct |
432 ms |
24664 KB |
Output is correct |
29 |
Correct |
808 ms |
35896 KB |
Output is correct |
30 |
Correct |
1057 ms |
48104 KB |
Output is correct |
31 |
Correct |
1371 ms |
60116 KB |
Output is correct |
32 |
Correct |
0 ms |
204 KB |
Output is correct |
33 |
Correct |
0 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 |
0 ms |
204 KB |
Output is correct |
37 |
Correct |
0 ms |
204 KB |
Output is correct |
38 |
Correct |
0 ms |
204 KB |
Output is correct |
39 |
Correct |
0 ms |
204 KB |
Output is correct |
40 |
Correct |
0 ms |
204 KB |
Output is correct |
41 |
Correct |
0 ms |
204 KB |
Output is correct |
42 |
Correct |
0 ms |
204 KB |
Output is correct |
43 |
Correct |
4 ms |
720 KB |
Output is correct |
44 |
Correct |
6 ms |
844 KB |
Output is correct |
45 |
Correct |
547 ms |
29348 KB |
Output is correct |
46 |
Correct |
887 ms |
42644 KB |
Output is correct |
47 |
Correct |
860 ms |
42344 KB |
Output is correct |
48 |
Correct |
0 ms |
204 KB |
Output is correct |
49 |
Correct |
0 ms |
204 KB |
Output is correct |
50 |
Correct |
1 ms |
204 KB |
Output is correct |
51 |
Correct |
0 ms |
204 KB |
Output is correct |
52 |
Correct |
0 ms |
204 KB |
Output is correct |
53 |
Correct |
0 ms |
204 KB |
Output is correct |
54 |
Correct |
0 ms |
204 KB |
Output is correct |
55 |
Correct |
1474 ms |
57112 KB |
Output is correct |
56 |
Correct |
0 ms |
204 KB |
Output is correct |
57 |
Correct |
7 ms |
716 KB |
Output is correct |
58 |
Correct |
19 ms |
2128 KB |
Output is correct |
59 |
Correct |
27 ms |
2408 KB |
Output is correct |
60 |
Correct |
582 ms |
28684 KB |
Output is correct |
61 |
Correct |
899 ms |
39132 KB |
Output is correct |
62 |
Correct |
1121 ms |
47348 KB |
Output is correct |
63 |
Correct |
1482 ms |
56148 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 |
1201 ms |
66756 KB |
Output is correct |
68 |
Correct |
1216 ms |
66792 KB |
Output is correct |
69 |
Correct |
1133 ms |
67160 KB |
Output is correct |
70 |
Correct |
8 ms |
1100 KB |
Output is correct |
71 |
Correct |
17 ms |
1984 KB |
Output is correct |
72 |
Correct |
583 ms |
28088 KB |
Output is correct |
73 |
Correct |
987 ms |
42928 KB |
Output is correct |
74 |
Correct |
1351 ms |
56096 KB |
Output is correct |
75 |
Correct |
1464 ms |
62772 KB |
Output is correct |
76 |
Correct |
1184 ms |
68636 KB |
Output is correct |
77 |
Correct |
10 ms |
1356 KB |
Output is correct |
78 |
Correct |
20 ms |
2404 KB |
Output is correct |
79 |
Correct |
540 ms |
29696 KB |
Output is correct |
80 |
Correct |
927 ms |
44656 KB |
Output is correct |
81 |
Correct |
1307 ms |
59288 KB |
Output is correct |
82 |
Correct |
0 ms |
204 KB |
Output is correct |
83 |
Correct |
0 ms |
204 KB |
Output is correct |
84 |
Correct |
0 ms |
204 KB |
Output is correct |
85 |
Correct |
1101 ms |
55968 KB |
Output is correct |
86 |
Correct |
1188 ms |
54700 KB |
Output is correct |
87 |
Correct |
1165 ms |
54064 KB |
Output is correct |
88 |
Correct |
990 ms |
56316 KB |
Output is correct |
89 |
Correct |
467 ms |
21420 KB |
Output is correct |
90 |
Correct |
1115 ms |
52580 KB |
Output is correct |
91 |
Correct |
996 ms |
52656 KB |
Output is correct |
92 |
Correct |
1245 ms |
62292 KB |
Output is correct |
93 |
Correct |
1295 ms |
62272 KB |
Output is correct |
94 |
Correct |
1345 ms |
62280 KB |
Output is correct |
95 |
Correct |
1408 ms |
62248 KB |
Output is correct |
96 |
Correct |
0 ms |
204 KB |
Output is correct |
97 |
Correct |
49 ms |
4484 KB |
Output is correct |
98 |
Correct |
136 ms |
10804 KB |
Output is correct |
99 |
Correct |
993 ms |
54968 KB |
Output is correct |
100 |
Correct |
26 ms |
2360 KB |
Output is correct |
101 |
Correct |
157 ms |
10876 KB |
Output is correct |
102 |
Correct |
437 ms |
21384 KB |
Output is correct |
103 |
Correct |
423 ms |
21048 KB |
Output is correct |
104 |
Correct |
654 ms |
28828 KB |
Output is correct |
105 |
Correct |
832 ms |
36612 KB |
Output is correct |
106 |
Correct |
1060 ms |
44512 KB |
Output is correct |
107 |
Correct |
1351 ms |
52136 KB |
Output is correct |
108 |
Correct |
0 ms |
204 KB |
Output is correct |
109 |
Correct |
0 ms |
204 KB |
Output is correct |
110 |
Correct |
0 ms |
204 KB |
Output is correct |
111 |
Correct |
0 ms |
204 KB |
Output is correct |
112 |
Correct |
0 ms |
204 KB |
Output is correct |
113 |
Correct |
1 ms |
204 KB |
Output is correct |
114 |
Correct |
0 ms |
204 KB |
Output is correct |
115 |
Correct |
0 ms |
204 KB |
Output is correct |
116 |
Correct |
0 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 |
4 ms |
716 KB |
Output is correct |
120 |
Correct |
6 ms |
844 KB |
Output is correct |
121 |
Correct |
522 ms |
29292 KB |
Output is correct |
122 |
Correct |
873 ms |
42588 KB |
Output is correct |
123 |
Correct |
834 ms |
42468 KB |
Output is correct |
124 |
Correct |
1 ms |
204 KB |
Output is correct |
125 |
Correct |
0 ms |
204 KB |
Output is correct |
126 |
Correct |
0 ms |
204 KB |
Output is correct |
127 |
Correct |
1174 ms |
66696 KB |
Output is correct |
128 |
Correct |
1210 ms |
66912 KB |
Output is correct |
129 |
Correct |
1189 ms |
67340 KB |
Output is correct |
130 |
Correct |
8 ms |
1100 KB |
Output is correct |
131 |
Correct |
16 ms |
2052 KB |
Output is correct |
132 |
Correct |
556 ms |
28120 KB |
Output is correct |
133 |
Correct |
933 ms |
42932 KB |
Output is correct |
134 |
Correct |
1303 ms |
56020 KB |
Output is correct |
135 |
Correct |
1227 ms |
68536 KB |
Output is correct |
136 |
Correct |
1174 ms |
66120 KB |
Output is correct |
137 |
Correct |
1117 ms |
56036 KB |
Output is correct |
138 |
Correct |
1439 ms |
57668 KB |
Output is correct |
139 |
Correct |
1350 ms |
54480 KB |
Output is correct |
140 |
Correct |
0 ms |
204 KB |
Output is correct |
141 |
Correct |
145 ms |
8940 KB |
Output is correct |
142 |
Correct |
54 ms |
4764 KB |
Output is correct |
143 |
Correct |
313 ms |
15604 KB |
Output is correct |
144 |
Correct |
609 ms |
26680 KB |
Output is correct |
145 |
Correct |
640 ms |
28836 KB |
Output is correct |
146 |
Correct |
781 ms |
35956 KB |
Output is correct |
147 |
Correct |
994 ms |
43216 KB |
Output is correct |
148 |
Correct |
1190 ms |
50476 KB |
Output is correct |
149 |
Correct |
1580 ms |
57376 KB |
Output is correct |
150 |
Correct |
1431 ms |
62568 KB |
Output is correct |
151 |
Correct |
1192 ms |
68524 KB |
Output is correct |
152 |
Correct |
11 ms |
1356 KB |
Output is correct |
153 |
Correct |
19 ms |
2300 KB |
Output is correct |
154 |
Correct |
548 ms |
29700 KB |
Output is correct |
155 |
Correct |
945 ms |
44752 KB |
Output is correct |
156 |
Correct |
1327 ms |
59296 KB |
Output is correct |
157 |
Correct |
1 ms |
204 KB |
Output is correct |
158 |
Correct |
0 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 |
1632 ms |
54044 KB |
Output is correct |
162 |
Correct |
1077 ms |
53836 KB |
Output is correct |
163 |
Correct |
1168 ms |
52296 KB |
Output is correct |
164 |
Correct |
1139 ms |
52120 KB |
Output is correct |
165 |
Correct |
1468 ms |
51360 KB |
Output is correct |
166 |
Correct |
1484 ms |
53860 KB |
Output is correct |
167 |
Correct |
262 ms |
12776 KB |
Output is correct |
168 |
Correct |
103 ms |
6592 KB |
Output is correct |
169 |
Correct |
415 ms |
16504 KB |
Output is correct |
170 |
Correct |
967 ms |
30584 KB |
Output is correct |
171 |
Correct |
1318 ms |
40788 KB |
Output is correct |
172 |
Correct |
701 ms |
27096 KB |
Output is correct |
173 |
Correct |
807 ms |
32520 KB |
Output is correct |
174 |
Correct |
1042 ms |
38092 KB |
Output is correct |
175 |
Correct |
1173 ms |
43108 KB |
Output is correct |
176 |
Correct |
1381 ms |
48784 KB |
Output is correct |
177 |
Correct |
1593 ms |
54044 KB |
Output is correct |