#include "parks.h"
#include<bits/stdc++.h>
using ll = int;
using namespace std;
#define pll pair <ll,ll>
#define fi first
#define se second
#define MP make_pair
#define sz(a) (ll((a).size()))
#define MASK(i) (1LL<<(i))
#define BIT(mask,i) (((mask) >> (i))&1)
struct point{
ll x,y,id;
point(ll x1 = 0,ll y1 = 0,ll id1 = 0):x(x1),y(y1),id(id1){}
bool operator < (const point &p)const {
return MP(x,y) < MP(p.x,p.y);
}
};
const ll MAXN = 2e5+100;
ll dsu[MAXN];
ll f(ll x){
if (dsu[x] < 0)return x;
return (dsu[x] = f(dsu[x]));
}
bool join(ll x,ll y){
x = f(x),y = f(y);
if (x==y)return 0;
dsu[x] += dsu[y];
dsu[y] = x;
return 1;
}
int construct_roads(std::vector<int> x, std::vector<int> y) {
ll n = sz(x);
vector <point> a(n);
for (ll i = 0;i < n;i ++){
dsu[i] = -1;
a[i] = {x[i],y[i],i};
}
sort(a.begin(),a.end());
vector <int> U, V, A, B;
set <pll> bench;
auto add = [&](ll u,ll v, ll x,ll y){
// cout<<u<<' '<<v<<endl;
if (join(u,v)==0)return;
U.push_back(u);
V.push_back(v);
A.push_back(x);
B.push_back(y);
bench.insert(MP(x,y));
};
auto id = [&](pll x){
auto tmp = lower_bound(a.begin(),a.end(),point(x.fi,x.se,0));
if (tmp != a.end() && (*tmp).x==x.fi&&(*tmp).y==x.se)return (*tmp).id;
else return -1;
};
for (ll i = 0;i < n;i ++){
// cout<<i<<endl;
if (((a[i].x + a[i].y)/2)&1){
if (bench.find(MP(a[i].x + 1,a[i].y - 1)) == bench.end() && id(MP(a[i].x,a[i].y-2)) != -1){
add(a[i].id,id(MP(a[i].x,a[i].y-2)),a[i].x+1,a[i].y-1);
}
if (bench.find(MP(a[i].x - 1,a[i].y - 1)) == bench.end() && id(MP(a[i].x-2,a[i].y)) != -1){
add(a[i].id,id(MP(a[i].x-2,a[i].y)),a[i].x-1,a[i].y-1);
}
}
else{
// cout<<i<<endl;
if (bench.find(MP(a[i].x - 1,a[i].y - 1)) == bench.end() && id(MP(a[i].x,a[i].y-2)) != -1){
add(a[i].id,id(MP(a[i].x,a[i].y-2)),a[i].x-1,a[i].y-1);
}
if (bench.find(MP(a[i].x - 1,a[i].y + 1)) == bench.end() && id(MP(a[i].x-2,a[i].y)) != -1){
add(a[i].id,id(MP(a[i].x-2,a[i].y)),a[i].x-1,a[i].y+1);
}
}
}
{
if (dsu[f(0)] != -n)return 0;
build(U, V, A, B);
return 1;
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
344 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 |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
600 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
89 ms |
14080 KB |
Output is correct |
10 |
Correct |
6 ms |
1880 KB |
Output is correct |
11 |
Correct |
44 ms |
7888 KB |
Output is correct |
12 |
Correct |
17 ms |
2472 KB |
Output is correct |
13 |
Correct |
23 ms |
4812 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
2 ms |
520 KB |
Output is correct |
16 |
Correct |
83 ms |
13412 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
344 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 |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
600 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
89 ms |
14080 KB |
Output is correct |
10 |
Correct |
6 ms |
1880 KB |
Output is correct |
11 |
Correct |
44 ms |
7888 KB |
Output is correct |
12 |
Correct |
17 ms |
2472 KB |
Output is correct |
13 |
Correct |
23 ms |
4812 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
2 ms |
520 KB |
Output is correct |
16 |
Correct |
83 ms |
13412 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
1 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
600 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
166 ms |
26596 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
1 ms |
604 KB |
Output is correct |
26 |
Correct |
3 ms |
604 KB |
Output is correct |
27 |
Correct |
2 ms |
604 KB |
Output is correct |
28 |
Correct |
59 ms |
11000 KB |
Output is correct |
29 |
Correct |
96 ms |
16084 KB |
Output is correct |
30 |
Correct |
147 ms |
21480 KB |
Output is correct |
31 |
Correct |
171 ms |
26748 KB |
Output is correct |
32 |
Correct |
0 ms |
348 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 |
0 ms |
348 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 |
1 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
344 KB |
Output is correct |
43 |
Correct |
1 ms |
604 KB |
Output is correct |
44 |
Correct |
2 ms |
604 KB |
Output is correct |
45 |
Correct |
73 ms |
12976 KB |
Output is correct |
46 |
Correct |
129 ms |
18544 KB |
Output is correct |
47 |
Correct |
112 ms |
18640 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
344 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 |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
600 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
89 ms |
14080 KB |
Output is correct |
10 |
Correct |
6 ms |
1880 KB |
Output is correct |
11 |
Correct |
44 ms |
7888 KB |
Output is correct |
12 |
Correct |
17 ms |
2472 KB |
Output is correct |
13 |
Correct |
23 ms |
4812 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
2 ms |
520 KB |
Output is correct |
16 |
Correct |
83 ms |
13412 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
1 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
600 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
166 ms |
26596 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
1 ms |
604 KB |
Output is correct |
26 |
Correct |
3 ms |
604 KB |
Output is correct |
27 |
Correct |
2 ms |
604 KB |
Output is correct |
28 |
Correct |
59 ms |
11000 KB |
Output is correct |
29 |
Correct |
96 ms |
16084 KB |
Output is correct |
30 |
Correct |
147 ms |
21480 KB |
Output is correct |
31 |
Correct |
171 ms |
26748 KB |
Output is correct |
32 |
Correct |
0 ms |
348 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 |
0 ms |
348 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 |
1 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
344 KB |
Output is correct |
43 |
Correct |
1 ms |
604 KB |
Output is correct |
44 |
Correct |
2 ms |
604 KB |
Output is correct |
45 |
Correct |
73 ms |
12976 KB |
Output is correct |
46 |
Correct |
129 ms |
18544 KB |
Output is correct |
47 |
Correct |
112 ms |
18640 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 |
1 ms |
348 KB |
Output is correct |
55 |
Correct |
179 ms |
26264 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
1 ms |
604 KB |
Output is correct |
58 |
Correct |
4 ms |
1116 KB |
Output is correct |
59 |
Correct |
5 ms |
1372 KB |
Output is correct |
60 |
Correct |
72 ms |
13204 KB |
Output is correct |
61 |
Correct |
122 ms |
17828 KB |
Output is correct |
62 |
Correct |
128 ms |
21796 KB |
Output is correct |
63 |
Correct |
190 ms |
26276 KB |
Output is correct |
64 |
Correct |
0 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 |
172 ms |
26000 KB |
Output is correct |
68 |
Correct |
178 ms |
26680 KB |
Output is correct |
69 |
Correct |
195 ms |
25916 KB |
Output is correct |
70 |
Correct |
3 ms |
604 KB |
Output is correct |
71 |
Correct |
4 ms |
1116 KB |
Output is correct |
72 |
Correct |
97 ms |
13140 KB |
Output is correct |
73 |
Correct |
113 ms |
19636 KB |
Output is correct |
74 |
Correct |
178 ms |
25764 KB |
Output is correct |
75 |
Correct |
189 ms |
26280 KB |
Output is correct |
76 |
Correct |
172 ms |
26536 KB |
Output is correct |
77 |
Correct |
4 ms |
860 KB |
Output is correct |
78 |
Correct |
5 ms |
1352 KB |
Output is correct |
79 |
Correct |
70 ms |
12984 KB |
Output is correct |
80 |
Correct |
96 ms |
19108 KB |
Output is correct |
81 |
Correct |
129 ms |
25664 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
344 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 |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
600 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
89 ms |
14080 KB |
Output is correct |
10 |
Correct |
6 ms |
1880 KB |
Output is correct |
11 |
Correct |
44 ms |
7888 KB |
Output is correct |
12 |
Correct |
17 ms |
2472 KB |
Output is correct |
13 |
Correct |
23 ms |
4812 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
2 ms |
520 KB |
Output is correct |
16 |
Correct |
83 ms |
13412 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
153 ms |
25512 KB |
Output is correct |
21 |
Correct |
177 ms |
25896 KB |
Output is correct |
22 |
Correct |
154 ms |
25508 KB |
Output is correct |
23 |
Correct |
127 ms |
21928 KB |
Output is correct |
24 |
Correct |
45 ms |
6492 KB |
Output is correct |
25 |
Correct |
123 ms |
19108 KB |
Output is correct |
26 |
Correct |
101 ms |
18976 KB |
Output is correct |
27 |
Correct |
130 ms |
25512 KB |
Output is correct |
28 |
Correct |
134 ms |
25512 KB |
Output is correct |
29 |
Correct |
172 ms |
26536 KB |
Output is correct |
30 |
Correct |
160 ms |
26532 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
10 ms |
2484 KB |
Output is correct |
33 |
Correct |
25 ms |
4332 KB |
Output is correct |
34 |
Correct |
158 ms |
28840 KB |
Output is correct |
35 |
Correct |
6 ms |
1368 KB |
Output is correct |
36 |
Correct |
31 ms |
5628 KB |
Output is correct |
37 |
Correct |
61 ms |
10384 KB |
Output is correct |
38 |
Correct |
59 ms |
11192 KB |
Output is correct |
39 |
Correct |
86 ms |
15196 KB |
Output is correct |
40 |
Correct |
104 ms |
18852 KB |
Output is correct |
41 |
Correct |
149 ms |
22952 KB |
Output is correct |
42 |
Correct |
181 ms |
26852 KB |
Output is correct |
43 |
Correct |
0 ms |
348 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 |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
51 |
Correct |
1 ms |
348 KB |
Output is correct |
52 |
Correct |
1 ms |
348 KB |
Output is correct |
53 |
Correct |
1 ms |
348 KB |
Output is correct |
54 |
Correct |
2 ms |
460 KB |
Output is correct |
55 |
Correct |
3 ms |
752 KB |
Output is correct |
56 |
Correct |
66 ms |
13832 KB |
Output is correct |
57 |
Correct |
103 ms |
19368 KB |
Output is correct |
58 |
Correct |
95 ms |
19368 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 |
149 ms |
26900 KB |
Output is correct |
63 |
Correct |
208 ms |
27580 KB |
Output is correct |
64 |
Correct |
167 ms |
27044 KB |
Output is correct |
65 |
Correct |
2 ms |
856 KB |
Output is correct |
66 |
Correct |
4 ms |
1116 KB |
Output is correct |
67 |
Correct |
71 ms |
13888 KB |
Output is correct |
68 |
Correct |
111 ms |
20388 KB |
Output is correct |
69 |
Correct |
151 ms |
26936 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
344 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 |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
600 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
89 ms |
14080 KB |
Output is correct |
10 |
Correct |
6 ms |
1880 KB |
Output is correct |
11 |
Correct |
44 ms |
7888 KB |
Output is correct |
12 |
Correct |
17 ms |
2472 KB |
Output is correct |
13 |
Correct |
23 ms |
4812 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
2 ms |
520 KB |
Output is correct |
16 |
Correct |
83 ms |
13412 KB |
Output is correct |
17 |
Correct |
173 ms |
27264 KB |
Output is correct |
18 |
Correct |
163 ms |
27852 KB |
Output is correct |
19 |
Correct |
175 ms |
27304 KB |
Output is correct |
20 |
Correct |
151 ms |
25876 KB |
Output is correct |
21 |
Correct |
130 ms |
23464 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
26 ms |
4720 KB |
Output is correct |
24 |
Correct |
13 ms |
2388 KB |
Output is correct |
25 |
Correct |
47 ms |
7592 KB |
Output is correct |
26 |
Correct |
80 ms |
12732 KB |
Output is correct |
27 |
Correct |
83 ms |
13664 KB |
Output is correct |
28 |
Correct |
103 ms |
17160 KB |
Output is correct |
29 |
Correct |
128 ms |
20388 KB |
Output is correct |
30 |
Correct |
148 ms |
23460 KB |
Output is correct |
31 |
Correct |
170 ms |
27044 KB |
Output is correct |
32 |
Correct |
172 ms |
27300 KB |
Output is correct |
33 |
Correct |
169 ms |
27664 KB |
Output is correct |
34 |
Correct |
3 ms |
860 KB |
Output is correct |
35 |
Correct |
5 ms |
1360 KB |
Output is correct |
36 |
Correct |
73 ms |
13712 KB |
Output is correct |
37 |
Correct |
111 ms |
20340 KB |
Output is correct |
38 |
Correct |
149 ms |
26928 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
344 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 |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
600 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
89 ms |
14080 KB |
Output is correct |
10 |
Correct |
6 ms |
1880 KB |
Output is correct |
11 |
Correct |
44 ms |
7888 KB |
Output is correct |
12 |
Correct |
17 ms |
2472 KB |
Output is correct |
13 |
Correct |
23 ms |
4812 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
2 ms |
520 KB |
Output is correct |
16 |
Correct |
83 ms |
13412 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
1 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
600 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
166 ms |
26596 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
1 ms |
604 KB |
Output is correct |
26 |
Correct |
3 ms |
604 KB |
Output is correct |
27 |
Correct |
2 ms |
604 KB |
Output is correct |
28 |
Correct |
59 ms |
11000 KB |
Output is correct |
29 |
Correct |
96 ms |
16084 KB |
Output is correct |
30 |
Correct |
147 ms |
21480 KB |
Output is correct |
31 |
Correct |
171 ms |
26748 KB |
Output is correct |
32 |
Correct |
0 ms |
348 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 |
0 ms |
348 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 |
1 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
344 KB |
Output is correct |
43 |
Correct |
1 ms |
604 KB |
Output is correct |
44 |
Correct |
2 ms |
604 KB |
Output is correct |
45 |
Correct |
73 ms |
12976 KB |
Output is correct |
46 |
Correct |
129 ms |
18544 KB |
Output is correct |
47 |
Correct |
112 ms |
18640 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 |
1 ms |
348 KB |
Output is correct |
55 |
Correct |
179 ms |
26264 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
1 ms |
604 KB |
Output is correct |
58 |
Correct |
4 ms |
1116 KB |
Output is correct |
59 |
Correct |
5 ms |
1372 KB |
Output is correct |
60 |
Correct |
72 ms |
13204 KB |
Output is correct |
61 |
Correct |
122 ms |
17828 KB |
Output is correct |
62 |
Correct |
128 ms |
21796 KB |
Output is correct |
63 |
Correct |
190 ms |
26276 KB |
Output is correct |
64 |
Correct |
0 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 |
172 ms |
26000 KB |
Output is correct |
68 |
Correct |
178 ms |
26680 KB |
Output is correct |
69 |
Correct |
195 ms |
25916 KB |
Output is correct |
70 |
Correct |
3 ms |
604 KB |
Output is correct |
71 |
Correct |
4 ms |
1116 KB |
Output is correct |
72 |
Correct |
97 ms |
13140 KB |
Output is correct |
73 |
Correct |
113 ms |
19636 KB |
Output is correct |
74 |
Correct |
178 ms |
25764 KB |
Output is correct |
75 |
Correct |
189 ms |
26280 KB |
Output is correct |
76 |
Correct |
172 ms |
26536 KB |
Output is correct |
77 |
Correct |
4 ms |
860 KB |
Output is correct |
78 |
Correct |
5 ms |
1352 KB |
Output is correct |
79 |
Correct |
70 ms |
12984 KB |
Output is correct |
80 |
Correct |
96 ms |
19108 KB |
Output is correct |
81 |
Correct |
129 ms |
25664 KB |
Output is correct |
82 |
Correct |
0 ms |
348 KB |
Output is correct |
83 |
Correct |
0 ms |
348 KB |
Output is correct |
84 |
Correct |
0 ms |
348 KB |
Output is correct |
85 |
Correct |
153 ms |
25512 KB |
Output is correct |
86 |
Correct |
177 ms |
25896 KB |
Output is correct |
87 |
Correct |
154 ms |
25508 KB |
Output is correct |
88 |
Correct |
127 ms |
21928 KB |
Output is correct |
89 |
Correct |
45 ms |
6492 KB |
Output is correct |
90 |
Correct |
123 ms |
19108 KB |
Output is correct |
91 |
Correct |
101 ms |
18976 KB |
Output is correct |
92 |
Correct |
130 ms |
25512 KB |
Output is correct |
93 |
Correct |
134 ms |
25512 KB |
Output is correct |
94 |
Correct |
172 ms |
26536 KB |
Output is correct |
95 |
Correct |
160 ms |
26532 KB |
Output is correct |
96 |
Correct |
0 ms |
348 KB |
Output is correct |
97 |
Correct |
10 ms |
2484 KB |
Output is correct |
98 |
Correct |
25 ms |
4332 KB |
Output is correct |
99 |
Correct |
158 ms |
28840 KB |
Output is correct |
100 |
Correct |
6 ms |
1368 KB |
Output is correct |
101 |
Correct |
31 ms |
5628 KB |
Output is correct |
102 |
Correct |
61 ms |
10384 KB |
Output is correct |
103 |
Correct |
59 ms |
11192 KB |
Output is correct |
104 |
Correct |
86 ms |
15196 KB |
Output is correct |
105 |
Correct |
104 ms |
18852 KB |
Output is correct |
106 |
Correct |
149 ms |
22952 KB |
Output is correct |
107 |
Correct |
181 ms |
26852 KB |
Output is correct |
108 |
Correct |
0 ms |
348 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 |
348 KB |
Output is correct |
115 |
Correct |
0 ms |
348 KB |
Output is correct |
116 |
Correct |
1 ms |
348 KB |
Output is correct |
117 |
Correct |
1 ms |
348 KB |
Output is correct |
118 |
Correct |
1 ms |
348 KB |
Output is correct |
119 |
Correct |
2 ms |
460 KB |
Output is correct |
120 |
Correct |
3 ms |
752 KB |
Output is correct |
121 |
Correct |
66 ms |
13832 KB |
Output is correct |
122 |
Correct |
103 ms |
19368 KB |
Output is correct |
123 |
Correct |
95 ms |
19368 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 |
149 ms |
26900 KB |
Output is correct |
128 |
Correct |
208 ms |
27580 KB |
Output is correct |
129 |
Correct |
167 ms |
27044 KB |
Output is correct |
130 |
Correct |
2 ms |
856 KB |
Output is correct |
131 |
Correct |
4 ms |
1116 KB |
Output is correct |
132 |
Correct |
71 ms |
13888 KB |
Output is correct |
133 |
Correct |
111 ms |
20388 KB |
Output is correct |
134 |
Correct |
151 ms |
26936 KB |
Output is correct |
135 |
Correct |
173 ms |
27264 KB |
Output is correct |
136 |
Correct |
163 ms |
27852 KB |
Output is correct |
137 |
Correct |
175 ms |
27304 KB |
Output is correct |
138 |
Correct |
151 ms |
25876 KB |
Output is correct |
139 |
Correct |
130 ms |
23464 KB |
Output is correct |
140 |
Correct |
1 ms |
348 KB |
Output is correct |
141 |
Correct |
26 ms |
4720 KB |
Output is correct |
142 |
Correct |
13 ms |
2388 KB |
Output is correct |
143 |
Correct |
47 ms |
7592 KB |
Output is correct |
144 |
Correct |
80 ms |
12732 KB |
Output is correct |
145 |
Correct |
83 ms |
13664 KB |
Output is correct |
146 |
Correct |
103 ms |
17160 KB |
Output is correct |
147 |
Correct |
128 ms |
20388 KB |
Output is correct |
148 |
Correct |
148 ms |
23460 KB |
Output is correct |
149 |
Correct |
170 ms |
27044 KB |
Output is correct |
150 |
Correct |
172 ms |
27300 KB |
Output is correct |
151 |
Correct |
169 ms |
27664 KB |
Output is correct |
152 |
Correct |
3 ms |
860 KB |
Output is correct |
153 |
Correct |
5 ms |
1360 KB |
Output is correct |
154 |
Correct |
73 ms |
13712 KB |
Output is correct |
155 |
Correct |
111 ms |
20340 KB |
Output is correct |
156 |
Correct |
149 ms |
26928 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 |
154 ms |
26860 KB |
Output is correct |
162 |
Correct |
159 ms |
27816 KB |
Output is correct |
163 |
Correct |
146 ms |
28580 KB |
Output is correct |
164 |
Correct |
167 ms |
28444 KB |
Output is correct |
165 |
Correct |
156 ms |
27068 KB |
Output is correct |
166 |
Correct |
139 ms |
26744 KB |
Output is correct |
167 |
Correct |
34 ms |
6600 KB |
Output is correct |
168 |
Correct |
19 ms |
3672 KB |
Output is correct |
169 |
Correct |
47 ms |
8632 KB |
Output is correct |
170 |
Correct |
82 ms |
15780 KB |
Output is correct |
171 |
Correct |
129 ms |
20692 KB |
Output is correct |
172 |
Correct |
70 ms |
13748 KB |
Output is correct |
173 |
Correct |
95 ms |
16432 KB |
Output is correct |
174 |
Correct |
102 ms |
18908 KB |
Output is correct |
175 |
Correct |
118 ms |
21664 KB |
Output is correct |
176 |
Correct |
140 ms |
24232 KB |
Output is correct |
177 |
Correct |
152 ms |
27044 KB |
Output is correct |