#include "parks.h"
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long int
#define all(x) x.begin(),x.end()
#define vi vector<int>
#define pii pair<int,int>
#define ff first
#define ss second
const int N = 3e5+100;
struct Dsu{
vi p, s;
void init(int n){
p.resize(n);
s.resize(n,1);
for(int i = 0; i < n; ++i) p[i]=i;
}
int find(int v){
if(p[v]==v) return v;
return p[v]=find(p[v]);
}
void merge(int a, int b){
a=find(a);b=find(b);
if(a!=b){
if(s[a]>s[b]) swap(a,b);
p[a] = b;
s[b] += s[a];
}
}
};
int arr[4][2] = {{2, 0}, {-2, 0}, {0, 2}, {0, -2}};
int construct_roads(std::vector<int> x, std::vector<int> y) {
if (x.size() == 1) {
build({}, {}, {}, {});
return 1;
}
std::vector<int> U, V, a, b;
// u.push_back(0);
// v.push_back(1);
// a.push_back(x[0]+1);
// b.push_back(y[0]-1);
vector<array<int, 5>> g;
int n = x.size();
Dsu d; d.init(n);
map<pair<int, int>, int> m;
map<pair<int, int>, int> used;
for(int i = 0; i < n; ++i){
m[{x[i], y[i]}] = i + 1;
}
for(int i = 0; i < n; ++i){
for(int j = 0; j < 4; ++j){
int nx = x[i] + arr[j][0];
int ny = y[i] + arr[j][1];
if(m.find({nx, ny}) != m.end()){
int id = m[{nx, ny}];
if(id > i) continue;
int yy = y[i] + ny >> 1;
int xx = x[i] + nx >> 1;
int X = x[i], Y = y[i];
// cout << X << ' ' << Y << ' ' << nx << ' ' << ny << '\n';
if(nx < X) swap(X, nx), swap(Y, ny);
if(ny < Y) swap(X, nx), swap(Y, ny);
if(abs(nx - X) == 2){
if((X/2+Y/2) % 2){
g.pb({xx, Y - 1, min(xx, yy), i + 1, id});
}else{
g.pb({xx, Y + 1, min(xx, yy), i + 1, id});
}
}else{
if((X/2 + Y/2) % 2 == 0){
g.pb({X - 1, yy, min(xx, yy), i + 1, id});
}else{
g.pb({X + 1, yy, min(xx, yy), i + 1, id});
}
}
}
}
}
sort(all(g));
for(int i = 0; i < g.size(); ++i){
int u = g[i][3], v = g[i][4];
--u, --v;
if(d.find(u) != d.find(v) && used[{g[i][0], g[i][1]}] == 0){
d.merge(u, v);
U.pb(u);
V.pb(v);
a.pb(g[i][0]);
b.pb(g[i][1]);
used[{g[i][0], g[i][1]}] = 1;
}
}
if(d.s[d.find(0)] != n) return 0;
build(U, V, a, b);
return 1;
}
Compilation message
parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:61:23: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
61 | int yy = y[i] + ny >> 1;
parks.cpp:62:23: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
62 | int xx = x[i] + nx >> 1;
parks.cpp:84:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::array<int, 5> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
84 | for(int i = 0; i < g.size(); ++i){
| ~~^~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 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 |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
127 ms |
22052 KB |
Output is correct |
10 |
Correct |
8 ms |
2512 KB |
Output is correct |
11 |
Correct |
52 ms |
12048 KB |
Output is correct |
12 |
Correct |
13 ms |
3508 KB |
Output is correct |
13 |
Correct |
37 ms |
8568 KB |
Output is correct |
14 |
Correct |
1 ms |
604 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
126 ms |
21988 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 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 |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
127 ms |
22052 KB |
Output is correct |
10 |
Correct |
8 ms |
2512 KB |
Output is correct |
11 |
Correct |
52 ms |
12048 KB |
Output is correct |
12 |
Correct |
13 ms |
3508 KB |
Output is correct |
13 |
Correct |
37 ms |
8568 KB |
Output is correct |
14 |
Correct |
1 ms |
604 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
126 ms |
21988 KB |
Output is correct |
17 |
Correct |
0 ms |
344 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
344 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
382 ms |
46532 KB |
Output is correct |
24 |
Correct |
1 ms |
344 KB |
Output is correct |
25 |
Correct |
1 ms |
604 KB |
Output is correct |
26 |
Correct |
3 ms |
860 KB |
Output is correct |
27 |
Correct |
4 ms |
1084 KB |
Output is correct |
28 |
Correct |
125 ms |
18532 KB |
Output is correct |
29 |
Correct |
204 ms |
28984 KB |
Output is correct |
30 |
Correct |
292 ms |
36792 KB |
Output is correct |
31 |
Correct |
364 ms |
47024 KB |
Output is correct |
32 |
Correct |
0 ms |
344 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
344 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
344 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
1 ms |
808 KB |
Output is correct |
44 |
Correct |
2 ms |
860 KB |
Output is correct |
45 |
Correct |
146 ms |
22020 KB |
Output is correct |
46 |
Correct |
230 ms |
32704 KB |
Output is correct |
47 |
Correct |
235 ms |
33212 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 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 |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
127 ms |
22052 KB |
Output is correct |
10 |
Correct |
8 ms |
2512 KB |
Output is correct |
11 |
Correct |
52 ms |
12048 KB |
Output is correct |
12 |
Correct |
13 ms |
3508 KB |
Output is correct |
13 |
Correct |
37 ms |
8568 KB |
Output is correct |
14 |
Correct |
1 ms |
604 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
126 ms |
21988 KB |
Output is correct |
17 |
Correct |
0 ms |
344 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
344 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
382 ms |
46532 KB |
Output is correct |
24 |
Correct |
1 ms |
344 KB |
Output is correct |
25 |
Correct |
1 ms |
604 KB |
Output is correct |
26 |
Correct |
3 ms |
860 KB |
Output is correct |
27 |
Correct |
4 ms |
1084 KB |
Output is correct |
28 |
Correct |
125 ms |
18532 KB |
Output is correct |
29 |
Correct |
204 ms |
28984 KB |
Output is correct |
30 |
Correct |
292 ms |
36792 KB |
Output is correct |
31 |
Correct |
364 ms |
47024 KB |
Output is correct |
32 |
Correct |
0 ms |
344 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
344 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
344 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
1 ms |
808 KB |
Output is correct |
44 |
Correct |
2 ms |
860 KB |
Output is correct |
45 |
Correct |
146 ms |
22020 KB |
Output is correct |
46 |
Correct |
230 ms |
32704 KB |
Output is correct |
47 |
Correct |
235 ms |
33212 KB |
Output is correct |
48 |
Correct |
0 ms |
348 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 |
0 ms |
348 KB |
Output is correct |
54 |
Correct |
0 ms |
388 KB |
Output is correct |
55 |
Correct |
419 ms |
46388 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
2 ms |
860 KB |
Output is correct |
58 |
Correct |
7 ms |
1688 KB |
Output is correct |
59 |
Correct |
11 ms |
2388 KB |
Output is correct |
60 |
Correct |
177 ms |
24184 KB |
Output is correct |
61 |
Correct |
254 ms |
32448 KB |
Output is correct |
62 |
Correct |
326 ms |
38864 KB |
Output is correct |
63 |
Correct |
398 ms |
48184 KB |
Output is correct |
64 |
Correct |
1 ms |
348 KB |
Output is correct |
65 |
Correct |
0 ms |
348 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
291 ms |
44704 KB |
Output is correct |
68 |
Correct |
294 ms |
44732 KB |
Output is correct |
69 |
Correct |
296 ms |
43444 KB |
Output is correct |
70 |
Correct |
3 ms |
1116 KB |
Output is correct |
71 |
Correct |
8 ms |
1852 KB |
Output is correct |
72 |
Correct |
151 ms |
21876 KB |
Output is correct |
73 |
Correct |
245 ms |
34236 KB |
Output is correct |
74 |
Correct |
349 ms |
43704 KB |
Output is correct |
75 |
Correct |
334 ms |
44732 KB |
Output is correct |
76 |
Correct |
289 ms |
44216 KB |
Output is correct |
77 |
Correct |
5 ms |
1340 KB |
Output is correct |
78 |
Correct |
8 ms |
1948 KB |
Output is correct |
79 |
Correct |
151 ms |
22092 KB |
Output is correct |
80 |
Correct |
253 ms |
33716 KB |
Output is correct |
81 |
Correct |
379 ms |
44216 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 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 |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
127 ms |
22052 KB |
Output is correct |
10 |
Correct |
8 ms |
2512 KB |
Output is correct |
11 |
Correct |
52 ms |
12048 KB |
Output is correct |
12 |
Correct |
13 ms |
3508 KB |
Output is correct |
13 |
Correct |
37 ms |
8568 KB |
Output is correct |
14 |
Correct |
1 ms |
604 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
126 ms |
21988 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 |
334 ms |
43500 KB |
Output is correct |
21 |
Correct |
324 ms |
43704 KB |
Output is correct |
22 |
Correct |
323 ms |
44472 KB |
Output is correct |
23 |
Correct |
269 ms |
38484 KB |
Output is correct |
24 |
Correct |
173 ms |
17488 KB |
Output is correct |
25 |
Correct |
349 ms |
38536 KB |
Output is correct |
26 |
Correct |
282 ms |
37312 KB |
Output is correct |
27 |
Correct |
338 ms |
44220 KB |
Output is correct |
28 |
Correct |
334 ms |
44732 KB |
Output is correct |
29 |
Correct |
375 ms |
44728 KB |
Output is correct |
30 |
Correct |
378 ms |
43676 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
18 ms |
3560 KB |
Output is correct |
33 |
Correct |
77 ms |
8784 KB |
Output is correct |
34 |
Correct |
310 ms |
43588 KB |
Output is correct |
35 |
Correct |
11 ms |
2196 KB |
Output is correct |
36 |
Correct |
69 ms |
9600 KB |
Output is correct |
37 |
Correct |
153 ms |
18896 KB |
Output is correct |
38 |
Correct |
133 ms |
17856 KB |
Output is correct |
39 |
Correct |
183 ms |
23996 KB |
Output is correct |
40 |
Correct |
250 ms |
32696 KB |
Output is correct |
41 |
Correct |
315 ms |
37820 KB |
Output is correct |
42 |
Correct |
397 ms |
43708 KB |
Output is correct |
43 |
Correct |
0 ms |
344 KB |
Output is correct |
44 |
Correct |
0 ms |
348 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 |
348 KB |
Output is correct |
49 |
Correct |
0 ms |
344 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 |
0 ms |
348 KB |
Output is correct |
54 |
Correct |
1 ms |
604 KB |
Output is correct |
55 |
Correct |
2 ms |
824 KB |
Output is correct |
56 |
Correct |
151 ms |
21912 KB |
Output is correct |
57 |
Correct |
227 ms |
33404 KB |
Output is correct |
58 |
Correct |
232 ms |
32640 KB |
Output is correct |
59 |
Correct |
0 ms |
348 KB |
Output is correct |
60 |
Correct |
0 ms |
348 KB |
Output is correct |
61 |
Correct |
0 ms |
348 KB |
Output is correct |
62 |
Correct |
298 ms |
44860 KB |
Output is correct |
63 |
Correct |
292 ms |
43704 KB |
Output is correct |
64 |
Correct |
295 ms |
43704 KB |
Output is correct |
65 |
Correct |
4 ms |
1112 KB |
Output is correct |
66 |
Correct |
8 ms |
1848 KB |
Output is correct |
67 |
Correct |
152 ms |
21960 KB |
Output is correct |
68 |
Correct |
247 ms |
33716 KB |
Output is correct |
69 |
Correct |
346 ms |
44560 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 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 |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
127 ms |
22052 KB |
Output is correct |
10 |
Correct |
8 ms |
2512 KB |
Output is correct |
11 |
Correct |
52 ms |
12048 KB |
Output is correct |
12 |
Correct |
13 ms |
3508 KB |
Output is correct |
13 |
Correct |
37 ms |
8568 KB |
Output is correct |
14 |
Correct |
1 ms |
604 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
126 ms |
21988 KB |
Output is correct |
17 |
Correct |
297 ms |
43708 KB |
Output is correct |
18 |
Correct |
330 ms |
43704 KB |
Output is correct |
19 |
Correct |
323 ms |
43960 KB |
Output is correct |
20 |
Correct |
381 ms |
43960 KB |
Output is correct |
21 |
Correct |
333 ms |
38788 KB |
Output is correct |
22 |
Correct |
0 ms |
344 KB |
Output is correct |
23 |
Correct |
45 ms |
7112 KB |
Output is correct |
24 |
Correct |
25 ms |
4168 KB |
Output is correct |
25 |
Correct |
103 ms |
14052 KB |
Output is correct |
26 |
Correct |
206 ms |
23224 KB |
Output is correct |
27 |
Correct |
198 ms |
22464 KB |
Output is correct |
28 |
Correct |
229 ms |
29040 KB |
Output is correct |
29 |
Correct |
278 ms |
33612 KB |
Output is correct |
30 |
Correct |
337 ms |
39124 KB |
Output is correct |
31 |
Correct |
381 ms |
44476 KB |
Output is correct |
32 |
Correct |
350 ms |
44664 KB |
Output is correct |
33 |
Correct |
290 ms |
43580 KB |
Output is correct |
34 |
Correct |
5 ms |
1336 KB |
Output is correct |
35 |
Correct |
8 ms |
1948 KB |
Output is correct |
36 |
Correct |
157 ms |
22324 KB |
Output is correct |
37 |
Correct |
246 ms |
34748 KB |
Output is correct |
38 |
Correct |
345 ms |
44228 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 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 |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
127 ms |
22052 KB |
Output is correct |
10 |
Correct |
8 ms |
2512 KB |
Output is correct |
11 |
Correct |
52 ms |
12048 KB |
Output is correct |
12 |
Correct |
13 ms |
3508 KB |
Output is correct |
13 |
Correct |
37 ms |
8568 KB |
Output is correct |
14 |
Correct |
1 ms |
604 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
126 ms |
21988 KB |
Output is correct |
17 |
Correct |
0 ms |
344 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
344 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
382 ms |
46532 KB |
Output is correct |
24 |
Correct |
1 ms |
344 KB |
Output is correct |
25 |
Correct |
1 ms |
604 KB |
Output is correct |
26 |
Correct |
3 ms |
860 KB |
Output is correct |
27 |
Correct |
4 ms |
1084 KB |
Output is correct |
28 |
Correct |
125 ms |
18532 KB |
Output is correct |
29 |
Correct |
204 ms |
28984 KB |
Output is correct |
30 |
Correct |
292 ms |
36792 KB |
Output is correct |
31 |
Correct |
364 ms |
47024 KB |
Output is correct |
32 |
Correct |
0 ms |
344 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
344 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
344 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
1 ms |
808 KB |
Output is correct |
44 |
Correct |
2 ms |
860 KB |
Output is correct |
45 |
Correct |
146 ms |
22020 KB |
Output is correct |
46 |
Correct |
230 ms |
32704 KB |
Output is correct |
47 |
Correct |
235 ms |
33212 KB |
Output is correct |
48 |
Correct |
0 ms |
348 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 |
0 ms |
348 KB |
Output is correct |
54 |
Correct |
0 ms |
388 KB |
Output is correct |
55 |
Correct |
419 ms |
46388 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
2 ms |
860 KB |
Output is correct |
58 |
Correct |
7 ms |
1688 KB |
Output is correct |
59 |
Correct |
11 ms |
2388 KB |
Output is correct |
60 |
Correct |
177 ms |
24184 KB |
Output is correct |
61 |
Correct |
254 ms |
32448 KB |
Output is correct |
62 |
Correct |
326 ms |
38864 KB |
Output is correct |
63 |
Correct |
398 ms |
48184 KB |
Output is correct |
64 |
Correct |
1 ms |
348 KB |
Output is correct |
65 |
Correct |
0 ms |
348 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
291 ms |
44704 KB |
Output is correct |
68 |
Correct |
294 ms |
44732 KB |
Output is correct |
69 |
Correct |
296 ms |
43444 KB |
Output is correct |
70 |
Correct |
3 ms |
1116 KB |
Output is correct |
71 |
Correct |
8 ms |
1852 KB |
Output is correct |
72 |
Correct |
151 ms |
21876 KB |
Output is correct |
73 |
Correct |
245 ms |
34236 KB |
Output is correct |
74 |
Correct |
349 ms |
43704 KB |
Output is correct |
75 |
Correct |
334 ms |
44732 KB |
Output is correct |
76 |
Correct |
289 ms |
44216 KB |
Output is correct |
77 |
Correct |
5 ms |
1340 KB |
Output is correct |
78 |
Correct |
8 ms |
1948 KB |
Output is correct |
79 |
Correct |
151 ms |
22092 KB |
Output is correct |
80 |
Correct |
253 ms |
33716 KB |
Output is correct |
81 |
Correct |
379 ms |
44216 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 |
334 ms |
43500 KB |
Output is correct |
86 |
Correct |
324 ms |
43704 KB |
Output is correct |
87 |
Correct |
323 ms |
44472 KB |
Output is correct |
88 |
Correct |
269 ms |
38484 KB |
Output is correct |
89 |
Correct |
173 ms |
17488 KB |
Output is correct |
90 |
Correct |
349 ms |
38536 KB |
Output is correct |
91 |
Correct |
282 ms |
37312 KB |
Output is correct |
92 |
Correct |
338 ms |
44220 KB |
Output is correct |
93 |
Correct |
334 ms |
44732 KB |
Output is correct |
94 |
Correct |
375 ms |
44728 KB |
Output is correct |
95 |
Correct |
378 ms |
43676 KB |
Output is correct |
96 |
Correct |
0 ms |
348 KB |
Output is correct |
97 |
Correct |
18 ms |
3560 KB |
Output is correct |
98 |
Correct |
77 ms |
8784 KB |
Output is correct |
99 |
Correct |
310 ms |
43588 KB |
Output is correct |
100 |
Correct |
11 ms |
2196 KB |
Output is correct |
101 |
Correct |
69 ms |
9600 KB |
Output is correct |
102 |
Correct |
153 ms |
18896 KB |
Output is correct |
103 |
Correct |
133 ms |
17856 KB |
Output is correct |
104 |
Correct |
183 ms |
23996 KB |
Output is correct |
105 |
Correct |
250 ms |
32696 KB |
Output is correct |
106 |
Correct |
315 ms |
37820 KB |
Output is correct |
107 |
Correct |
397 ms |
43708 KB |
Output is correct |
108 |
Correct |
0 ms |
344 KB |
Output is correct |
109 |
Correct |
0 ms |
348 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 |
348 KB |
Output is correct |
114 |
Correct |
0 ms |
344 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 |
0 ms |
348 KB |
Output is correct |
119 |
Correct |
1 ms |
604 KB |
Output is correct |
120 |
Correct |
2 ms |
824 KB |
Output is correct |
121 |
Correct |
151 ms |
21912 KB |
Output is correct |
122 |
Correct |
227 ms |
33404 KB |
Output is correct |
123 |
Correct |
232 ms |
32640 KB |
Output is correct |
124 |
Correct |
0 ms |
348 KB |
Output is correct |
125 |
Correct |
0 ms |
348 KB |
Output is correct |
126 |
Correct |
0 ms |
348 KB |
Output is correct |
127 |
Correct |
298 ms |
44860 KB |
Output is correct |
128 |
Correct |
292 ms |
43704 KB |
Output is correct |
129 |
Correct |
295 ms |
43704 KB |
Output is correct |
130 |
Correct |
4 ms |
1112 KB |
Output is correct |
131 |
Correct |
8 ms |
1848 KB |
Output is correct |
132 |
Correct |
152 ms |
21960 KB |
Output is correct |
133 |
Correct |
247 ms |
33716 KB |
Output is correct |
134 |
Correct |
346 ms |
44560 KB |
Output is correct |
135 |
Correct |
297 ms |
43708 KB |
Output is correct |
136 |
Correct |
330 ms |
43704 KB |
Output is correct |
137 |
Correct |
323 ms |
43960 KB |
Output is correct |
138 |
Correct |
381 ms |
43960 KB |
Output is correct |
139 |
Correct |
333 ms |
38788 KB |
Output is correct |
140 |
Correct |
0 ms |
344 KB |
Output is correct |
141 |
Correct |
45 ms |
7112 KB |
Output is correct |
142 |
Correct |
25 ms |
4168 KB |
Output is correct |
143 |
Correct |
103 ms |
14052 KB |
Output is correct |
144 |
Correct |
206 ms |
23224 KB |
Output is correct |
145 |
Correct |
198 ms |
22464 KB |
Output is correct |
146 |
Correct |
229 ms |
29040 KB |
Output is correct |
147 |
Correct |
278 ms |
33612 KB |
Output is correct |
148 |
Correct |
337 ms |
39124 KB |
Output is correct |
149 |
Correct |
381 ms |
44476 KB |
Output is correct |
150 |
Correct |
350 ms |
44664 KB |
Output is correct |
151 |
Correct |
290 ms |
43580 KB |
Output is correct |
152 |
Correct |
5 ms |
1336 KB |
Output is correct |
153 |
Correct |
8 ms |
1948 KB |
Output is correct |
154 |
Correct |
157 ms |
22324 KB |
Output is correct |
155 |
Correct |
246 ms |
34748 KB |
Output is correct |
156 |
Correct |
345 ms |
44228 KB |
Output is correct |
157 |
Correct |
1 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 |
454 ms |
49440 KB |
Output is correct |
162 |
Correct |
311 ms |
47288 KB |
Output is correct |
163 |
Correct |
361 ms |
48308 KB |
Output is correct |
164 |
Correct |
348 ms |
47296 KB |
Output is correct |
165 |
Correct |
392 ms |
49576 KB |
Output is correct |
166 |
Correct |
434 ms |
49624 KB |
Output is correct |
167 |
Correct |
80 ms |
11708 KB |
Output is correct |
168 |
Correct |
49 ms |
6852 KB |
Output is correct |
169 |
Correct |
139 ms |
18880 KB |
Output is correct |
170 |
Correct |
293 ms |
34996 KB |
Output is correct |
171 |
Correct |
394 ms |
45236 KB |
Output is correct |
172 |
Correct |
192 ms |
25272 KB |
Output is correct |
173 |
Correct |
240 ms |
30032 KB |
Output is correct |
174 |
Correct |
295 ms |
36020 KB |
Output is correct |
175 |
Correct |
352 ms |
40636 KB |
Output is correct |
176 |
Correct |
381 ms |
46060 KB |
Output is correct |
177 |
Correct |
455 ms |
50620 KB |
Output is correct |