#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
// trans rights
#define ll long long
#define f first
#define s second
#define endl '\n'
#define all(x) begin(x), end(x)
int n;
vector<int> u, v, a, b;
map<pair<int, int>, int> mp;
set<pair<int, int>> done;
vector<pair<int, int>> dirs = {{0, 2}, {2, 0}, {0, -2}, {-2, 0}};
vector<pair<int, int>> bloc[2] = {{{-1, 1}, {1, 1}, {1, -1}, {-1, -1}}, {{1, 1}, {1, -1}, {-1, -1}, {-1, 1}}};
void dfs(int x, int y, int ldir = 0) {
done.insert({x, y});
for (int i = 0; i < 4; i++) {
int ndir = (ldir + 3 + i) % 4;
int nx = x + dirs[ndir].f;
int ny = y + dirs[ndir].s;
if (mp.find({nx, ny}) == mp.end()) continue;
if (done.find({nx, ny}) != done.end()) continue;
int tx = x + bloc[0][ndir].f;
int ty = y + bloc[0][ndir].s;
if (done.find({tx, ty}) == done.end()) {
u.push_back(mp[{x, y}]);
v.push_back(mp[{nx, ny}]);
done.insert({tx, ty});
a.push_back(tx);
b.push_back(ty);
dfs(nx, ny, ndir);
continue;
}
tx = x + bloc[1][ndir].f;
ty = y + bloc[1][ndir].s;
if (done.find({tx, ty}) == done.end()) {
u.push_back(mp[{x, y}]);
v.push_back(mp[{nx, ny}]);
done.insert({tx, ty});
a.push_back(tx);
b.push_back(ty);
dfs(nx, ny, ndir);
}
}
}
int construct_roads(vector<int> xs, vector<int> ys) {
srand(69);
n = xs.size();
for (int i = 0; i < n; i++) {
mp[{xs[i], ys[i]}] = i;
}
int nxt = 0;
for (int tst = 0; tst < 7; tst++) {
dfs(xs[nxt], ys[nxt]);
if (u.size() == n - 1) {
build(u, v, a, b);
return 1;
}
for (int i = 0; i < n; i++) {
if (done.find({xs[i], ys[i]}) == done.end()) nxt = i;
}
done.clear();
u.clear();
v.clear();
a.clear();
b.clear();
}
return 0;
}
Compilation message
parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:61:22: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
61 | if (u.size() == n - 1) {
| ~~~~~~~~~^~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
171 ms |
33712 KB |
Output is correct |
10 |
Correct |
13 ms |
3924 KB |
Output is correct |
11 |
Correct |
90 ms |
18832 KB |
Output is correct |
12 |
Correct |
20 ms |
5716 KB |
Output is correct |
13 |
Correct |
205 ms |
10888 KB |
Output is correct |
14 |
Correct |
3 ms |
468 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
160 ms |
28592 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
171 ms |
33712 KB |
Output is correct |
10 |
Correct |
13 ms |
3924 KB |
Output is correct |
11 |
Correct |
90 ms |
18832 KB |
Output is correct |
12 |
Correct |
20 ms |
5716 KB |
Output is correct |
13 |
Correct |
205 ms |
10888 KB |
Output is correct |
14 |
Correct |
3 ms |
468 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
160 ms |
28592 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
0 ms |
212 KB |
Output is correct |
21 |
Correct |
0 ms |
212 KB |
Output is correct |
22 |
Correct |
0 ms |
212 KB |
Output is correct |
23 |
Correct |
432 ms |
66392 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
724 KB |
Output is correct |
26 |
Correct |
10 ms |
888 KB |
Output is correct |
27 |
Correct |
6 ms |
776 KB |
Output is correct |
28 |
Correct |
171 ms |
27852 KB |
Output is correct |
29 |
Correct |
240 ms |
41600 KB |
Output is correct |
30 |
Correct |
342 ms |
55388 KB |
Output is correct |
31 |
Correct |
449 ms |
64032 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
0 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
0 ms |
212 KB |
Output is correct |
37 |
Correct |
0 ms |
212 KB |
Output is correct |
38 |
Correct |
0 ms |
212 KB |
Output is correct |
39 |
Correct |
1 ms |
212 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
1 ms |
212 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
9 ms |
596 KB |
Output is correct |
44 |
Correct |
5 ms |
596 KB |
Output is correct |
45 |
Correct |
229 ms |
29916 KB |
Output is correct |
46 |
Correct |
279 ms |
43972 KB |
Output is correct |
47 |
Correct |
283 ms |
43296 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
171 ms |
33712 KB |
Output is correct |
10 |
Correct |
13 ms |
3924 KB |
Output is correct |
11 |
Correct |
90 ms |
18832 KB |
Output is correct |
12 |
Correct |
20 ms |
5716 KB |
Output is correct |
13 |
Correct |
205 ms |
10888 KB |
Output is correct |
14 |
Correct |
3 ms |
468 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
160 ms |
28592 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
0 ms |
212 KB |
Output is correct |
21 |
Correct |
0 ms |
212 KB |
Output is correct |
22 |
Correct |
0 ms |
212 KB |
Output is correct |
23 |
Correct |
432 ms |
66392 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
724 KB |
Output is correct |
26 |
Correct |
10 ms |
888 KB |
Output is correct |
27 |
Correct |
6 ms |
776 KB |
Output is correct |
28 |
Correct |
171 ms |
27852 KB |
Output is correct |
29 |
Correct |
240 ms |
41600 KB |
Output is correct |
30 |
Correct |
342 ms |
55388 KB |
Output is correct |
31 |
Correct |
449 ms |
64032 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
0 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
0 ms |
212 KB |
Output is correct |
37 |
Correct |
0 ms |
212 KB |
Output is correct |
38 |
Correct |
0 ms |
212 KB |
Output is correct |
39 |
Correct |
1 ms |
212 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
1 ms |
212 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
9 ms |
596 KB |
Output is correct |
44 |
Correct |
5 ms |
596 KB |
Output is correct |
45 |
Correct |
229 ms |
29916 KB |
Output is correct |
46 |
Correct |
279 ms |
43972 KB |
Output is correct |
47 |
Correct |
283 ms |
43296 KB |
Output is correct |
48 |
Correct |
0 ms |
212 KB |
Output is correct |
49 |
Correct |
1 ms |
212 KB |
Output is correct |
50 |
Correct |
1 ms |
212 KB |
Output is correct |
51 |
Correct |
1 ms |
212 KB |
Output is correct |
52 |
Correct |
0 ms |
292 KB |
Output is correct |
53 |
Correct |
0 ms |
212 KB |
Output is correct |
54 |
Correct |
0 ms |
212 KB |
Output is correct |
55 |
Correct |
515 ms |
63256 KB |
Output is correct |
56 |
Correct |
0 ms |
212 KB |
Output is correct |
57 |
Correct |
3 ms |
808 KB |
Output is correct |
58 |
Correct |
9 ms |
2360 KB |
Output is correct |
59 |
Correct |
18 ms |
1596 KB |
Output is correct |
60 |
Correct |
217 ms |
34480 KB |
Output is correct |
61 |
Correct |
322 ms |
44936 KB |
Output is correct |
62 |
Correct |
378 ms |
51996 KB |
Output is correct |
63 |
Correct |
555 ms |
66432 KB |
Output is correct |
64 |
Correct |
0 ms |
212 KB |
Output is correct |
65 |
Correct |
0 ms |
212 KB |
Output is correct |
66 |
Correct |
0 ms |
212 KB |
Output is correct |
67 |
Correct |
396 ms |
61920 KB |
Output is correct |
68 |
Correct |
368 ms |
62364 KB |
Output is correct |
69 |
Correct |
414 ms |
64740 KB |
Output is correct |
70 |
Correct |
17 ms |
852 KB |
Output is correct |
71 |
Correct |
16 ms |
1276 KB |
Output is correct |
72 |
Correct |
209 ms |
26320 KB |
Output is correct |
73 |
Correct |
333 ms |
42540 KB |
Output is correct |
74 |
Correct |
444 ms |
52716 KB |
Output is correct |
75 |
Correct |
437 ms |
64160 KB |
Output is correct |
76 |
Correct |
432 ms |
69160 KB |
Output is correct |
77 |
Correct |
22 ms |
1144 KB |
Output is correct |
78 |
Correct |
21 ms |
1632 KB |
Output is correct |
79 |
Correct |
188 ms |
27276 KB |
Output is correct |
80 |
Correct |
326 ms |
41376 KB |
Output is correct |
81 |
Correct |
418 ms |
55316 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
171 ms |
33712 KB |
Output is correct |
10 |
Correct |
13 ms |
3924 KB |
Output is correct |
11 |
Correct |
90 ms |
18832 KB |
Output is correct |
12 |
Correct |
20 ms |
5716 KB |
Output is correct |
13 |
Correct |
205 ms |
10888 KB |
Output is correct |
14 |
Correct |
3 ms |
468 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
160 ms |
28592 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
445 ms |
69028 KB |
Output is correct |
21 |
Correct |
417 ms |
63988 KB |
Output is correct |
22 |
Correct |
439 ms |
61168 KB |
Output is correct |
23 |
Correct |
349 ms |
51168 KB |
Output is correct |
24 |
Correct |
103 ms |
15820 KB |
Output is correct |
25 |
Correct |
196 ms |
15948 KB |
Output is correct |
26 |
Correct |
147 ms |
16036 KB |
Output is correct |
27 |
Correct |
318 ms |
44304 KB |
Output is correct |
28 |
Correct |
313 ms |
44292 KB |
Output is correct |
29 |
Correct |
484 ms |
44340 KB |
Output is correct |
30 |
Correct |
471 ms |
44240 KB |
Output is correct |
31 |
Correct |
0 ms |
212 KB |
Output is correct |
32 |
Correct |
24 ms |
4516 KB |
Output is correct |
33 |
Correct |
52 ms |
7992 KB |
Output is correct |
34 |
Correct |
380 ms |
64980 KB |
Output is correct |
35 |
Correct |
50 ms |
1660 KB |
Output is correct |
36 |
Correct |
116 ms |
5324 KB |
Output is correct |
37 |
Correct |
135 ms |
9308 KB |
Output is correct |
38 |
Correct |
149 ms |
18172 KB |
Output is correct |
39 |
Correct |
202 ms |
24580 KB |
Output is correct |
40 |
Correct |
279 ms |
31272 KB |
Output is correct |
41 |
Correct |
330 ms |
38008 KB |
Output is correct |
42 |
Correct |
411 ms |
44712 KB |
Output is correct |
43 |
Correct |
0 ms |
212 KB |
Output is correct |
44 |
Correct |
0 ms |
212 KB |
Output is correct |
45 |
Correct |
0 ms |
212 KB |
Output is correct |
46 |
Correct |
0 ms |
212 KB |
Output is correct |
47 |
Correct |
0 ms |
212 KB |
Output is correct |
48 |
Correct |
0 ms |
212 KB |
Output is correct |
49 |
Correct |
1 ms |
212 KB |
Output is correct |
50 |
Correct |
0 ms |
212 KB |
Output is correct |
51 |
Correct |
0 ms |
212 KB |
Output is correct |
52 |
Correct |
1 ms |
212 KB |
Output is correct |
53 |
Correct |
0 ms |
212 KB |
Output is correct |
54 |
Correct |
6 ms |
596 KB |
Output is correct |
55 |
Correct |
5 ms |
596 KB |
Output is correct |
56 |
Correct |
183 ms |
29976 KB |
Output is correct |
57 |
Correct |
282 ms |
44080 KB |
Output is correct |
58 |
Correct |
291 ms |
43264 KB |
Output is correct |
59 |
Correct |
0 ms |
212 KB |
Output is correct |
60 |
Correct |
0 ms |
212 KB |
Output is correct |
61 |
Correct |
0 ms |
212 KB |
Output is correct |
62 |
Correct |
416 ms |
61856 KB |
Output is correct |
63 |
Correct |
376 ms |
62328 KB |
Output is correct |
64 |
Correct |
421 ms |
64736 KB |
Output is correct |
65 |
Correct |
13 ms |
852 KB |
Output is correct |
66 |
Correct |
20 ms |
1276 KB |
Output is correct |
67 |
Correct |
181 ms |
26284 KB |
Output is correct |
68 |
Correct |
318 ms |
42516 KB |
Output is correct |
69 |
Correct |
488 ms |
52768 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
171 ms |
33712 KB |
Output is correct |
10 |
Correct |
13 ms |
3924 KB |
Output is correct |
11 |
Correct |
90 ms |
18832 KB |
Output is correct |
12 |
Correct |
20 ms |
5716 KB |
Output is correct |
13 |
Correct |
205 ms |
10888 KB |
Output is correct |
14 |
Correct |
3 ms |
468 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
160 ms |
28592 KB |
Output is correct |
17 |
Correct |
419 ms |
69212 KB |
Output is correct |
18 |
Correct |
414 ms |
66788 KB |
Output is correct |
19 |
Correct |
429 ms |
69520 KB |
Output is correct |
20 |
Correct |
519 ms |
59676 KB |
Output is correct |
21 |
Correct |
394 ms |
50888 KB |
Output is correct |
22 |
Correct |
0 ms |
212 KB |
Output is correct |
23 |
Correct |
53 ms |
8372 KB |
Output is correct |
24 |
Correct |
94 ms |
3800 KB |
Output is correct |
25 |
Correct |
152 ms |
8124 KB |
Output is correct |
26 |
Correct |
174 ms |
11848 KB |
Output is correct |
27 |
Correct |
211 ms |
30212 KB |
Output is correct |
28 |
Correct |
325 ms |
38180 KB |
Output is correct |
29 |
Correct |
338 ms |
45936 KB |
Output is correct |
30 |
Correct |
435 ms |
53200 KB |
Output is correct |
31 |
Correct |
497 ms |
61044 KB |
Output is correct |
32 |
Correct |
518 ms |
64132 KB |
Output is correct |
33 |
Correct |
436 ms |
69212 KB |
Output is correct |
34 |
Correct |
20 ms |
1148 KB |
Output is correct |
35 |
Correct |
25 ms |
1664 KB |
Output is correct |
36 |
Correct |
225 ms |
27168 KB |
Output is correct |
37 |
Correct |
306 ms |
41340 KB |
Output is correct |
38 |
Correct |
437 ms |
55264 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
171 ms |
33712 KB |
Output is correct |
10 |
Correct |
13 ms |
3924 KB |
Output is correct |
11 |
Correct |
90 ms |
18832 KB |
Output is correct |
12 |
Correct |
20 ms |
5716 KB |
Output is correct |
13 |
Correct |
205 ms |
10888 KB |
Output is correct |
14 |
Correct |
3 ms |
468 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
160 ms |
28592 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
0 ms |
212 KB |
Output is correct |
21 |
Correct |
0 ms |
212 KB |
Output is correct |
22 |
Correct |
0 ms |
212 KB |
Output is correct |
23 |
Correct |
432 ms |
66392 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
724 KB |
Output is correct |
26 |
Correct |
10 ms |
888 KB |
Output is correct |
27 |
Correct |
6 ms |
776 KB |
Output is correct |
28 |
Correct |
171 ms |
27852 KB |
Output is correct |
29 |
Correct |
240 ms |
41600 KB |
Output is correct |
30 |
Correct |
342 ms |
55388 KB |
Output is correct |
31 |
Correct |
449 ms |
64032 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
0 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
0 ms |
212 KB |
Output is correct |
37 |
Correct |
0 ms |
212 KB |
Output is correct |
38 |
Correct |
0 ms |
212 KB |
Output is correct |
39 |
Correct |
1 ms |
212 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
1 ms |
212 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
9 ms |
596 KB |
Output is correct |
44 |
Correct |
5 ms |
596 KB |
Output is correct |
45 |
Correct |
229 ms |
29916 KB |
Output is correct |
46 |
Correct |
279 ms |
43972 KB |
Output is correct |
47 |
Correct |
283 ms |
43296 KB |
Output is correct |
48 |
Correct |
0 ms |
212 KB |
Output is correct |
49 |
Correct |
1 ms |
212 KB |
Output is correct |
50 |
Correct |
1 ms |
212 KB |
Output is correct |
51 |
Correct |
1 ms |
212 KB |
Output is correct |
52 |
Correct |
0 ms |
292 KB |
Output is correct |
53 |
Correct |
0 ms |
212 KB |
Output is correct |
54 |
Correct |
0 ms |
212 KB |
Output is correct |
55 |
Correct |
515 ms |
63256 KB |
Output is correct |
56 |
Correct |
0 ms |
212 KB |
Output is correct |
57 |
Correct |
3 ms |
808 KB |
Output is correct |
58 |
Correct |
9 ms |
2360 KB |
Output is correct |
59 |
Correct |
18 ms |
1596 KB |
Output is correct |
60 |
Correct |
217 ms |
34480 KB |
Output is correct |
61 |
Correct |
322 ms |
44936 KB |
Output is correct |
62 |
Correct |
378 ms |
51996 KB |
Output is correct |
63 |
Correct |
555 ms |
66432 KB |
Output is correct |
64 |
Correct |
0 ms |
212 KB |
Output is correct |
65 |
Correct |
0 ms |
212 KB |
Output is correct |
66 |
Correct |
0 ms |
212 KB |
Output is correct |
67 |
Correct |
396 ms |
61920 KB |
Output is correct |
68 |
Correct |
368 ms |
62364 KB |
Output is correct |
69 |
Correct |
414 ms |
64740 KB |
Output is correct |
70 |
Correct |
17 ms |
852 KB |
Output is correct |
71 |
Correct |
16 ms |
1276 KB |
Output is correct |
72 |
Correct |
209 ms |
26320 KB |
Output is correct |
73 |
Correct |
333 ms |
42540 KB |
Output is correct |
74 |
Correct |
444 ms |
52716 KB |
Output is correct |
75 |
Correct |
437 ms |
64160 KB |
Output is correct |
76 |
Correct |
432 ms |
69160 KB |
Output is correct |
77 |
Correct |
22 ms |
1144 KB |
Output is correct |
78 |
Correct |
21 ms |
1632 KB |
Output is correct |
79 |
Correct |
188 ms |
27276 KB |
Output is correct |
80 |
Correct |
326 ms |
41376 KB |
Output is correct |
81 |
Correct |
418 ms |
55316 KB |
Output is correct |
82 |
Correct |
0 ms |
212 KB |
Output is correct |
83 |
Correct |
0 ms |
212 KB |
Output is correct |
84 |
Correct |
1 ms |
212 KB |
Output is correct |
85 |
Correct |
445 ms |
69028 KB |
Output is correct |
86 |
Correct |
417 ms |
63988 KB |
Output is correct |
87 |
Correct |
439 ms |
61168 KB |
Output is correct |
88 |
Correct |
349 ms |
51168 KB |
Output is correct |
89 |
Correct |
103 ms |
15820 KB |
Output is correct |
90 |
Correct |
196 ms |
15948 KB |
Output is correct |
91 |
Correct |
147 ms |
16036 KB |
Output is correct |
92 |
Correct |
318 ms |
44304 KB |
Output is correct |
93 |
Correct |
313 ms |
44292 KB |
Output is correct |
94 |
Correct |
484 ms |
44340 KB |
Output is correct |
95 |
Correct |
471 ms |
44240 KB |
Output is correct |
96 |
Correct |
0 ms |
212 KB |
Output is correct |
97 |
Correct |
24 ms |
4516 KB |
Output is correct |
98 |
Correct |
52 ms |
7992 KB |
Output is correct |
99 |
Correct |
380 ms |
64980 KB |
Output is correct |
100 |
Correct |
50 ms |
1660 KB |
Output is correct |
101 |
Correct |
116 ms |
5324 KB |
Output is correct |
102 |
Correct |
135 ms |
9308 KB |
Output is correct |
103 |
Correct |
149 ms |
18172 KB |
Output is correct |
104 |
Correct |
202 ms |
24580 KB |
Output is correct |
105 |
Correct |
279 ms |
31272 KB |
Output is correct |
106 |
Correct |
330 ms |
38008 KB |
Output is correct |
107 |
Correct |
411 ms |
44712 KB |
Output is correct |
108 |
Correct |
0 ms |
212 KB |
Output is correct |
109 |
Correct |
0 ms |
212 KB |
Output is correct |
110 |
Correct |
0 ms |
212 KB |
Output is correct |
111 |
Correct |
0 ms |
212 KB |
Output is correct |
112 |
Correct |
0 ms |
212 KB |
Output is correct |
113 |
Correct |
0 ms |
212 KB |
Output is correct |
114 |
Correct |
1 ms |
212 KB |
Output is correct |
115 |
Correct |
0 ms |
212 KB |
Output is correct |
116 |
Correct |
0 ms |
212 KB |
Output is correct |
117 |
Correct |
1 ms |
212 KB |
Output is correct |
118 |
Correct |
0 ms |
212 KB |
Output is correct |
119 |
Correct |
6 ms |
596 KB |
Output is correct |
120 |
Correct |
5 ms |
596 KB |
Output is correct |
121 |
Correct |
183 ms |
29976 KB |
Output is correct |
122 |
Correct |
282 ms |
44080 KB |
Output is correct |
123 |
Correct |
291 ms |
43264 KB |
Output is correct |
124 |
Correct |
0 ms |
212 KB |
Output is correct |
125 |
Correct |
0 ms |
212 KB |
Output is correct |
126 |
Correct |
0 ms |
212 KB |
Output is correct |
127 |
Correct |
416 ms |
61856 KB |
Output is correct |
128 |
Correct |
376 ms |
62328 KB |
Output is correct |
129 |
Correct |
421 ms |
64736 KB |
Output is correct |
130 |
Correct |
13 ms |
852 KB |
Output is correct |
131 |
Correct |
20 ms |
1276 KB |
Output is correct |
132 |
Correct |
181 ms |
26284 KB |
Output is correct |
133 |
Correct |
318 ms |
42516 KB |
Output is correct |
134 |
Correct |
488 ms |
52768 KB |
Output is correct |
135 |
Correct |
419 ms |
69212 KB |
Output is correct |
136 |
Correct |
414 ms |
66788 KB |
Output is correct |
137 |
Correct |
429 ms |
69520 KB |
Output is correct |
138 |
Correct |
519 ms |
59676 KB |
Output is correct |
139 |
Correct |
394 ms |
50888 KB |
Output is correct |
140 |
Correct |
0 ms |
212 KB |
Output is correct |
141 |
Correct |
53 ms |
8372 KB |
Output is correct |
142 |
Correct |
94 ms |
3800 KB |
Output is correct |
143 |
Correct |
152 ms |
8124 KB |
Output is correct |
144 |
Correct |
174 ms |
11848 KB |
Output is correct |
145 |
Correct |
211 ms |
30212 KB |
Output is correct |
146 |
Correct |
325 ms |
38180 KB |
Output is correct |
147 |
Correct |
338 ms |
45936 KB |
Output is correct |
148 |
Correct |
435 ms |
53200 KB |
Output is correct |
149 |
Correct |
497 ms |
61044 KB |
Output is correct |
150 |
Correct |
518 ms |
64132 KB |
Output is correct |
151 |
Correct |
436 ms |
69212 KB |
Output is correct |
152 |
Correct |
20 ms |
1148 KB |
Output is correct |
153 |
Correct |
25 ms |
1664 KB |
Output is correct |
154 |
Correct |
225 ms |
27168 KB |
Output is correct |
155 |
Correct |
306 ms |
41340 KB |
Output is correct |
156 |
Correct |
437 ms |
55264 KB |
Output is correct |
157 |
Correct |
0 ms |
212 KB |
Output is correct |
158 |
Correct |
1 ms |
212 KB |
Output is correct |
159 |
Correct |
1 ms |
236 KB |
Output is correct |
160 |
Correct |
0 ms |
212 KB |
Output is correct |
161 |
Correct |
549 ms |
69152 KB |
Output is correct |
162 |
Correct |
457 ms |
61292 KB |
Output is correct |
163 |
Correct |
493 ms |
54992 KB |
Output is correct |
164 |
Correct |
438 ms |
54052 KB |
Output is correct |
165 |
Correct |
1285 ms |
66596 KB |
Output is correct |
166 |
Correct |
986 ms |
68428 KB |
Output is correct |
167 |
Incorrect |
613 ms |
12064 KB |
Solution announced impossible, but it is possible. |
168 |
Halted |
0 ms |
0 KB |
- |