#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;
}
for (int tst = 0; tst < 8; tst++) {
int t = rand() % n;
dfs(xs[t], ys[t]);
if (u.size() == n - 1) {
build(u, v, a, b);
return 1;
}
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 |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 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 |
164 ms |
30052 KB |
Output is correct |
10 |
Correct |
13 ms |
3620 KB |
Output is correct |
11 |
Correct |
95 ms |
16956 KB |
Output is correct |
12 |
Correct |
20 ms |
4820 KB |
Output is correct |
13 |
Correct |
221 ms |
10648 KB |
Output is correct |
14 |
Correct |
3 ms |
468 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
166 ms |
31360 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 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 |
164 ms |
30052 KB |
Output is correct |
10 |
Correct |
13 ms |
3620 KB |
Output is correct |
11 |
Correct |
95 ms |
16956 KB |
Output is correct |
12 |
Correct |
20 ms |
4820 KB |
Output is correct |
13 |
Correct |
221 ms |
10648 KB |
Output is correct |
14 |
Correct |
3 ms |
468 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
166 ms |
31360 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 |
466 ms |
69188 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
596 KB |
Output is correct |
26 |
Correct |
10 ms |
892 KB |
Output is correct |
27 |
Correct |
5 ms |
724 KB |
Output is correct |
28 |
Correct |
146 ms |
27840 KB |
Output is correct |
29 |
Correct |
254 ms |
41648 KB |
Output is correct |
30 |
Correct |
342 ms |
51288 KB |
Output is correct |
31 |
Correct |
484 ms |
69108 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
1 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 |
1 ms |
212 KB |
Output is correct |
39 |
Correct |
0 ms |
212 KB |
Output is correct |
40 |
Correct |
0 ms |
212 KB |
Output is correct |
41 |
Correct |
0 ms |
212 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
6 ms |
596 KB |
Output is correct |
44 |
Correct |
5 ms |
724 KB |
Output is correct |
45 |
Correct |
186 ms |
31280 KB |
Output is correct |
46 |
Correct |
273 ms |
40996 KB |
Output is correct |
47 |
Correct |
285 ms |
44448 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 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 |
164 ms |
30052 KB |
Output is correct |
10 |
Correct |
13 ms |
3620 KB |
Output is correct |
11 |
Correct |
95 ms |
16956 KB |
Output is correct |
12 |
Correct |
20 ms |
4820 KB |
Output is correct |
13 |
Correct |
221 ms |
10648 KB |
Output is correct |
14 |
Correct |
3 ms |
468 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
166 ms |
31360 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 |
466 ms |
69188 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
596 KB |
Output is correct |
26 |
Correct |
10 ms |
892 KB |
Output is correct |
27 |
Correct |
5 ms |
724 KB |
Output is correct |
28 |
Correct |
146 ms |
27840 KB |
Output is correct |
29 |
Correct |
254 ms |
41648 KB |
Output is correct |
30 |
Correct |
342 ms |
51288 KB |
Output is correct |
31 |
Correct |
484 ms |
69108 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
1 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 |
1 ms |
212 KB |
Output is correct |
39 |
Correct |
0 ms |
212 KB |
Output is correct |
40 |
Correct |
0 ms |
212 KB |
Output is correct |
41 |
Correct |
0 ms |
212 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
6 ms |
596 KB |
Output is correct |
44 |
Correct |
5 ms |
724 KB |
Output is correct |
45 |
Correct |
186 ms |
31280 KB |
Output is correct |
46 |
Correct |
273 ms |
40996 KB |
Output is correct |
47 |
Correct |
285 ms |
44448 KB |
Output is correct |
48 |
Correct |
0 ms |
212 KB |
Output is correct |
49 |
Correct |
0 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 |
0 ms |
212 KB |
Output is correct |
53 |
Correct |
1 ms |
212 KB |
Output is correct |
54 |
Correct |
0 ms |
212 KB |
Output is correct |
55 |
Correct |
484 ms |
68772 KB |
Output is correct |
56 |
Correct |
0 ms |
212 KB |
Output is correct |
57 |
Correct |
3 ms |
852 KB |
Output is correct |
58 |
Correct |
8 ms |
2260 KB |
Output is correct |
59 |
Correct |
15 ms |
1604 KB |
Output is correct |
60 |
Correct |
203 ms |
32896 KB |
Output is correct |
61 |
Correct |
295 ms |
46008 KB |
Output is correct |
62 |
Correct |
356 ms |
47652 KB |
Output is correct |
63 |
Correct |
464 ms |
63936 KB |
Output is correct |
64 |
Correct |
1 ms |
212 KB |
Output is correct |
65 |
Correct |
0 ms |
212 KB |
Output is correct |
66 |
Correct |
1 ms |
212 KB |
Output is correct |
67 |
Correct |
379 ms |
66028 KB |
Output is correct |
68 |
Correct |
365 ms |
62216 KB |
Output is correct |
69 |
Correct |
406 ms |
58016 KB |
Output is correct |
70 |
Correct |
15 ms |
968 KB |
Output is correct |
71 |
Correct |
15 ms |
1296 KB |
Output is correct |
72 |
Correct |
200 ms |
29064 KB |
Output is correct |
73 |
Correct |
291 ms |
41236 KB |
Output is correct |
74 |
Correct |
411 ms |
54772 KB |
Output is correct |
75 |
Correct |
457 ms |
64164 KB |
Output is correct |
76 |
Correct |
421 ms |
69180 KB |
Output is correct |
77 |
Correct |
16 ms |
1108 KB |
Output is correct |
78 |
Correct |
21 ms |
1584 KB |
Output is correct |
79 |
Correct |
179 ms |
26936 KB |
Output is correct |
80 |
Correct |
282 ms |
40880 KB |
Output is correct |
81 |
Correct |
408 ms |
55088 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 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 |
164 ms |
30052 KB |
Output is correct |
10 |
Correct |
13 ms |
3620 KB |
Output is correct |
11 |
Correct |
95 ms |
16956 KB |
Output is correct |
12 |
Correct |
20 ms |
4820 KB |
Output is correct |
13 |
Correct |
221 ms |
10648 KB |
Output is correct |
14 |
Correct |
3 ms |
468 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
166 ms |
31360 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 |
411 ms |
66252 KB |
Output is correct |
21 |
Correct |
427 ms |
63120 KB |
Output is correct |
22 |
Correct |
450 ms |
57220 KB |
Output is correct |
23 |
Correct |
326 ms |
52768 KB |
Output is correct |
24 |
Correct |
126 ms |
15908 KB |
Output is correct |
25 |
Correct |
94 ms |
15924 KB |
Output is correct |
26 |
Correct |
104 ms |
15988 KB |
Output is correct |
27 |
Correct |
306 ms |
44268 KB |
Output is correct |
28 |
Correct |
315 ms |
44284 KB |
Output is correct |
29 |
Correct |
471 ms |
44268 KB |
Output is correct |
30 |
Correct |
474 ms |
44224 KB |
Output is correct |
31 |
Correct |
0 ms |
212 KB |
Output is correct |
32 |
Correct |
23 ms |
4644 KB |
Output is correct |
33 |
Correct |
39 ms |
8096 KB |
Output is correct |
34 |
Correct |
412 ms |
58944 KB |
Output is correct |
35 |
Correct |
38 ms |
1656 KB |
Output is correct |
36 |
Correct |
101 ms |
5508 KB |
Output is correct |
37 |
Correct |
123 ms |
9248 KB |
Output is correct |
38 |
Correct |
147 ms |
18064 KB |
Output is correct |
39 |
Correct |
201 ms |
24660 KB |
Output is correct |
40 |
Correct |
264 ms |
31348 KB |
Output is correct |
41 |
Correct |
334 ms |
38120 KB |
Output is correct |
42 |
Correct |
401 ms |
44764 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 |
0 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 |
179 ms |
31360 KB |
Output is correct |
57 |
Correct |
277 ms |
40876 KB |
Output is correct |
58 |
Correct |
289 ms |
44584 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 |
410 ms |
66036 KB |
Output is correct |
63 |
Correct |
379 ms |
62280 KB |
Output is correct |
64 |
Correct |
388 ms |
58016 KB |
Output is correct |
65 |
Correct |
13 ms |
960 KB |
Output is correct |
66 |
Correct |
19 ms |
1364 KB |
Output is correct |
67 |
Correct |
174 ms |
29056 KB |
Output is correct |
68 |
Correct |
290 ms |
41132 KB |
Output is correct |
69 |
Correct |
418 ms |
54820 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 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 |
164 ms |
30052 KB |
Output is correct |
10 |
Correct |
13 ms |
3620 KB |
Output is correct |
11 |
Correct |
95 ms |
16956 KB |
Output is correct |
12 |
Correct |
20 ms |
4820 KB |
Output is correct |
13 |
Correct |
221 ms |
10648 KB |
Output is correct |
14 |
Correct |
3 ms |
468 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
166 ms |
31360 KB |
Output is correct |
17 |
Correct |
414 ms |
69172 KB |
Output is correct |
18 |
Correct |
416 ms |
61544 KB |
Output is correct |
19 |
Correct |
416 ms |
69400 KB |
Output is correct |
20 |
Correct |
456 ms |
59700 KB |
Output is correct |
21 |
Correct |
378 ms |
50960 KB |
Output is correct |
22 |
Correct |
0 ms |
212 KB |
Output is correct |
23 |
Correct |
60 ms |
8652 KB |
Output is correct |
24 |
Correct |
94 ms |
3792 KB |
Output is correct |
25 |
Correct |
144 ms |
8168 KB |
Output is correct |
26 |
Correct |
163 ms |
11876 KB |
Output is correct |
27 |
Correct |
216 ms |
30552 KB |
Output is correct |
28 |
Correct |
275 ms |
38108 KB |
Output is correct |
29 |
Correct |
357 ms |
45852 KB |
Output is correct |
30 |
Correct |
433 ms |
53196 KB |
Output is correct |
31 |
Correct |
481 ms |
60608 KB |
Output is correct |
32 |
Correct |
415 ms |
64160 KB |
Output is correct |
33 |
Correct |
402 ms |
69152 KB |
Output is correct |
34 |
Correct |
16 ms |
1108 KB |
Output is correct |
35 |
Correct |
21 ms |
1588 KB |
Output is correct |
36 |
Correct |
171 ms |
27000 KB |
Output is correct |
37 |
Correct |
287 ms |
40824 KB |
Output is correct |
38 |
Correct |
387 ms |
55068 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 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 |
164 ms |
30052 KB |
Output is correct |
10 |
Correct |
13 ms |
3620 KB |
Output is correct |
11 |
Correct |
95 ms |
16956 KB |
Output is correct |
12 |
Correct |
20 ms |
4820 KB |
Output is correct |
13 |
Correct |
221 ms |
10648 KB |
Output is correct |
14 |
Correct |
3 ms |
468 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
166 ms |
31360 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 |
466 ms |
69188 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
596 KB |
Output is correct |
26 |
Correct |
10 ms |
892 KB |
Output is correct |
27 |
Correct |
5 ms |
724 KB |
Output is correct |
28 |
Correct |
146 ms |
27840 KB |
Output is correct |
29 |
Correct |
254 ms |
41648 KB |
Output is correct |
30 |
Correct |
342 ms |
51288 KB |
Output is correct |
31 |
Correct |
484 ms |
69108 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
1 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 |
1 ms |
212 KB |
Output is correct |
39 |
Correct |
0 ms |
212 KB |
Output is correct |
40 |
Correct |
0 ms |
212 KB |
Output is correct |
41 |
Correct |
0 ms |
212 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
6 ms |
596 KB |
Output is correct |
44 |
Correct |
5 ms |
724 KB |
Output is correct |
45 |
Correct |
186 ms |
31280 KB |
Output is correct |
46 |
Correct |
273 ms |
40996 KB |
Output is correct |
47 |
Correct |
285 ms |
44448 KB |
Output is correct |
48 |
Correct |
0 ms |
212 KB |
Output is correct |
49 |
Correct |
0 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 |
0 ms |
212 KB |
Output is correct |
53 |
Correct |
1 ms |
212 KB |
Output is correct |
54 |
Correct |
0 ms |
212 KB |
Output is correct |
55 |
Correct |
484 ms |
68772 KB |
Output is correct |
56 |
Correct |
0 ms |
212 KB |
Output is correct |
57 |
Correct |
3 ms |
852 KB |
Output is correct |
58 |
Correct |
8 ms |
2260 KB |
Output is correct |
59 |
Correct |
15 ms |
1604 KB |
Output is correct |
60 |
Correct |
203 ms |
32896 KB |
Output is correct |
61 |
Correct |
295 ms |
46008 KB |
Output is correct |
62 |
Correct |
356 ms |
47652 KB |
Output is correct |
63 |
Correct |
464 ms |
63936 KB |
Output is correct |
64 |
Correct |
1 ms |
212 KB |
Output is correct |
65 |
Correct |
0 ms |
212 KB |
Output is correct |
66 |
Correct |
1 ms |
212 KB |
Output is correct |
67 |
Correct |
379 ms |
66028 KB |
Output is correct |
68 |
Correct |
365 ms |
62216 KB |
Output is correct |
69 |
Correct |
406 ms |
58016 KB |
Output is correct |
70 |
Correct |
15 ms |
968 KB |
Output is correct |
71 |
Correct |
15 ms |
1296 KB |
Output is correct |
72 |
Correct |
200 ms |
29064 KB |
Output is correct |
73 |
Correct |
291 ms |
41236 KB |
Output is correct |
74 |
Correct |
411 ms |
54772 KB |
Output is correct |
75 |
Correct |
457 ms |
64164 KB |
Output is correct |
76 |
Correct |
421 ms |
69180 KB |
Output is correct |
77 |
Correct |
16 ms |
1108 KB |
Output is correct |
78 |
Correct |
21 ms |
1584 KB |
Output is correct |
79 |
Correct |
179 ms |
26936 KB |
Output is correct |
80 |
Correct |
282 ms |
40880 KB |
Output is correct |
81 |
Correct |
408 ms |
55088 KB |
Output is correct |
82 |
Correct |
0 ms |
212 KB |
Output is correct |
83 |
Correct |
0 ms |
212 KB |
Output is correct |
84 |
Correct |
0 ms |
212 KB |
Output is correct |
85 |
Correct |
411 ms |
66252 KB |
Output is correct |
86 |
Correct |
427 ms |
63120 KB |
Output is correct |
87 |
Correct |
450 ms |
57220 KB |
Output is correct |
88 |
Correct |
326 ms |
52768 KB |
Output is correct |
89 |
Correct |
126 ms |
15908 KB |
Output is correct |
90 |
Correct |
94 ms |
15924 KB |
Output is correct |
91 |
Correct |
104 ms |
15988 KB |
Output is correct |
92 |
Correct |
306 ms |
44268 KB |
Output is correct |
93 |
Correct |
315 ms |
44284 KB |
Output is correct |
94 |
Correct |
471 ms |
44268 KB |
Output is correct |
95 |
Correct |
474 ms |
44224 KB |
Output is correct |
96 |
Correct |
0 ms |
212 KB |
Output is correct |
97 |
Correct |
23 ms |
4644 KB |
Output is correct |
98 |
Correct |
39 ms |
8096 KB |
Output is correct |
99 |
Correct |
412 ms |
58944 KB |
Output is correct |
100 |
Correct |
38 ms |
1656 KB |
Output is correct |
101 |
Correct |
101 ms |
5508 KB |
Output is correct |
102 |
Correct |
123 ms |
9248 KB |
Output is correct |
103 |
Correct |
147 ms |
18064 KB |
Output is correct |
104 |
Correct |
201 ms |
24660 KB |
Output is correct |
105 |
Correct |
264 ms |
31348 KB |
Output is correct |
106 |
Correct |
334 ms |
38120 KB |
Output is correct |
107 |
Correct |
401 ms |
44764 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 |
0 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 |
179 ms |
31360 KB |
Output is correct |
122 |
Correct |
277 ms |
40876 KB |
Output is correct |
123 |
Correct |
289 ms |
44584 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 |
410 ms |
66036 KB |
Output is correct |
128 |
Correct |
379 ms |
62280 KB |
Output is correct |
129 |
Correct |
388 ms |
58016 KB |
Output is correct |
130 |
Correct |
13 ms |
960 KB |
Output is correct |
131 |
Correct |
19 ms |
1364 KB |
Output is correct |
132 |
Correct |
174 ms |
29056 KB |
Output is correct |
133 |
Correct |
290 ms |
41132 KB |
Output is correct |
134 |
Correct |
418 ms |
54820 KB |
Output is correct |
135 |
Correct |
414 ms |
69172 KB |
Output is correct |
136 |
Correct |
416 ms |
61544 KB |
Output is correct |
137 |
Correct |
416 ms |
69400 KB |
Output is correct |
138 |
Correct |
456 ms |
59700 KB |
Output is correct |
139 |
Correct |
378 ms |
50960 KB |
Output is correct |
140 |
Correct |
0 ms |
212 KB |
Output is correct |
141 |
Correct |
60 ms |
8652 KB |
Output is correct |
142 |
Correct |
94 ms |
3792 KB |
Output is correct |
143 |
Correct |
144 ms |
8168 KB |
Output is correct |
144 |
Correct |
163 ms |
11876 KB |
Output is correct |
145 |
Correct |
216 ms |
30552 KB |
Output is correct |
146 |
Correct |
275 ms |
38108 KB |
Output is correct |
147 |
Correct |
357 ms |
45852 KB |
Output is correct |
148 |
Correct |
433 ms |
53196 KB |
Output is correct |
149 |
Correct |
481 ms |
60608 KB |
Output is correct |
150 |
Correct |
415 ms |
64160 KB |
Output is correct |
151 |
Correct |
402 ms |
69152 KB |
Output is correct |
152 |
Correct |
16 ms |
1108 KB |
Output is correct |
153 |
Correct |
21 ms |
1588 KB |
Output is correct |
154 |
Correct |
171 ms |
27000 KB |
Output is correct |
155 |
Correct |
287 ms |
40824 KB |
Output is correct |
156 |
Correct |
387 ms |
55068 KB |
Output is correct |
157 |
Correct |
0 ms |
212 KB |
Output is correct |
158 |
Correct |
1 ms |
212 KB |
Output is correct |
159 |
Correct |
0 ms |
212 KB |
Output is correct |
160 |
Correct |
1 ms |
212 KB |
Output is correct |
161 |
Correct |
469 ms |
69200 KB |
Output is correct |
162 |
Correct |
396 ms |
66748 KB |
Output is correct |
163 |
Correct |
402 ms |
60876 KB |
Output is correct |
164 |
Correct |
394 ms |
59384 KB |
Output is correct |
165 |
Correct |
462 ms |
66620 KB |
Output is correct |
166 |
Incorrect |
3464 ms |
61044 KB |
Solution announced impossible, but it is possible. |
167 |
Halted |
0 ms |
0 KB |
- |