#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(6969);
n = xs.size();
for (int i = 0; i < n; i++) {
mp[{xs[i], ys[i]}] = i;
}
for (int tst = 0; tst < 7; 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) {
| ~~~~~~~~~^~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 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 |
0 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 |
184 ms |
30468 KB |
Output is correct |
10 |
Correct |
13 ms |
3412 KB |
Output is correct |
11 |
Correct |
82 ms |
16292 KB |
Output is correct |
12 |
Correct |
20 ms |
5056 KB |
Output is correct |
13 |
Correct |
198 ms |
10648 KB |
Output is correct |
14 |
Correct |
3 ms |
584 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
166 ms |
30676 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 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 |
0 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 |
184 ms |
30468 KB |
Output is correct |
10 |
Correct |
13 ms |
3412 KB |
Output is correct |
11 |
Correct |
82 ms |
16292 KB |
Output is correct |
12 |
Correct |
20 ms |
5056 KB |
Output is correct |
13 |
Correct |
198 ms |
10648 KB |
Output is correct |
14 |
Correct |
3 ms |
584 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
166 ms |
30676 KB |
Output is correct |
17 |
Correct |
0 ms |
336 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 |
446 ms |
58876 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
724 KB |
Output is correct |
26 |
Correct |
8 ms |
852 KB |
Output is correct |
27 |
Correct |
5 ms |
780 KB |
Output is correct |
28 |
Correct |
144 ms |
27848 KB |
Output is correct |
29 |
Correct |
232 ms |
39492 KB |
Output is correct |
30 |
Correct |
352 ms |
45956 KB |
Output is correct |
31 |
Correct |
437 ms |
69208 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 |
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 |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
6 ms |
596 KB |
Output is correct |
44 |
Correct |
4 ms |
596 KB |
Output is correct |
45 |
Correct |
168 ms |
28540 KB |
Output is correct |
46 |
Correct |
272 ms |
41780 KB |
Output is correct |
47 |
Correct |
270 ms |
41544 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 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 |
0 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 |
184 ms |
30468 KB |
Output is correct |
10 |
Correct |
13 ms |
3412 KB |
Output is correct |
11 |
Correct |
82 ms |
16292 KB |
Output is correct |
12 |
Correct |
20 ms |
5056 KB |
Output is correct |
13 |
Correct |
198 ms |
10648 KB |
Output is correct |
14 |
Correct |
3 ms |
584 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
166 ms |
30676 KB |
Output is correct |
17 |
Correct |
0 ms |
336 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 |
446 ms |
58876 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
724 KB |
Output is correct |
26 |
Correct |
8 ms |
852 KB |
Output is correct |
27 |
Correct |
5 ms |
780 KB |
Output is correct |
28 |
Correct |
144 ms |
27848 KB |
Output is correct |
29 |
Correct |
232 ms |
39492 KB |
Output is correct |
30 |
Correct |
352 ms |
45956 KB |
Output is correct |
31 |
Correct |
437 ms |
69208 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 |
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 |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
6 ms |
596 KB |
Output is correct |
44 |
Correct |
4 ms |
596 KB |
Output is correct |
45 |
Correct |
168 ms |
28540 KB |
Output is correct |
46 |
Correct |
272 ms |
41780 KB |
Output is correct |
47 |
Correct |
270 ms |
41544 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 |
1 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 |
439 ms |
58480 KB |
Output is correct |
56 |
Correct |
0 ms |
212 KB |
Output is correct |
57 |
Correct |
3 ms |
852 KB |
Output is correct |
58 |
Correct |
9 ms |
2308 KB |
Output is correct |
59 |
Correct |
14 ms |
1508 KB |
Output is correct |
60 |
Correct |
187 ms |
29636 KB |
Output is correct |
61 |
Correct |
283 ms |
41020 KB |
Output is correct |
62 |
Correct |
362 ms |
49936 KB |
Output is correct |
63 |
Correct |
445 ms |
67292 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 |
407 ms |
57668 KB |
Output is correct |
68 |
Correct |
381 ms |
62564 KB |
Output is correct |
69 |
Correct |
386 ms |
61408 KB |
Output is correct |
70 |
Correct |
11 ms |
980 KB |
Output is correct |
71 |
Correct |
13 ms |
1292 KB |
Output is correct |
72 |
Correct |
177 ms |
27676 KB |
Output is correct |
73 |
Correct |
305 ms |
42748 KB |
Output is correct |
74 |
Correct |
424 ms |
59056 KB |
Output is correct |
75 |
Correct |
408 ms |
57792 KB |
Output is correct |
76 |
Correct |
384 ms |
69220 KB |
Output is correct |
77 |
Correct |
14 ms |
1108 KB |
Output is correct |
78 |
Correct |
14 ms |
1452 KB |
Output is correct |
79 |
Correct |
174 ms |
26012 KB |
Output is correct |
80 |
Correct |
296 ms |
39936 KB |
Output is correct |
81 |
Correct |
397 ms |
53872 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 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 |
0 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 |
184 ms |
30468 KB |
Output is correct |
10 |
Correct |
13 ms |
3412 KB |
Output is correct |
11 |
Correct |
82 ms |
16292 KB |
Output is correct |
12 |
Correct |
20 ms |
5056 KB |
Output is correct |
13 |
Correct |
198 ms |
10648 KB |
Output is correct |
14 |
Correct |
3 ms |
584 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
166 ms |
30676 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 |
398 ms |
60556 KB |
Output is correct |
21 |
Correct |
412 ms |
58592 KB |
Output is correct |
22 |
Correct |
429 ms |
66208 KB |
Output is correct |
23 |
Correct |
325 ms |
53088 KB |
Output is correct |
24 |
Correct |
94 ms |
15948 KB |
Output is correct |
25 |
Correct |
116 ms |
16048 KB |
Output is correct |
26 |
Correct |
101 ms |
15996 KB |
Output is correct |
27 |
Correct |
303 ms |
44324 KB |
Output is correct |
28 |
Correct |
299 ms |
44344 KB |
Output is correct |
29 |
Correct |
460 ms |
44320 KB |
Output is correct |
30 |
Correct |
471 ms |
44280 KB |
Output is correct |
31 |
Correct |
0 ms |
212 KB |
Output is correct |
32 |
Correct |
23 ms |
4692 KB |
Output is correct |
33 |
Correct |
39 ms |
8012 KB |
Output is correct |
34 |
Correct |
396 ms |
59176 KB |
Output is correct |
35 |
Correct |
34 ms |
1620 KB |
Output is correct |
36 |
Correct |
85 ms |
5360 KB |
Output is correct |
37 |
Correct |
109 ms |
9344 KB |
Output is correct |
38 |
Correct |
147 ms |
18020 KB |
Output is correct |
39 |
Correct |
196 ms |
24656 KB |
Output is correct |
40 |
Correct |
263 ms |
31320 KB |
Output is correct |
41 |
Correct |
331 ms |
38052 KB |
Output is correct |
42 |
Correct |
389 ms |
44660 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 |
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 |
0 ms |
212 KB |
Output is correct |
54 |
Correct |
5 ms |
624 KB |
Output is correct |
55 |
Correct |
4 ms |
596 KB |
Output is correct |
56 |
Correct |
174 ms |
28456 KB |
Output is correct |
57 |
Correct |
258 ms |
41804 KB |
Output is correct |
58 |
Correct |
260 ms |
41632 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 |
390 ms |
57612 KB |
Output is correct |
63 |
Correct |
398 ms |
62600 KB |
Output is correct |
64 |
Correct |
387 ms |
61436 KB |
Output is correct |
65 |
Correct |
11 ms |
980 KB |
Output is correct |
66 |
Correct |
13 ms |
1288 KB |
Output is correct |
67 |
Correct |
179 ms |
27684 KB |
Output is correct |
68 |
Correct |
292 ms |
42728 KB |
Output is correct |
69 |
Correct |
412 ms |
59168 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 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 |
0 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 |
184 ms |
30468 KB |
Output is correct |
10 |
Correct |
13 ms |
3412 KB |
Output is correct |
11 |
Correct |
82 ms |
16292 KB |
Output is correct |
12 |
Correct |
20 ms |
5056 KB |
Output is correct |
13 |
Correct |
198 ms |
10648 KB |
Output is correct |
14 |
Correct |
3 ms |
584 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
166 ms |
30676 KB |
Output is correct |
17 |
Correct |
413 ms |
69204 KB |
Output is correct |
18 |
Correct |
393 ms |
63040 KB |
Output is correct |
19 |
Correct |
399 ms |
69440 KB |
Output is correct |
20 |
Correct |
459 ms |
59724 KB |
Output is correct |
21 |
Correct |
375 ms |
51044 KB |
Output is correct |
22 |
Correct |
0 ms |
212 KB |
Output is correct |
23 |
Correct |
56 ms |
8524 KB |
Output is correct |
24 |
Correct |
83 ms |
3796 KB |
Output is correct |
25 |
Correct |
134 ms |
8140 KB |
Output is correct |
26 |
Correct |
141 ms |
11872 KB |
Output is correct |
27 |
Correct |
207 ms |
30520 KB |
Output is correct |
28 |
Correct |
283 ms |
38056 KB |
Output is correct |
29 |
Correct |
338 ms |
45724 KB |
Output is correct |
30 |
Correct |
398 ms |
52972 KB |
Output is correct |
31 |
Correct |
466 ms |
60840 KB |
Output is correct |
32 |
Correct |
423 ms |
57872 KB |
Output is correct |
33 |
Correct |
407 ms |
69248 KB |
Output is correct |
34 |
Correct |
18 ms |
1132 KB |
Output is correct |
35 |
Correct |
14 ms |
1492 KB |
Output is correct |
36 |
Correct |
181 ms |
26044 KB |
Output is correct |
37 |
Correct |
291 ms |
40000 KB |
Output is correct |
38 |
Correct |
400 ms |
53860 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 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 |
0 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 |
184 ms |
30468 KB |
Output is correct |
10 |
Correct |
13 ms |
3412 KB |
Output is correct |
11 |
Correct |
82 ms |
16292 KB |
Output is correct |
12 |
Correct |
20 ms |
5056 KB |
Output is correct |
13 |
Correct |
198 ms |
10648 KB |
Output is correct |
14 |
Correct |
3 ms |
584 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
166 ms |
30676 KB |
Output is correct |
17 |
Correct |
0 ms |
336 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 |
446 ms |
58876 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
724 KB |
Output is correct |
26 |
Correct |
8 ms |
852 KB |
Output is correct |
27 |
Correct |
5 ms |
780 KB |
Output is correct |
28 |
Correct |
144 ms |
27848 KB |
Output is correct |
29 |
Correct |
232 ms |
39492 KB |
Output is correct |
30 |
Correct |
352 ms |
45956 KB |
Output is correct |
31 |
Correct |
437 ms |
69208 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 |
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 |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
6 ms |
596 KB |
Output is correct |
44 |
Correct |
4 ms |
596 KB |
Output is correct |
45 |
Correct |
168 ms |
28540 KB |
Output is correct |
46 |
Correct |
272 ms |
41780 KB |
Output is correct |
47 |
Correct |
270 ms |
41544 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 |
1 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 |
439 ms |
58480 KB |
Output is correct |
56 |
Correct |
0 ms |
212 KB |
Output is correct |
57 |
Correct |
3 ms |
852 KB |
Output is correct |
58 |
Correct |
9 ms |
2308 KB |
Output is correct |
59 |
Correct |
14 ms |
1508 KB |
Output is correct |
60 |
Correct |
187 ms |
29636 KB |
Output is correct |
61 |
Correct |
283 ms |
41020 KB |
Output is correct |
62 |
Correct |
362 ms |
49936 KB |
Output is correct |
63 |
Correct |
445 ms |
67292 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 |
407 ms |
57668 KB |
Output is correct |
68 |
Correct |
381 ms |
62564 KB |
Output is correct |
69 |
Correct |
386 ms |
61408 KB |
Output is correct |
70 |
Correct |
11 ms |
980 KB |
Output is correct |
71 |
Correct |
13 ms |
1292 KB |
Output is correct |
72 |
Correct |
177 ms |
27676 KB |
Output is correct |
73 |
Correct |
305 ms |
42748 KB |
Output is correct |
74 |
Correct |
424 ms |
59056 KB |
Output is correct |
75 |
Correct |
408 ms |
57792 KB |
Output is correct |
76 |
Correct |
384 ms |
69220 KB |
Output is correct |
77 |
Correct |
14 ms |
1108 KB |
Output is correct |
78 |
Correct |
14 ms |
1452 KB |
Output is correct |
79 |
Correct |
174 ms |
26012 KB |
Output is correct |
80 |
Correct |
296 ms |
39936 KB |
Output is correct |
81 |
Correct |
397 ms |
53872 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 |
398 ms |
60556 KB |
Output is correct |
86 |
Correct |
412 ms |
58592 KB |
Output is correct |
87 |
Correct |
429 ms |
66208 KB |
Output is correct |
88 |
Correct |
325 ms |
53088 KB |
Output is correct |
89 |
Correct |
94 ms |
15948 KB |
Output is correct |
90 |
Correct |
116 ms |
16048 KB |
Output is correct |
91 |
Correct |
101 ms |
15996 KB |
Output is correct |
92 |
Correct |
303 ms |
44324 KB |
Output is correct |
93 |
Correct |
299 ms |
44344 KB |
Output is correct |
94 |
Correct |
460 ms |
44320 KB |
Output is correct |
95 |
Correct |
471 ms |
44280 KB |
Output is correct |
96 |
Correct |
0 ms |
212 KB |
Output is correct |
97 |
Correct |
23 ms |
4692 KB |
Output is correct |
98 |
Correct |
39 ms |
8012 KB |
Output is correct |
99 |
Correct |
396 ms |
59176 KB |
Output is correct |
100 |
Correct |
34 ms |
1620 KB |
Output is correct |
101 |
Correct |
85 ms |
5360 KB |
Output is correct |
102 |
Correct |
109 ms |
9344 KB |
Output is correct |
103 |
Correct |
147 ms |
18020 KB |
Output is correct |
104 |
Correct |
196 ms |
24656 KB |
Output is correct |
105 |
Correct |
263 ms |
31320 KB |
Output is correct |
106 |
Correct |
331 ms |
38052 KB |
Output is correct |
107 |
Correct |
389 ms |
44660 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 |
0 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 |
5 ms |
624 KB |
Output is correct |
120 |
Correct |
4 ms |
596 KB |
Output is correct |
121 |
Correct |
174 ms |
28456 KB |
Output is correct |
122 |
Correct |
258 ms |
41804 KB |
Output is correct |
123 |
Correct |
260 ms |
41632 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 |
390 ms |
57612 KB |
Output is correct |
128 |
Correct |
398 ms |
62600 KB |
Output is correct |
129 |
Correct |
387 ms |
61436 KB |
Output is correct |
130 |
Correct |
11 ms |
980 KB |
Output is correct |
131 |
Correct |
13 ms |
1288 KB |
Output is correct |
132 |
Correct |
179 ms |
27684 KB |
Output is correct |
133 |
Correct |
292 ms |
42728 KB |
Output is correct |
134 |
Correct |
412 ms |
59168 KB |
Output is correct |
135 |
Correct |
413 ms |
69204 KB |
Output is correct |
136 |
Correct |
393 ms |
63040 KB |
Output is correct |
137 |
Correct |
399 ms |
69440 KB |
Output is correct |
138 |
Correct |
459 ms |
59724 KB |
Output is correct |
139 |
Correct |
375 ms |
51044 KB |
Output is correct |
140 |
Correct |
0 ms |
212 KB |
Output is correct |
141 |
Correct |
56 ms |
8524 KB |
Output is correct |
142 |
Correct |
83 ms |
3796 KB |
Output is correct |
143 |
Correct |
134 ms |
8140 KB |
Output is correct |
144 |
Correct |
141 ms |
11872 KB |
Output is correct |
145 |
Correct |
207 ms |
30520 KB |
Output is correct |
146 |
Correct |
283 ms |
38056 KB |
Output is correct |
147 |
Correct |
338 ms |
45724 KB |
Output is correct |
148 |
Correct |
398 ms |
52972 KB |
Output is correct |
149 |
Correct |
466 ms |
60840 KB |
Output is correct |
150 |
Correct |
423 ms |
57872 KB |
Output is correct |
151 |
Correct |
407 ms |
69248 KB |
Output is correct |
152 |
Correct |
18 ms |
1132 KB |
Output is correct |
153 |
Correct |
14 ms |
1492 KB |
Output is correct |
154 |
Correct |
181 ms |
26044 KB |
Output is correct |
155 |
Correct |
291 ms |
40000 KB |
Output is correct |
156 |
Correct |
400 ms |
53860 KB |
Output is correct |
157 |
Correct |
1 ms |
212 KB |
Output is correct |
158 |
Correct |
0 ms |
212 KB |
Output is correct |
159 |
Correct |
0 ms |
212 KB |
Output is correct |
160 |
Correct |
0 ms |
212 KB |
Output is correct |
161 |
Correct |
486 ms |
69204 KB |
Output is correct |
162 |
Correct |
446 ms |
65780 KB |
Output is correct |
163 |
Correct |
410 ms |
54332 KB |
Output is correct |
164 |
Correct |
453 ms |
60592 KB |
Output is correct |
165 |
Correct |
2060 ms |
67464 KB |
Output is correct |
166 |
Correct |
2351 ms |
70396 KB |
Output is correct |
167 |
Incorrect |
515 ms |
12140 KB |
Solution announced impossible, but it is possible. |
168 |
Halted |
0 ms |
0 KB |
- |