#include "parks.h"
#include <iostream>
#include <map>
#include <array>
#include <queue>
#define ll long long
using namespace std;
map <array<ll, 2>, ll> mp;
map <array<ll, 2>, ll> visited;
map <array<ll, 2>, ll> pt;
map <array<ll, 3>, ll> edge;
queue <array<ll, 2>> Q;
vector <int> U, V, A, B;
ll dj[4][2] = {-1, -1, -1, 1, 1, 1, 1, -1}, dk[4][2] = {-2, 0, 0, 2, 2, 0, 0, -2};
void dfs(ll u, ll v) {
++visited[{u, v}];
for (int i=0; i<4; ++i) {
ll nx = u + dk[i][0], ny = v + dk[i][1];
if (pt.count({nx, ny}) && !visited.count({nx, ny})) dfs(nx, ny);
}
}
void solve(ll u, ll v) {
for (int i=0; i<4; ++i) {
if (edge.count({u, v, i})) {
if (visited.count({u, v})) break;
++visited[{u, v}];
U.push_back(pt[{u + dj[i][0], v + dj[i][1]}]);
V.push_back(pt[{u + dj[(i+1)%4][0], v + dj[(i+1)%4][1]}]);
A.push_back(u);
B.push_back(v);
edge.erase({u, v, i});
edge.erase({u + dk[i][0], v + dk[i][1], i ^ 2});
solve(u + dk[i][0], v + dk[i][1]);
break;
}
}
}
int construct_roads(std::vector<int> x, std::vector<int> y) {
ll n = x.size();
for (int i=0; i<n; ++i) {
pt[{x[i], y[i]}] = i;
for (int j=0; j<4; ++j) {
ll nx = x[i] + dj[j][0], ny = y[i] + dj[j][1];
++mp[{nx, ny}];
}
}
dfs(x[0], y[0]);
if (visited.size() != pt.size()) return 0;
for (auto it = mp.begin(); it != mp.end();) {
auto nx = next(it);
auto [u, v] = it->first;
ll tot = 0;
for (int i=0; i<4; ++i) {
if (pt.count({u + dj[i][0], v + dj[i][1]}) && pt.count({u + dj[(i+1)%4][0], v + dj[(i+1)%4][1]})) {
++tot;
++edge[{u, v, i}];
}
}
mp[{u, v}] = tot;
if (tot == 0) mp.erase(it);
else if (tot == 1) Q.push({u, v});
it = nx;
}
while (!Q.empty()) {
auto [u, v] = Q.front();
Q.pop();
if (!mp.count({u, v})) continue;
for (int i=0; i<4; ++i) {
if (edge.count({u, v, i})) {
U.push_back(pt[{u + dj[i][0], v + dj[i][1]}]);
V.push_back(pt[{u + dj[(i+1)%4][0], v + dj[(i+1)%4][1]}]);
edge.erase({u, v, i});
edge.erase({u + dk[i][0], v + dk[i][1], i ^ 2});
--mp[{u + dk[i][0], v + dk[i][1]}];
if (mp[{u + dk[i][0], v + dk[i][1]}] == 1) Q.push({u + dk[i][0], v + dk[i][1]});
else if (mp[{u + dk[i][0], v + dk[i][1]}] == 0) mp.erase({u + dk[i][0], v + dk[i][1]});
}
}
mp.erase({u, v});
A.push_back(u);
B.push_back(v);
}
for (auto [y, z] : mp) {
auto [u, v] = y;
if (z == 4) {
for (int i=0; i<4; ++i) {
if (edge.count({u, v, i})) {
edge.erase({u, v, i});
edge.erase({u + dk[i][0], v + dk[i][1], i ^ 2});
--mp[{u, v}];
break;
}
}
}
}
visited.clear();
for (auto [y, z] : mp) {
auto [u, v] = y;
solve(u, v);
}
build(U, V, A, B);
return 1;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
446 ms |
61388 KB |
Output is correct |
10 |
Correct |
33 ms |
6484 KB |
Output is correct |
11 |
Correct |
230 ms |
33852 KB |
Output is correct |
12 |
Correct |
54 ms |
9556 KB |
Output is correct |
13 |
Correct |
58 ms |
15848 KB |
Output is correct |
14 |
Correct |
1 ms |
680 KB |
Output is correct |
15 |
Correct |
2 ms |
860 KB |
Output is correct |
16 |
Correct |
456 ms |
55672 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
446 ms |
61388 KB |
Output is correct |
10 |
Correct |
33 ms |
6484 KB |
Output is correct |
11 |
Correct |
230 ms |
33852 KB |
Output is correct |
12 |
Correct |
54 ms |
9556 KB |
Output is correct |
13 |
Correct |
58 ms |
15848 KB |
Output is correct |
14 |
Correct |
1 ms |
680 KB |
Output is correct |
15 |
Correct |
2 ms |
860 KB |
Output is correct |
16 |
Correct |
456 ms |
55672 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
436 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
428 KB |
Output is correct |
23 |
Correct |
1354 ms |
131408 KB |
Output is correct |
24 |
Correct |
1 ms |
344 KB |
Output is correct |
25 |
Correct |
4 ms |
1188 KB |
Output is correct |
26 |
Correct |
3 ms |
1116 KB |
Output is correct |
27 |
Correct |
4 ms |
1116 KB |
Output is correct |
28 |
Correct |
447 ms |
54224 KB |
Output is correct |
29 |
Correct |
727 ms |
81444 KB |
Output is correct |
30 |
Correct |
1068 ms |
111700 KB |
Output is correct |
31 |
Correct |
1356 ms |
128940 KB |
Output is correct |
32 |
Correct |
1 ms |
344 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
436 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
3 ms |
860 KB |
Output is correct |
44 |
Correct |
3 ms |
1116 KB |
Output is correct |
45 |
Correct |
502 ms |
54760 KB |
Output is correct |
46 |
Correct |
838 ms |
81148 KB |
Output is correct |
47 |
Correct |
823 ms |
79652 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
446 ms |
61388 KB |
Output is correct |
10 |
Correct |
33 ms |
6484 KB |
Output is correct |
11 |
Correct |
230 ms |
33852 KB |
Output is correct |
12 |
Correct |
54 ms |
9556 KB |
Output is correct |
13 |
Correct |
58 ms |
15848 KB |
Output is correct |
14 |
Correct |
1 ms |
680 KB |
Output is correct |
15 |
Correct |
2 ms |
860 KB |
Output is correct |
16 |
Correct |
456 ms |
55672 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
436 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
428 KB |
Output is correct |
23 |
Correct |
1354 ms |
131408 KB |
Output is correct |
24 |
Correct |
1 ms |
344 KB |
Output is correct |
25 |
Correct |
4 ms |
1188 KB |
Output is correct |
26 |
Correct |
3 ms |
1116 KB |
Output is correct |
27 |
Correct |
4 ms |
1116 KB |
Output is correct |
28 |
Correct |
447 ms |
54224 KB |
Output is correct |
29 |
Correct |
727 ms |
81444 KB |
Output is correct |
30 |
Correct |
1068 ms |
111700 KB |
Output is correct |
31 |
Correct |
1356 ms |
128940 KB |
Output is correct |
32 |
Correct |
1 ms |
344 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
436 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
3 ms |
860 KB |
Output is correct |
44 |
Correct |
3 ms |
1116 KB |
Output is correct |
45 |
Correct |
502 ms |
54760 KB |
Output is correct |
46 |
Correct |
838 ms |
81148 KB |
Output is correct |
47 |
Correct |
823 ms |
79652 KB |
Output is correct |
48 |
Correct |
1 ms |
344 KB |
Output is correct |
49 |
Correct |
0 ms |
432 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
51 |
Correct |
1 ms |
428 KB |
Output is correct |
52 |
Correct |
0 ms |
348 KB |
Output is correct |
53 |
Correct |
0 ms |
348 KB |
Output is correct |
54 |
Correct |
1 ms |
348 KB |
Output is correct |
55 |
Correct |
1417 ms |
132616 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
10 ms |
1568 KB |
Output is correct |
58 |
Correct |
23 ms |
4440 KB |
Output is correct |
59 |
Correct |
11 ms |
2528 KB |
Output is correct |
60 |
Correct |
592 ms |
66852 KB |
Output is correct |
61 |
Correct |
797 ms |
91452 KB |
Output is correct |
62 |
Correct |
1010 ms |
109940 KB |
Output is correct |
63 |
Correct |
1359 ms |
131884 KB |
Output is correct |
64 |
Correct |
1 ms |
344 KB |
Output is correct |
65 |
Correct |
1 ms |
344 KB |
Output is correct |
66 |
Correct |
0 ms |
432 KB |
Output is correct |
67 |
Correct |
1029 ms |
118200 KB |
Output is correct |
68 |
Correct |
1022 ms |
118548 KB |
Output is correct |
69 |
Correct |
1037 ms |
120324 KB |
Output is correct |
70 |
Correct |
5 ms |
1368 KB |
Output is correct |
71 |
Correct |
9 ms |
2136 KB |
Output is correct |
72 |
Correct |
541 ms |
50348 KB |
Output is correct |
73 |
Correct |
869 ms |
79368 KB |
Output is correct |
74 |
Correct |
1291 ms |
104412 KB |
Output is correct |
75 |
Correct |
1188 ms |
121576 KB |
Output is correct |
76 |
Correct |
1039 ms |
126220 KB |
Output is correct |
77 |
Correct |
6 ms |
1628 KB |
Output is correct |
78 |
Correct |
10 ms |
2576 KB |
Output is correct |
79 |
Correct |
528 ms |
54464 KB |
Output is correct |
80 |
Correct |
832 ms |
84248 KB |
Output is correct |
81 |
Correct |
1188 ms |
110768 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
446 ms |
61388 KB |
Output is correct |
10 |
Correct |
33 ms |
6484 KB |
Output is correct |
11 |
Correct |
230 ms |
33852 KB |
Output is correct |
12 |
Correct |
54 ms |
9556 KB |
Output is correct |
13 |
Correct |
58 ms |
15848 KB |
Output is correct |
14 |
Correct |
1 ms |
680 KB |
Output is correct |
15 |
Correct |
2 ms |
860 KB |
Output is correct |
16 |
Correct |
456 ms |
55672 KB |
Output is correct |
17 |
Correct |
0 ms |
344 KB |
Output is correct |
18 |
Correct |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
999 ms |
120856 KB |
Output is correct |
21 |
Correct |
1008 ms |
114952 KB |
Output is correct |
22 |
Correct |
999 ms |
111880 KB |
Output is correct |
23 |
Correct |
803 ms |
99432 KB |
Output is correct |
24 |
Correct |
399 ms |
67920 KB |
Output is correct |
25 |
Correct |
402 ms |
42832 KB |
Output is correct |
26 |
Correct |
324 ms |
42712 KB |
Output is correct |
27 |
Correct |
921 ms |
99232 KB |
Output is correct |
28 |
Correct |
911 ms |
99148 KB |
Output is correct |
29 |
Correct |
1174 ms |
98240 KB |
Output is correct |
30 |
Correct |
1163 ms |
98732 KB |
Output is correct |
31 |
Correct |
1 ms |
344 KB |
Output is correct |
32 |
Correct |
68 ms |
8008 KB |
Output is correct |
33 |
Correct |
139 ms |
28200 KB |
Output is correct |
34 |
Correct |
975 ms |
116260 KB |
Output is correct |
35 |
Correct |
13 ms |
2648 KB |
Output is correct |
36 |
Correct |
65 ms |
10920 KB |
Output is correct |
37 |
Correct |
146 ms |
20624 KB |
Output is correct |
38 |
Correct |
411 ms |
36416 KB |
Output is correct |
39 |
Correct |
587 ms |
49632 KB |
Output is correct |
40 |
Correct |
805 ms |
62128 KB |
Output is correct |
41 |
Correct |
1027 ms |
76452 KB |
Output is correct |
42 |
Correct |
1226 ms |
90720 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
432 KB |
Output is correct |
45 |
Correct |
0 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
0 ms |
348 KB |
Output is correct |
48 |
Correct |
0 ms |
436 KB |
Output is correct |
49 |
Correct |
0 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
51 |
Correct |
0 ms |
348 KB |
Output is correct |
52 |
Correct |
0 ms |
348 KB |
Output is correct |
53 |
Correct |
1 ms |
348 KB |
Output is correct |
54 |
Correct |
4 ms |
860 KB |
Output is correct |
55 |
Correct |
3 ms |
1116 KB |
Output is correct |
56 |
Correct |
491 ms |
54876 KB |
Output is correct |
57 |
Correct |
776 ms |
81072 KB |
Output is correct |
58 |
Correct |
778 ms |
79564 KB |
Output is correct |
59 |
Correct |
1 ms |
348 KB |
Output is correct |
60 |
Correct |
0 ms |
348 KB |
Output is correct |
61 |
Correct |
1 ms |
436 KB |
Output is correct |
62 |
Correct |
1046 ms |
118120 KB |
Output is correct |
63 |
Correct |
1000 ms |
118576 KB |
Output is correct |
64 |
Correct |
987 ms |
120352 KB |
Output is correct |
65 |
Correct |
5 ms |
1368 KB |
Output is correct |
66 |
Correct |
9 ms |
2136 KB |
Output is correct |
67 |
Correct |
540 ms |
50264 KB |
Output is correct |
68 |
Correct |
864 ms |
79360 KB |
Output is correct |
69 |
Correct |
1231 ms |
104500 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
446 ms |
61388 KB |
Output is correct |
10 |
Correct |
33 ms |
6484 KB |
Output is correct |
11 |
Correct |
230 ms |
33852 KB |
Output is correct |
12 |
Correct |
54 ms |
9556 KB |
Output is correct |
13 |
Correct |
58 ms |
15848 KB |
Output is correct |
14 |
Correct |
1 ms |
680 KB |
Output is correct |
15 |
Correct |
2 ms |
860 KB |
Output is correct |
16 |
Correct |
456 ms |
55672 KB |
Output is correct |
17 |
Correct |
1037 ms |
127176 KB |
Output is correct |
18 |
Correct |
1016 ms |
123912 KB |
Output is correct |
19 |
Correct |
1082 ms |
118744 KB |
Output is correct |
20 |
Correct |
1196 ms |
117504 KB |
Output is correct |
21 |
Correct |
1059 ms |
100032 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
132 ms |
15844 KB |
Output is correct |
24 |
Correct |
27 ms |
5464 KB |
Output is correct |
25 |
Correct |
93 ms |
14932 KB |
Output is correct |
26 |
Correct |
173 ms |
24148 KB |
Output is correct |
27 |
Correct |
583 ms |
56384 KB |
Output is correct |
28 |
Correct |
823 ms |
69716 KB |
Output is correct |
29 |
Correct |
1008 ms |
84884 KB |
Output is correct |
30 |
Correct |
1231 ms |
98180 KB |
Output is correct |
31 |
Correct |
1403 ms |
112864 KB |
Output is correct |
32 |
Correct |
1114 ms |
121524 KB |
Output is correct |
33 |
Correct |
978 ms |
126224 KB |
Output is correct |
34 |
Correct |
6 ms |
1628 KB |
Output is correct |
35 |
Correct |
10 ms |
2660 KB |
Output is correct |
36 |
Correct |
518 ms |
54528 KB |
Output is correct |
37 |
Correct |
885 ms |
84140 KB |
Output is correct |
38 |
Correct |
1198 ms |
110736 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
446 ms |
61388 KB |
Output is correct |
10 |
Correct |
33 ms |
6484 KB |
Output is correct |
11 |
Correct |
230 ms |
33852 KB |
Output is correct |
12 |
Correct |
54 ms |
9556 KB |
Output is correct |
13 |
Correct |
58 ms |
15848 KB |
Output is correct |
14 |
Correct |
1 ms |
680 KB |
Output is correct |
15 |
Correct |
2 ms |
860 KB |
Output is correct |
16 |
Correct |
456 ms |
55672 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
436 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
428 KB |
Output is correct |
23 |
Correct |
1354 ms |
131408 KB |
Output is correct |
24 |
Correct |
1 ms |
344 KB |
Output is correct |
25 |
Correct |
4 ms |
1188 KB |
Output is correct |
26 |
Correct |
3 ms |
1116 KB |
Output is correct |
27 |
Correct |
4 ms |
1116 KB |
Output is correct |
28 |
Correct |
447 ms |
54224 KB |
Output is correct |
29 |
Correct |
727 ms |
81444 KB |
Output is correct |
30 |
Correct |
1068 ms |
111700 KB |
Output is correct |
31 |
Correct |
1356 ms |
128940 KB |
Output is correct |
32 |
Correct |
1 ms |
344 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
436 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
3 ms |
860 KB |
Output is correct |
44 |
Correct |
3 ms |
1116 KB |
Output is correct |
45 |
Correct |
502 ms |
54760 KB |
Output is correct |
46 |
Correct |
838 ms |
81148 KB |
Output is correct |
47 |
Correct |
823 ms |
79652 KB |
Output is correct |
48 |
Correct |
1 ms |
344 KB |
Output is correct |
49 |
Correct |
0 ms |
432 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
51 |
Correct |
1 ms |
428 KB |
Output is correct |
52 |
Correct |
0 ms |
348 KB |
Output is correct |
53 |
Correct |
0 ms |
348 KB |
Output is correct |
54 |
Correct |
1 ms |
348 KB |
Output is correct |
55 |
Correct |
1417 ms |
132616 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
10 ms |
1568 KB |
Output is correct |
58 |
Correct |
23 ms |
4440 KB |
Output is correct |
59 |
Correct |
11 ms |
2528 KB |
Output is correct |
60 |
Correct |
592 ms |
66852 KB |
Output is correct |
61 |
Correct |
797 ms |
91452 KB |
Output is correct |
62 |
Correct |
1010 ms |
109940 KB |
Output is correct |
63 |
Correct |
1359 ms |
131884 KB |
Output is correct |
64 |
Correct |
1 ms |
344 KB |
Output is correct |
65 |
Correct |
1 ms |
344 KB |
Output is correct |
66 |
Correct |
0 ms |
432 KB |
Output is correct |
67 |
Correct |
1029 ms |
118200 KB |
Output is correct |
68 |
Correct |
1022 ms |
118548 KB |
Output is correct |
69 |
Correct |
1037 ms |
120324 KB |
Output is correct |
70 |
Correct |
5 ms |
1368 KB |
Output is correct |
71 |
Correct |
9 ms |
2136 KB |
Output is correct |
72 |
Correct |
541 ms |
50348 KB |
Output is correct |
73 |
Correct |
869 ms |
79368 KB |
Output is correct |
74 |
Correct |
1291 ms |
104412 KB |
Output is correct |
75 |
Correct |
1188 ms |
121576 KB |
Output is correct |
76 |
Correct |
1039 ms |
126220 KB |
Output is correct |
77 |
Correct |
6 ms |
1628 KB |
Output is correct |
78 |
Correct |
10 ms |
2576 KB |
Output is correct |
79 |
Correct |
528 ms |
54464 KB |
Output is correct |
80 |
Correct |
832 ms |
84248 KB |
Output is correct |
81 |
Correct |
1188 ms |
110768 KB |
Output is correct |
82 |
Correct |
0 ms |
344 KB |
Output is correct |
83 |
Correct |
1 ms |
348 KB |
Output is correct |
84 |
Correct |
0 ms |
348 KB |
Output is correct |
85 |
Correct |
999 ms |
120856 KB |
Output is correct |
86 |
Correct |
1008 ms |
114952 KB |
Output is correct |
87 |
Correct |
999 ms |
111880 KB |
Output is correct |
88 |
Correct |
803 ms |
99432 KB |
Output is correct |
89 |
Correct |
399 ms |
67920 KB |
Output is correct |
90 |
Correct |
402 ms |
42832 KB |
Output is correct |
91 |
Correct |
324 ms |
42712 KB |
Output is correct |
92 |
Correct |
921 ms |
99232 KB |
Output is correct |
93 |
Correct |
911 ms |
99148 KB |
Output is correct |
94 |
Correct |
1174 ms |
98240 KB |
Output is correct |
95 |
Correct |
1163 ms |
98732 KB |
Output is correct |
96 |
Correct |
1 ms |
344 KB |
Output is correct |
97 |
Correct |
68 ms |
8008 KB |
Output is correct |
98 |
Correct |
139 ms |
28200 KB |
Output is correct |
99 |
Correct |
975 ms |
116260 KB |
Output is correct |
100 |
Correct |
13 ms |
2648 KB |
Output is correct |
101 |
Correct |
65 ms |
10920 KB |
Output is correct |
102 |
Correct |
146 ms |
20624 KB |
Output is correct |
103 |
Correct |
411 ms |
36416 KB |
Output is correct |
104 |
Correct |
587 ms |
49632 KB |
Output is correct |
105 |
Correct |
805 ms |
62128 KB |
Output is correct |
106 |
Correct |
1027 ms |
76452 KB |
Output is correct |
107 |
Correct |
1226 ms |
90720 KB |
Output is correct |
108 |
Correct |
0 ms |
348 KB |
Output is correct |
109 |
Correct |
0 ms |
432 KB |
Output is correct |
110 |
Correct |
0 ms |
348 KB |
Output is correct |
111 |
Correct |
0 ms |
348 KB |
Output is correct |
112 |
Correct |
0 ms |
348 KB |
Output is correct |
113 |
Correct |
0 ms |
436 KB |
Output is correct |
114 |
Correct |
0 ms |
348 KB |
Output is correct |
115 |
Correct |
0 ms |
348 KB |
Output is correct |
116 |
Correct |
0 ms |
348 KB |
Output is correct |
117 |
Correct |
0 ms |
348 KB |
Output is correct |
118 |
Correct |
1 ms |
348 KB |
Output is correct |
119 |
Correct |
4 ms |
860 KB |
Output is correct |
120 |
Correct |
3 ms |
1116 KB |
Output is correct |
121 |
Correct |
491 ms |
54876 KB |
Output is correct |
122 |
Correct |
776 ms |
81072 KB |
Output is correct |
123 |
Correct |
778 ms |
79564 KB |
Output is correct |
124 |
Correct |
1 ms |
348 KB |
Output is correct |
125 |
Correct |
0 ms |
348 KB |
Output is correct |
126 |
Correct |
1 ms |
436 KB |
Output is correct |
127 |
Correct |
1046 ms |
118120 KB |
Output is correct |
128 |
Correct |
1000 ms |
118576 KB |
Output is correct |
129 |
Correct |
987 ms |
120352 KB |
Output is correct |
130 |
Correct |
5 ms |
1368 KB |
Output is correct |
131 |
Correct |
9 ms |
2136 KB |
Output is correct |
132 |
Correct |
540 ms |
50264 KB |
Output is correct |
133 |
Correct |
864 ms |
79360 KB |
Output is correct |
134 |
Correct |
1231 ms |
104500 KB |
Output is correct |
135 |
Correct |
1037 ms |
127176 KB |
Output is correct |
136 |
Correct |
1016 ms |
123912 KB |
Output is correct |
137 |
Correct |
1082 ms |
118744 KB |
Output is correct |
138 |
Correct |
1196 ms |
117504 KB |
Output is correct |
139 |
Correct |
1059 ms |
100032 KB |
Output is correct |
140 |
Correct |
0 ms |
348 KB |
Output is correct |
141 |
Correct |
132 ms |
15844 KB |
Output is correct |
142 |
Correct |
27 ms |
5464 KB |
Output is correct |
143 |
Correct |
93 ms |
14932 KB |
Output is correct |
144 |
Correct |
173 ms |
24148 KB |
Output is correct |
145 |
Correct |
583 ms |
56384 KB |
Output is correct |
146 |
Correct |
823 ms |
69716 KB |
Output is correct |
147 |
Correct |
1008 ms |
84884 KB |
Output is correct |
148 |
Correct |
1231 ms |
98180 KB |
Output is correct |
149 |
Correct |
1403 ms |
112864 KB |
Output is correct |
150 |
Correct |
1114 ms |
121524 KB |
Output is correct |
151 |
Correct |
978 ms |
126224 KB |
Output is correct |
152 |
Correct |
6 ms |
1628 KB |
Output is correct |
153 |
Correct |
10 ms |
2660 KB |
Output is correct |
154 |
Correct |
518 ms |
54528 KB |
Output is correct |
155 |
Correct |
885 ms |
84140 KB |
Output is correct |
156 |
Correct |
1198 ms |
110736 KB |
Output is correct |
157 |
Correct |
0 ms |
348 KB |
Output is correct |
158 |
Correct |
0 ms |
348 KB |
Output is correct |
159 |
Correct |
0 ms |
348 KB |
Output is correct |
160 |
Correct |
0 ms |
348 KB |
Output is correct |
161 |
Correct |
1326 ms |
139872 KB |
Output is correct |
162 |
Correct |
996 ms |
112096 KB |
Output is correct |
163 |
Incorrect |
1043 ms |
108812 KB |
Given structure is not connected: There is no path between vertices 0 and 1 |
164 |
Halted |
0 ms |
0 KB |
- |