#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 < 10; 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 |
1 ms |
296 KB |
Output is correct |
2 |
Correct |
0 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 |
300 KB |
Output is correct |
6 |
Correct |
0 ms |
300 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
179 ms |
30884 KB |
Output is correct |
10 |
Correct |
13 ms |
3796 KB |
Output is correct |
11 |
Correct |
84 ms |
17340 KB |
Output is correct |
12 |
Correct |
24 ms |
4940 KB |
Output is correct |
13 |
Correct |
307 ms |
11032 KB |
Output is correct |
14 |
Correct |
4 ms |
468 KB |
Output is correct |
15 |
Correct |
3 ms |
596 KB |
Output is correct |
16 |
Correct |
171 ms |
32084 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
296 KB |
Output is correct |
2 |
Correct |
0 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 |
300 KB |
Output is correct |
6 |
Correct |
0 ms |
300 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
179 ms |
30884 KB |
Output is correct |
10 |
Correct |
13 ms |
3796 KB |
Output is correct |
11 |
Correct |
84 ms |
17340 KB |
Output is correct |
12 |
Correct |
24 ms |
4940 KB |
Output is correct |
13 |
Correct |
307 ms |
11032 KB |
Output is correct |
14 |
Correct |
4 ms |
468 KB |
Output is correct |
15 |
Correct |
3 ms |
596 KB |
Output is correct |
16 |
Correct |
171 ms |
32084 KB |
Output is correct |
17 |
Correct |
1 ms |
212 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
0 ms |
212 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
0 ms |
212 KB |
Output is correct |
23 |
Correct |
468 ms |
70104 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
596 KB |
Output is correct |
26 |
Correct |
14 ms |
920 KB |
Output is correct |
27 |
Correct |
7 ms |
820 KB |
Output is correct |
28 |
Correct |
185 ms |
28448 KB |
Output is correct |
29 |
Correct |
272 ms |
42504 KB |
Output is correct |
30 |
Correct |
360 ms |
52212 KB |
Output is correct |
31 |
Correct |
463 ms |
70028 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
1 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 |
1 ms |
212 KB |
Output is correct |
40 |
Correct |
0 ms |
296 KB |
Output is correct |
41 |
Correct |
0 ms |
212 KB |
Output is correct |
42 |
Correct |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
7 ms |
664 KB |
Output is correct |
44 |
Correct |
5 ms |
604 KB |
Output is correct |
45 |
Correct |
184 ms |
32220 KB |
Output is correct |
46 |
Correct |
298 ms |
41848 KB |
Output is correct |
47 |
Correct |
356 ms |
45304 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
296 KB |
Output is correct |
2 |
Correct |
0 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 |
300 KB |
Output is correct |
6 |
Correct |
0 ms |
300 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
179 ms |
30884 KB |
Output is correct |
10 |
Correct |
13 ms |
3796 KB |
Output is correct |
11 |
Correct |
84 ms |
17340 KB |
Output is correct |
12 |
Correct |
24 ms |
4940 KB |
Output is correct |
13 |
Correct |
307 ms |
11032 KB |
Output is correct |
14 |
Correct |
4 ms |
468 KB |
Output is correct |
15 |
Correct |
3 ms |
596 KB |
Output is correct |
16 |
Correct |
171 ms |
32084 KB |
Output is correct |
17 |
Correct |
1 ms |
212 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
0 ms |
212 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
0 ms |
212 KB |
Output is correct |
23 |
Correct |
468 ms |
70104 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
596 KB |
Output is correct |
26 |
Correct |
14 ms |
920 KB |
Output is correct |
27 |
Correct |
7 ms |
820 KB |
Output is correct |
28 |
Correct |
185 ms |
28448 KB |
Output is correct |
29 |
Correct |
272 ms |
42504 KB |
Output is correct |
30 |
Correct |
360 ms |
52212 KB |
Output is correct |
31 |
Correct |
463 ms |
70028 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
1 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 |
1 ms |
212 KB |
Output is correct |
40 |
Correct |
0 ms |
296 KB |
Output is correct |
41 |
Correct |
0 ms |
212 KB |
Output is correct |
42 |
Correct |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
7 ms |
664 KB |
Output is correct |
44 |
Correct |
5 ms |
604 KB |
Output is correct |
45 |
Correct |
184 ms |
32220 KB |
Output is correct |
46 |
Correct |
298 ms |
41848 KB |
Output is correct |
47 |
Correct |
356 ms |
45304 KB |
Output is correct |
48 |
Correct |
0 ms |
212 KB |
Output is correct |
49 |
Correct |
0 ms |
304 KB |
Output is correct |
50 |
Correct |
1 ms |
296 KB |
Output is correct |
51 |
Correct |
1 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 |
0 ms |
212 KB |
Output is correct |
55 |
Correct |
561 ms |
69684 KB |
Output is correct |
56 |
Correct |
1 ms |
300 KB |
Output is correct |
57 |
Correct |
3 ms |
852 KB |
Output is correct |
58 |
Correct |
9 ms |
2308 KB |
Output is correct |
59 |
Correct |
20 ms |
1608 KB |
Output is correct |
60 |
Correct |
218 ms |
33668 KB |
Output is correct |
61 |
Correct |
348 ms |
46912 KB |
Output is correct |
62 |
Correct |
382 ms |
48636 KB |
Output is correct |
63 |
Correct |
502 ms |
64820 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 |
296 KB |
Output is correct |
67 |
Correct |
411 ms |
66988 KB |
Output is correct |
68 |
Correct |
382 ms |
63172 KB |
Output is correct |
69 |
Correct |
476 ms |
58908 KB |
Output is correct |
70 |
Correct |
16 ms |
920 KB |
Output is correct |
71 |
Correct |
20 ms |
1312 KB |
Output is correct |
72 |
Correct |
184 ms |
29844 KB |
Output is correct |
73 |
Correct |
326 ms |
42124 KB |
Output is correct |
74 |
Correct |
403 ms |
55752 KB |
Output is correct |
75 |
Correct |
436 ms |
65060 KB |
Output is correct |
76 |
Correct |
413 ms |
70016 KB |
Output is correct |
77 |
Correct |
24 ms |
1152 KB |
Output is correct |
78 |
Correct |
27 ms |
1592 KB |
Output is correct |
79 |
Correct |
172 ms |
27728 KB |
Output is correct |
80 |
Correct |
303 ms |
41772 KB |
Output is correct |
81 |
Correct |
388 ms |
56000 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
296 KB |
Output is correct |
2 |
Correct |
0 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 |
300 KB |
Output is correct |
6 |
Correct |
0 ms |
300 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
179 ms |
30884 KB |
Output is correct |
10 |
Correct |
13 ms |
3796 KB |
Output is correct |
11 |
Correct |
84 ms |
17340 KB |
Output is correct |
12 |
Correct |
24 ms |
4940 KB |
Output is correct |
13 |
Correct |
307 ms |
11032 KB |
Output is correct |
14 |
Correct |
4 ms |
468 KB |
Output is correct |
15 |
Correct |
3 ms |
596 KB |
Output is correct |
16 |
Correct |
171 ms |
32084 KB |
Output is correct |
17 |
Correct |
1 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
300 KB |
Output is correct |
19 |
Correct |
1 ms |
296 KB |
Output is correct |
20 |
Correct |
419 ms |
67092 KB |
Output is correct |
21 |
Correct |
466 ms |
64068 KB |
Output is correct |
22 |
Correct |
418 ms |
58080 KB |
Output is correct |
23 |
Correct |
357 ms |
53672 KB |
Output is correct |
24 |
Correct |
97 ms |
16840 KB |
Output is correct |
25 |
Correct |
119 ms |
16876 KB |
Output is correct |
26 |
Correct |
95 ms |
16928 KB |
Output is correct |
27 |
Correct |
335 ms |
45196 KB |
Output is correct |
28 |
Correct |
328 ms |
45108 KB |
Output is correct |
29 |
Correct |
474 ms |
45200 KB |
Output is correct |
30 |
Correct |
468 ms |
45252 KB |
Output is correct |
31 |
Correct |
1 ms |
212 KB |
Output is correct |
32 |
Correct |
23 ms |
4788 KB |
Output is correct |
33 |
Correct |
41 ms |
8992 KB |
Output is correct |
34 |
Correct |
395 ms |
59844 KB |
Output is correct |
35 |
Correct |
48 ms |
1792 KB |
Output is correct |
36 |
Correct |
120 ms |
6128 KB |
Output is correct |
37 |
Correct |
144 ms |
10132 KB |
Output is correct |
38 |
Correct |
149 ms |
18956 KB |
Output is correct |
39 |
Correct |
209 ms |
25588 KB |
Output is correct |
40 |
Correct |
274 ms |
32196 KB |
Output is correct |
41 |
Correct |
338 ms |
39124 KB |
Output is correct |
42 |
Correct |
408 ms |
45680 KB |
Output is correct |
43 |
Correct |
1 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 |
300 KB |
Output is correct |
50 |
Correct |
0 ms |
212 KB |
Output is correct |
51 |
Correct |
1 ms |
212 KB |
Output is correct |
52 |
Correct |
1 ms |
212 KB |
Output is correct |
53 |
Correct |
0 ms |
300 KB |
Output is correct |
54 |
Correct |
7 ms |
596 KB |
Output is correct |
55 |
Correct |
5 ms |
596 KB |
Output is correct |
56 |
Correct |
219 ms |
32188 KB |
Output is correct |
57 |
Correct |
274 ms |
41856 KB |
Output is correct |
58 |
Correct |
291 ms |
45304 KB |
Output is correct |
59 |
Correct |
0 ms |
212 KB |
Output is correct |
60 |
Correct |
1 ms |
212 KB |
Output is correct |
61 |
Correct |
0 ms |
212 KB |
Output is correct |
62 |
Correct |
397 ms |
67024 KB |
Output is correct |
63 |
Correct |
380 ms |
63140 KB |
Output is correct |
64 |
Correct |
399 ms |
58956 KB |
Output is correct |
65 |
Correct |
16 ms |
980 KB |
Output is correct |
66 |
Correct |
18 ms |
1308 KB |
Output is correct |
67 |
Correct |
175 ms |
29856 KB |
Output is correct |
68 |
Correct |
293 ms |
42036 KB |
Output is correct |
69 |
Correct |
403 ms |
55684 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
296 KB |
Output is correct |
2 |
Correct |
0 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 |
300 KB |
Output is correct |
6 |
Correct |
0 ms |
300 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
179 ms |
30884 KB |
Output is correct |
10 |
Correct |
13 ms |
3796 KB |
Output is correct |
11 |
Correct |
84 ms |
17340 KB |
Output is correct |
12 |
Correct |
24 ms |
4940 KB |
Output is correct |
13 |
Correct |
307 ms |
11032 KB |
Output is correct |
14 |
Correct |
4 ms |
468 KB |
Output is correct |
15 |
Correct |
3 ms |
596 KB |
Output is correct |
16 |
Correct |
171 ms |
32084 KB |
Output is correct |
17 |
Correct |
421 ms |
70112 KB |
Output is correct |
18 |
Correct |
424 ms |
62460 KB |
Output is correct |
19 |
Correct |
434 ms |
70324 KB |
Output is correct |
20 |
Correct |
474 ms |
60596 KB |
Output is correct |
21 |
Correct |
383 ms |
51936 KB |
Output is correct |
22 |
Correct |
1 ms |
260 KB |
Output is correct |
23 |
Correct |
53 ms |
9032 KB |
Output is correct |
24 |
Correct |
126 ms |
4040 KB |
Output is correct |
25 |
Correct |
158 ms |
9064 KB |
Output is correct |
26 |
Correct |
184 ms |
12748 KB |
Output is correct |
27 |
Correct |
218 ms |
31412 KB |
Output is correct |
28 |
Correct |
290 ms |
39000 KB |
Output is correct |
29 |
Correct |
364 ms |
46788 KB |
Output is correct |
30 |
Correct |
403 ms |
54092 KB |
Output is correct |
31 |
Correct |
482 ms |
61596 KB |
Output is correct |
32 |
Correct |
449 ms |
65052 KB |
Output is correct |
33 |
Correct |
412 ms |
70164 KB |
Output is correct |
34 |
Correct |
20 ms |
1108 KB |
Output is correct |
35 |
Correct |
25 ms |
1684 KB |
Output is correct |
36 |
Correct |
176 ms |
27724 KB |
Output is correct |
37 |
Correct |
288 ms |
41752 KB |
Output is correct |
38 |
Correct |
418 ms |
56100 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
296 KB |
Output is correct |
2 |
Correct |
0 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 |
300 KB |
Output is correct |
6 |
Correct |
0 ms |
300 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
179 ms |
30884 KB |
Output is correct |
10 |
Correct |
13 ms |
3796 KB |
Output is correct |
11 |
Correct |
84 ms |
17340 KB |
Output is correct |
12 |
Correct |
24 ms |
4940 KB |
Output is correct |
13 |
Correct |
307 ms |
11032 KB |
Output is correct |
14 |
Correct |
4 ms |
468 KB |
Output is correct |
15 |
Correct |
3 ms |
596 KB |
Output is correct |
16 |
Correct |
171 ms |
32084 KB |
Output is correct |
17 |
Correct |
1 ms |
212 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
0 ms |
212 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
0 ms |
212 KB |
Output is correct |
23 |
Correct |
468 ms |
70104 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
596 KB |
Output is correct |
26 |
Correct |
14 ms |
920 KB |
Output is correct |
27 |
Correct |
7 ms |
820 KB |
Output is correct |
28 |
Correct |
185 ms |
28448 KB |
Output is correct |
29 |
Correct |
272 ms |
42504 KB |
Output is correct |
30 |
Correct |
360 ms |
52212 KB |
Output is correct |
31 |
Correct |
463 ms |
70028 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
1 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 |
1 ms |
212 KB |
Output is correct |
40 |
Correct |
0 ms |
296 KB |
Output is correct |
41 |
Correct |
0 ms |
212 KB |
Output is correct |
42 |
Correct |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
7 ms |
664 KB |
Output is correct |
44 |
Correct |
5 ms |
604 KB |
Output is correct |
45 |
Correct |
184 ms |
32220 KB |
Output is correct |
46 |
Correct |
298 ms |
41848 KB |
Output is correct |
47 |
Correct |
356 ms |
45304 KB |
Output is correct |
48 |
Correct |
0 ms |
212 KB |
Output is correct |
49 |
Correct |
0 ms |
304 KB |
Output is correct |
50 |
Correct |
1 ms |
296 KB |
Output is correct |
51 |
Correct |
1 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 |
0 ms |
212 KB |
Output is correct |
55 |
Correct |
561 ms |
69684 KB |
Output is correct |
56 |
Correct |
1 ms |
300 KB |
Output is correct |
57 |
Correct |
3 ms |
852 KB |
Output is correct |
58 |
Correct |
9 ms |
2308 KB |
Output is correct |
59 |
Correct |
20 ms |
1608 KB |
Output is correct |
60 |
Correct |
218 ms |
33668 KB |
Output is correct |
61 |
Correct |
348 ms |
46912 KB |
Output is correct |
62 |
Correct |
382 ms |
48636 KB |
Output is correct |
63 |
Correct |
502 ms |
64820 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 |
296 KB |
Output is correct |
67 |
Correct |
411 ms |
66988 KB |
Output is correct |
68 |
Correct |
382 ms |
63172 KB |
Output is correct |
69 |
Correct |
476 ms |
58908 KB |
Output is correct |
70 |
Correct |
16 ms |
920 KB |
Output is correct |
71 |
Correct |
20 ms |
1312 KB |
Output is correct |
72 |
Correct |
184 ms |
29844 KB |
Output is correct |
73 |
Correct |
326 ms |
42124 KB |
Output is correct |
74 |
Correct |
403 ms |
55752 KB |
Output is correct |
75 |
Correct |
436 ms |
65060 KB |
Output is correct |
76 |
Correct |
413 ms |
70016 KB |
Output is correct |
77 |
Correct |
24 ms |
1152 KB |
Output is correct |
78 |
Correct |
27 ms |
1592 KB |
Output is correct |
79 |
Correct |
172 ms |
27728 KB |
Output is correct |
80 |
Correct |
303 ms |
41772 KB |
Output is correct |
81 |
Correct |
388 ms |
56000 KB |
Output is correct |
82 |
Correct |
1 ms |
212 KB |
Output is correct |
83 |
Correct |
0 ms |
300 KB |
Output is correct |
84 |
Correct |
1 ms |
296 KB |
Output is correct |
85 |
Correct |
419 ms |
67092 KB |
Output is correct |
86 |
Correct |
466 ms |
64068 KB |
Output is correct |
87 |
Correct |
418 ms |
58080 KB |
Output is correct |
88 |
Correct |
357 ms |
53672 KB |
Output is correct |
89 |
Correct |
97 ms |
16840 KB |
Output is correct |
90 |
Correct |
119 ms |
16876 KB |
Output is correct |
91 |
Correct |
95 ms |
16928 KB |
Output is correct |
92 |
Correct |
335 ms |
45196 KB |
Output is correct |
93 |
Correct |
328 ms |
45108 KB |
Output is correct |
94 |
Correct |
474 ms |
45200 KB |
Output is correct |
95 |
Correct |
468 ms |
45252 KB |
Output is correct |
96 |
Correct |
1 ms |
212 KB |
Output is correct |
97 |
Correct |
23 ms |
4788 KB |
Output is correct |
98 |
Correct |
41 ms |
8992 KB |
Output is correct |
99 |
Correct |
395 ms |
59844 KB |
Output is correct |
100 |
Correct |
48 ms |
1792 KB |
Output is correct |
101 |
Correct |
120 ms |
6128 KB |
Output is correct |
102 |
Correct |
144 ms |
10132 KB |
Output is correct |
103 |
Correct |
149 ms |
18956 KB |
Output is correct |
104 |
Correct |
209 ms |
25588 KB |
Output is correct |
105 |
Correct |
274 ms |
32196 KB |
Output is correct |
106 |
Correct |
338 ms |
39124 KB |
Output is correct |
107 |
Correct |
408 ms |
45680 KB |
Output is correct |
108 |
Correct |
1 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 |
300 KB |
Output is correct |
115 |
Correct |
0 ms |
212 KB |
Output is correct |
116 |
Correct |
1 ms |
212 KB |
Output is correct |
117 |
Correct |
1 ms |
212 KB |
Output is correct |
118 |
Correct |
0 ms |
300 KB |
Output is correct |
119 |
Correct |
7 ms |
596 KB |
Output is correct |
120 |
Correct |
5 ms |
596 KB |
Output is correct |
121 |
Correct |
219 ms |
32188 KB |
Output is correct |
122 |
Correct |
274 ms |
41856 KB |
Output is correct |
123 |
Correct |
291 ms |
45304 KB |
Output is correct |
124 |
Correct |
0 ms |
212 KB |
Output is correct |
125 |
Correct |
1 ms |
212 KB |
Output is correct |
126 |
Correct |
0 ms |
212 KB |
Output is correct |
127 |
Correct |
397 ms |
67024 KB |
Output is correct |
128 |
Correct |
380 ms |
63140 KB |
Output is correct |
129 |
Correct |
399 ms |
58956 KB |
Output is correct |
130 |
Correct |
16 ms |
980 KB |
Output is correct |
131 |
Correct |
18 ms |
1308 KB |
Output is correct |
132 |
Correct |
175 ms |
29856 KB |
Output is correct |
133 |
Correct |
293 ms |
42036 KB |
Output is correct |
134 |
Correct |
403 ms |
55684 KB |
Output is correct |
135 |
Correct |
421 ms |
70112 KB |
Output is correct |
136 |
Correct |
424 ms |
62460 KB |
Output is correct |
137 |
Correct |
434 ms |
70324 KB |
Output is correct |
138 |
Correct |
474 ms |
60596 KB |
Output is correct |
139 |
Correct |
383 ms |
51936 KB |
Output is correct |
140 |
Correct |
1 ms |
260 KB |
Output is correct |
141 |
Correct |
53 ms |
9032 KB |
Output is correct |
142 |
Correct |
126 ms |
4040 KB |
Output is correct |
143 |
Correct |
158 ms |
9064 KB |
Output is correct |
144 |
Correct |
184 ms |
12748 KB |
Output is correct |
145 |
Correct |
218 ms |
31412 KB |
Output is correct |
146 |
Correct |
290 ms |
39000 KB |
Output is correct |
147 |
Correct |
364 ms |
46788 KB |
Output is correct |
148 |
Correct |
403 ms |
54092 KB |
Output is correct |
149 |
Correct |
482 ms |
61596 KB |
Output is correct |
150 |
Correct |
449 ms |
65052 KB |
Output is correct |
151 |
Correct |
412 ms |
70164 KB |
Output is correct |
152 |
Correct |
20 ms |
1108 KB |
Output is correct |
153 |
Correct |
25 ms |
1684 KB |
Output is correct |
154 |
Correct |
176 ms |
27724 KB |
Output is correct |
155 |
Correct |
288 ms |
41752 KB |
Output is correct |
156 |
Correct |
418 ms |
56100 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 |
300 KB |
Output is correct |
161 |
Correct |
488 ms |
70012 KB |
Output is correct |
162 |
Correct |
394 ms |
67652 KB |
Output is correct |
163 |
Correct |
407 ms |
61524 KB |
Output is correct |
164 |
Correct |
410 ms |
60244 KB |
Output is correct |
165 |
Correct |
472 ms |
67104 KB |
Output is correct |
166 |
Execution timed out |
3567 ms |
61280 KB |
Time limit exceeded |
167 |
Halted |
0 ms |
0 KB |
- |