#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define sz(a) (int)a.size()
#define all(a) begin(a),end(a)
using vi = vector<int>;
using ll = long long;
using ar2 = array<int,2>;
using ar3 = array<int,3>;
const int mxN = (int)2e5+10;
int n;
vector<ar3> A, origA;
vector<int> adj[mxN];
set<ar2> usedB, S[mxN];
template<int SZ> struct DSU{
int p[SZ], sz[SZ];
void init(int n){
for(int i = 0; i < n; i++) p[i]=i, sz[i]=1;
}
int findSet(int i){return p[i]==i?i:p[i]=findSet(p[i]);}
bool isSameSet(int i, int j) {return findSet(i)==findSet(j);}
void unionSet(int i, int j){
adj[i].pb(j); adj[j].pb(i);
int x = findSet(i), y = findSet(j);
if(x==y) return;
if(sz[x] < sz[y]) swap(x,y);
p[y]=x; sz[x]+=sz[y];
}
int findSz(int i) { return sz[findSet(i)]; }
};
DSU<mxN> dsu;
int construct_roads(vi x, vi y) {
vi U, V, W, Z; n = sz(x); dsu.init(n);
if (n==1){ build({}, {}, {}, {}); return 1; }
for(int i = 0; i < n; i++){
A.pb({x[i],y[i],i});
origA.pb({x[i],y[i],i});
}
sort(all(A),[&](ar3 a, ar3 b){
if(a[0]!=b[0]) return a[0]<b[0];
return a[1]<b[1];
});
for(int i = sz(A)-1; i>=0; i--)
S[A[i][0]].insert({A[i][1], A[i][2]});
for(int i = 1; i < sz(A); i++){
if(A[i][0]!=A[i-1][0]) continue;
if(A[i][1]-A[i-1][1]==2){
auto [x1,y1,a] = A[i-1];
auto [x2,y2,b] = A[i];
dsu.unionSet(a,b);
}
}
for(int i = 0; i < sz(A); i++){
auto [x1,y1,a] = A[i];
auto itr = S[x1+2].lower_bound({y1,-1});
if(itr==end(S[x1+2]) or (*itr)[0]!=y1) continue;
int b = (*itr)[1]; dsu.unionSet(a,b);
}
if(dsu.findSz(0)!=n) return 0;
for(auto [_1,_2,I] : A){
int choice = ((_1+_2)%4==0);
for(auto j : adj[I]){
auto [x1,y1,i] = origA[I];
auto [x2,y2,_] = origA[j];
int ver = 0;
if(x1==x2){
if(y1>y2) continue;
ver = 1;
}
else if(x1>x2) continue;
if(choice){
if(ver) x1++, y1++;
else x1++, y1--;
}
else{
if(ver) x1--, y1++;
else x1++, y1++;
}
if(!usedB.count({x1,y1})){
usedB.insert({x1,y1});
U.pb(i); V.pb(j); W.pb(x1); Z.pb(y1);
}
}
}
build(U,V,W,Z); return 1;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
15708 KB |
Output is correct |
2 |
Correct |
2 ms |
15800 KB |
Output is correct |
3 |
Correct |
2 ms |
15708 KB |
Output is correct |
4 |
Correct |
2 ms |
15908 KB |
Output is correct |
5 |
Correct |
2 ms |
15708 KB |
Output is correct |
6 |
Correct |
2 ms |
15708 KB |
Output is correct |
7 |
Correct |
2 ms |
15708 KB |
Output is correct |
8 |
Correct |
2 ms |
15804 KB |
Output is correct |
9 |
Correct |
85 ms |
38444 KB |
Output is correct |
10 |
Correct |
8 ms |
18140 KB |
Output is correct |
11 |
Correct |
36 ms |
27948 KB |
Output is correct |
12 |
Correct |
11 ms |
19420 KB |
Output is correct |
13 |
Correct |
15 ms |
21064 KB |
Output is correct |
14 |
Correct |
3 ms |
15964 KB |
Output is correct |
15 |
Correct |
3 ms |
15964 KB |
Output is correct |
16 |
Correct |
88 ms |
38656 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
15708 KB |
Output is correct |
2 |
Correct |
2 ms |
15800 KB |
Output is correct |
3 |
Correct |
2 ms |
15708 KB |
Output is correct |
4 |
Correct |
2 ms |
15908 KB |
Output is correct |
5 |
Correct |
2 ms |
15708 KB |
Output is correct |
6 |
Correct |
2 ms |
15708 KB |
Output is correct |
7 |
Correct |
2 ms |
15708 KB |
Output is correct |
8 |
Correct |
2 ms |
15804 KB |
Output is correct |
9 |
Correct |
85 ms |
38444 KB |
Output is correct |
10 |
Correct |
8 ms |
18140 KB |
Output is correct |
11 |
Correct |
36 ms |
27948 KB |
Output is correct |
12 |
Correct |
11 ms |
19420 KB |
Output is correct |
13 |
Correct |
15 ms |
21064 KB |
Output is correct |
14 |
Correct |
3 ms |
15964 KB |
Output is correct |
15 |
Correct |
3 ms |
15964 KB |
Output is correct |
16 |
Correct |
88 ms |
38656 KB |
Output is correct |
17 |
Correct |
3 ms |
15708 KB |
Output is correct |
18 |
Correct |
3 ms |
15896 KB |
Output is correct |
19 |
Correct |
2 ms |
15704 KB |
Output is correct |
20 |
Correct |
3 ms |
15708 KB |
Output is correct |
21 |
Correct |
3 ms |
15704 KB |
Output is correct |
22 |
Correct |
3 ms |
15708 KB |
Output is correct |
23 |
Correct |
208 ms |
62452 KB |
Output is correct |
24 |
Correct |
2 ms |
15708 KB |
Output is correct |
25 |
Correct |
4 ms |
16220 KB |
Output is correct |
26 |
Correct |
3 ms |
16124 KB |
Output is correct |
27 |
Correct |
4 ms |
16220 KB |
Output is correct |
28 |
Correct |
76 ms |
34064 KB |
Output is correct |
29 |
Correct |
110 ms |
43152 KB |
Output is correct |
30 |
Correct |
163 ms |
53604 KB |
Output is correct |
31 |
Correct |
198 ms |
62136 KB |
Output is correct |
32 |
Correct |
2 ms |
15708 KB |
Output is correct |
33 |
Correct |
2 ms |
15808 KB |
Output is correct |
34 |
Correct |
2 ms |
15708 KB |
Output is correct |
35 |
Correct |
2 ms |
15708 KB |
Output is correct |
36 |
Correct |
3 ms |
15708 KB |
Output is correct |
37 |
Correct |
3 ms |
15708 KB |
Output is correct |
38 |
Correct |
4 ms |
15708 KB |
Output is correct |
39 |
Correct |
2 ms |
15708 KB |
Output is correct |
40 |
Correct |
3 ms |
15708 KB |
Output is correct |
41 |
Correct |
2 ms |
15708 KB |
Output is correct |
42 |
Correct |
2 ms |
15708 KB |
Output is correct |
43 |
Correct |
4 ms |
15964 KB |
Output is correct |
44 |
Correct |
3 ms |
16220 KB |
Output is correct |
45 |
Correct |
127 ms |
38560 KB |
Output is correct |
46 |
Correct |
143 ms |
50804 KB |
Output is correct |
47 |
Correct |
129 ms |
50628 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
15708 KB |
Output is correct |
2 |
Correct |
2 ms |
15800 KB |
Output is correct |
3 |
Correct |
2 ms |
15708 KB |
Output is correct |
4 |
Correct |
2 ms |
15908 KB |
Output is correct |
5 |
Correct |
2 ms |
15708 KB |
Output is correct |
6 |
Correct |
2 ms |
15708 KB |
Output is correct |
7 |
Correct |
2 ms |
15708 KB |
Output is correct |
8 |
Correct |
2 ms |
15804 KB |
Output is correct |
9 |
Correct |
85 ms |
38444 KB |
Output is correct |
10 |
Correct |
8 ms |
18140 KB |
Output is correct |
11 |
Correct |
36 ms |
27948 KB |
Output is correct |
12 |
Correct |
11 ms |
19420 KB |
Output is correct |
13 |
Correct |
15 ms |
21064 KB |
Output is correct |
14 |
Correct |
3 ms |
15964 KB |
Output is correct |
15 |
Correct |
3 ms |
15964 KB |
Output is correct |
16 |
Correct |
88 ms |
38656 KB |
Output is correct |
17 |
Correct |
3 ms |
15708 KB |
Output is correct |
18 |
Correct |
3 ms |
15896 KB |
Output is correct |
19 |
Correct |
2 ms |
15704 KB |
Output is correct |
20 |
Correct |
3 ms |
15708 KB |
Output is correct |
21 |
Correct |
3 ms |
15704 KB |
Output is correct |
22 |
Correct |
3 ms |
15708 KB |
Output is correct |
23 |
Correct |
208 ms |
62452 KB |
Output is correct |
24 |
Correct |
2 ms |
15708 KB |
Output is correct |
25 |
Correct |
4 ms |
16220 KB |
Output is correct |
26 |
Correct |
3 ms |
16124 KB |
Output is correct |
27 |
Correct |
4 ms |
16220 KB |
Output is correct |
28 |
Correct |
76 ms |
34064 KB |
Output is correct |
29 |
Correct |
110 ms |
43152 KB |
Output is correct |
30 |
Correct |
163 ms |
53604 KB |
Output is correct |
31 |
Correct |
198 ms |
62136 KB |
Output is correct |
32 |
Correct |
2 ms |
15708 KB |
Output is correct |
33 |
Correct |
2 ms |
15808 KB |
Output is correct |
34 |
Correct |
2 ms |
15708 KB |
Output is correct |
35 |
Correct |
2 ms |
15708 KB |
Output is correct |
36 |
Correct |
3 ms |
15708 KB |
Output is correct |
37 |
Correct |
3 ms |
15708 KB |
Output is correct |
38 |
Correct |
4 ms |
15708 KB |
Output is correct |
39 |
Correct |
2 ms |
15708 KB |
Output is correct |
40 |
Correct |
3 ms |
15708 KB |
Output is correct |
41 |
Correct |
2 ms |
15708 KB |
Output is correct |
42 |
Correct |
2 ms |
15708 KB |
Output is correct |
43 |
Correct |
4 ms |
15964 KB |
Output is correct |
44 |
Correct |
3 ms |
16220 KB |
Output is correct |
45 |
Correct |
127 ms |
38560 KB |
Output is correct |
46 |
Correct |
143 ms |
50804 KB |
Output is correct |
47 |
Correct |
129 ms |
50628 KB |
Output is correct |
48 |
Correct |
2 ms |
15704 KB |
Output is correct |
49 |
Correct |
2 ms |
15708 KB |
Output is correct |
50 |
Correct |
2 ms |
15708 KB |
Output is correct |
51 |
Correct |
2 ms |
15708 KB |
Output is correct |
52 |
Correct |
3 ms |
15708 KB |
Output is correct |
53 |
Correct |
4 ms |
15960 KB |
Output is correct |
54 |
Correct |
2 ms |
15708 KB |
Output is correct |
55 |
Correct |
191 ms |
62052 KB |
Output is correct |
56 |
Correct |
2 ms |
15708 KB |
Output is correct |
57 |
Correct |
3 ms |
16220 KB |
Output is correct |
58 |
Correct |
7 ms |
17244 KB |
Output is correct |
59 |
Correct |
6 ms |
17132 KB |
Output is correct |
60 |
Correct |
102 ms |
38364 KB |
Output is correct |
61 |
Correct |
147 ms |
48656 KB |
Output is correct |
62 |
Correct |
157 ms |
53796 KB |
Output is correct |
63 |
Correct |
189 ms |
61176 KB |
Output is correct |
64 |
Correct |
2 ms |
15708 KB |
Output is correct |
65 |
Correct |
2 ms |
15708 KB |
Output is correct |
66 |
Correct |
2 ms |
15708 KB |
Output is correct |
67 |
Correct |
175 ms |
61460 KB |
Output is correct |
68 |
Correct |
169 ms |
61204 KB |
Output is correct |
69 |
Correct |
166 ms |
61096 KB |
Output is correct |
70 |
Correct |
4 ms |
16216 KB |
Output is correct |
71 |
Correct |
5 ms |
16732 KB |
Output is correct |
72 |
Correct |
84 ms |
38380 KB |
Output is correct |
73 |
Correct |
129 ms |
50544 KB |
Output is correct |
74 |
Correct |
184 ms |
61196 KB |
Output is correct |
75 |
Correct |
188 ms |
65808 KB |
Output is correct |
76 |
Correct |
169 ms |
61792 KB |
Output is correct |
77 |
Correct |
4 ms |
16472 KB |
Output is correct |
78 |
Correct |
5 ms |
16860 KB |
Output is correct |
79 |
Correct |
85 ms |
39540 KB |
Output is correct |
80 |
Correct |
134 ms |
52636 KB |
Output is correct |
81 |
Correct |
186 ms |
63500 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
15708 KB |
Output is correct |
2 |
Correct |
2 ms |
15800 KB |
Output is correct |
3 |
Correct |
2 ms |
15708 KB |
Output is correct |
4 |
Correct |
2 ms |
15908 KB |
Output is correct |
5 |
Correct |
2 ms |
15708 KB |
Output is correct |
6 |
Correct |
2 ms |
15708 KB |
Output is correct |
7 |
Correct |
2 ms |
15708 KB |
Output is correct |
8 |
Correct |
2 ms |
15804 KB |
Output is correct |
9 |
Correct |
85 ms |
38444 KB |
Output is correct |
10 |
Correct |
8 ms |
18140 KB |
Output is correct |
11 |
Correct |
36 ms |
27948 KB |
Output is correct |
12 |
Correct |
11 ms |
19420 KB |
Output is correct |
13 |
Correct |
15 ms |
21064 KB |
Output is correct |
14 |
Correct |
3 ms |
15964 KB |
Output is correct |
15 |
Correct |
3 ms |
15964 KB |
Output is correct |
16 |
Correct |
88 ms |
38656 KB |
Output is correct |
17 |
Correct |
2 ms |
15708 KB |
Output is correct |
18 |
Correct |
2 ms |
15708 KB |
Output is correct |
19 |
Correct |
2 ms |
15708 KB |
Output is correct |
20 |
Correct |
155 ms |
63784 KB |
Output is correct |
21 |
Correct |
161 ms |
63500 KB |
Output is correct |
22 |
Correct |
153 ms |
63148 KB |
Output is correct |
23 |
Correct |
131 ms |
55792 KB |
Output is correct |
24 |
Correct |
55 ms |
33840 KB |
Output is correct |
25 |
Correct |
81 ms |
40084 KB |
Output is correct |
26 |
Correct |
73 ms |
40560 KB |
Output is correct |
27 |
Correct |
149 ms |
62224 KB |
Output is correct |
28 |
Correct |
147 ms |
62392 KB |
Output is correct |
29 |
Correct |
162 ms |
61716 KB |
Output is correct |
30 |
Correct |
161 ms |
61972 KB |
Output is correct |
31 |
Correct |
2 ms |
15704 KB |
Output is correct |
32 |
Correct |
12 ms |
19164 KB |
Output is correct |
33 |
Correct |
26 ms |
25004 KB |
Output is correct |
34 |
Correct |
151 ms |
63772 KB |
Output is correct |
35 |
Correct |
7 ms |
17116 KB |
Output is correct |
36 |
Correct |
28 ms |
22040 KB |
Output is correct |
37 |
Correct |
42 ms |
28220 KB |
Output is correct |
38 |
Correct |
65 ms |
34948 KB |
Output is correct |
39 |
Correct |
88 ms |
41692 KB |
Output is correct |
40 |
Correct |
114 ms |
50920 KB |
Output is correct |
41 |
Correct |
139 ms |
56312 KB |
Output is correct |
42 |
Correct |
169 ms |
63372 KB |
Output is correct |
43 |
Correct |
2 ms |
15708 KB |
Output is correct |
44 |
Correct |
2 ms |
15908 KB |
Output is correct |
45 |
Correct |
2 ms |
15708 KB |
Output is correct |
46 |
Correct |
2 ms |
15804 KB |
Output is correct |
47 |
Correct |
2 ms |
15708 KB |
Output is correct |
48 |
Correct |
2 ms |
15708 KB |
Output is correct |
49 |
Correct |
2 ms |
15708 KB |
Output is correct |
50 |
Correct |
2 ms |
15708 KB |
Output is correct |
51 |
Correct |
2 ms |
15708 KB |
Output is correct |
52 |
Correct |
2 ms |
15708 KB |
Output is correct |
53 |
Correct |
2 ms |
15924 KB |
Output is correct |
54 |
Correct |
3 ms |
15964 KB |
Output is correct |
55 |
Correct |
3 ms |
16220 KB |
Output is correct |
56 |
Correct |
79 ms |
38556 KB |
Output is correct |
57 |
Correct |
128 ms |
50620 KB |
Output is correct |
58 |
Correct |
122 ms |
49856 KB |
Output is correct |
59 |
Correct |
2 ms |
15708 KB |
Output is correct |
60 |
Correct |
2 ms |
15708 KB |
Output is correct |
61 |
Correct |
2 ms |
15708 KB |
Output is correct |
62 |
Correct |
165 ms |
62088 KB |
Output is correct |
63 |
Correct |
165 ms |
61912 KB |
Output is correct |
64 |
Correct |
187 ms |
61724 KB |
Output is correct |
65 |
Correct |
4 ms |
16220 KB |
Output is correct |
66 |
Correct |
5 ms |
16732 KB |
Output is correct |
67 |
Correct |
81 ms |
38444 KB |
Output is correct |
68 |
Correct |
127 ms |
51992 KB |
Output is correct |
69 |
Correct |
190 ms |
62224 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
15708 KB |
Output is correct |
2 |
Correct |
2 ms |
15800 KB |
Output is correct |
3 |
Correct |
2 ms |
15708 KB |
Output is correct |
4 |
Correct |
2 ms |
15908 KB |
Output is correct |
5 |
Correct |
2 ms |
15708 KB |
Output is correct |
6 |
Correct |
2 ms |
15708 KB |
Output is correct |
7 |
Correct |
2 ms |
15708 KB |
Output is correct |
8 |
Correct |
2 ms |
15804 KB |
Output is correct |
9 |
Correct |
85 ms |
38444 KB |
Output is correct |
10 |
Correct |
8 ms |
18140 KB |
Output is correct |
11 |
Correct |
36 ms |
27948 KB |
Output is correct |
12 |
Correct |
11 ms |
19420 KB |
Output is correct |
13 |
Correct |
15 ms |
21064 KB |
Output is correct |
14 |
Correct |
3 ms |
15964 KB |
Output is correct |
15 |
Correct |
3 ms |
15964 KB |
Output is correct |
16 |
Correct |
88 ms |
38656 KB |
Output is correct |
17 |
Correct |
160 ms |
62708 KB |
Output is correct |
18 |
Correct |
154 ms |
62740 KB |
Output is correct |
19 |
Correct |
155 ms |
63248 KB |
Output is correct |
20 |
Correct |
180 ms |
68400 KB |
Output is correct |
21 |
Correct |
149 ms |
58828 KB |
Output is correct |
22 |
Correct |
2 ms |
15708 KB |
Output is correct |
23 |
Correct |
25 ms |
23484 KB |
Output is correct |
24 |
Correct |
10 ms |
18260 KB |
Output is correct |
25 |
Correct |
32 ms |
24380 KB |
Output is correct |
26 |
Correct |
50 ms |
30616 KB |
Output is correct |
27 |
Correct |
88 ms |
41768 KB |
Output is correct |
28 |
Correct |
118 ms |
47120 KB |
Output is correct |
29 |
Correct |
138 ms |
55516 KB |
Output is correct |
30 |
Correct |
158 ms |
61652 KB |
Output is correct |
31 |
Correct |
181 ms |
67820 KB |
Output is correct |
32 |
Correct |
191 ms |
66388 KB |
Output is correct |
33 |
Correct |
188 ms |
61960 KB |
Output is correct |
34 |
Correct |
4 ms |
16472 KB |
Output is correct |
35 |
Correct |
5 ms |
16856 KB |
Output is correct |
36 |
Correct |
85 ms |
39456 KB |
Output is correct |
37 |
Correct |
132 ms |
53160 KB |
Output is correct |
38 |
Correct |
186 ms |
64812 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
15708 KB |
Output is correct |
2 |
Correct |
2 ms |
15800 KB |
Output is correct |
3 |
Correct |
2 ms |
15708 KB |
Output is correct |
4 |
Correct |
2 ms |
15908 KB |
Output is correct |
5 |
Correct |
2 ms |
15708 KB |
Output is correct |
6 |
Correct |
2 ms |
15708 KB |
Output is correct |
7 |
Correct |
2 ms |
15708 KB |
Output is correct |
8 |
Correct |
2 ms |
15804 KB |
Output is correct |
9 |
Correct |
85 ms |
38444 KB |
Output is correct |
10 |
Correct |
8 ms |
18140 KB |
Output is correct |
11 |
Correct |
36 ms |
27948 KB |
Output is correct |
12 |
Correct |
11 ms |
19420 KB |
Output is correct |
13 |
Correct |
15 ms |
21064 KB |
Output is correct |
14 |
Correct |
3 ms |
15964 KB |
Output is correct |
15 |
Correct |
3 ms |
15964 KB |
Output is correct |
16 |
Correct |
88 ms |
38656 KB |
Output is correct |
17 |
Correct |
3 ms |
15708 KB |
Output is correct |
18 |
Correct |
3 ms |
15896 KB |
Output is correct |
19 |
Correct |
2 ms |
15704 KB |
Output is correct |
20 |
Correct |
3 ms |
15708 KB |
Output is correct |
21 |
Correct |
3 ms |
15704 KB |
Output is correct |
22 |
Correct |
3 ms |
15708 KB |
Output is correct |
23 |
Correct |
208 ms |
62452 KB |
Output is correct |
24 |
Correct |
2 ms |
15708 KB |
Output is correct |
25 |
Correct |
4 ms |
16220 KB |
Output is correct |
26 |
Correct |
3 ms |
16124 KB |
Output is correct |
27 |
Correct |
4 ms |
16220 KB |
Output is correct |
28 |
Correct |
76 ms |
34064 KB |
Output is correct |
29 |
Correct |
110 ms |
43152 KB |
Output is correct |
30 |
Correct |
163 ms |
53604 KB |
Output is correct |
31 |
Correct |
198 ms |
62136 KB |
Output is correct |
32 |
Correct |
2 ms |
15708 KB |
Output is correct |
33 |
Correct |
2 ms |
15808 KB |
Output is correct |
34 |
Correct |
2 ms |
15708 KB |
Output is correct |
35 |
Correct |
2 ms |
15708 KB |
Output is correct |
36 |
Correct |
3 ms |
15708 KB |
Output is correct |
37 |
Correct |
3 ms |
15708 KB |
Output is correct |
38 |
Correct |
4 ms |
15708 KB |
Output is correct |
39 |
Correct |
2 ms |
15708 KB |
Output is correct |
40 |
Correct |
3 ms |
15708 KB |
Output is correct |
41 |
Correct |
2 ms |
15708 KB |
Output is correct |
42 |
Correct |
2 ms |
15708 KB |
Output is correct |
43 |
Correct |
4 ms |
15964 KB |
Output is correct |
44 |
Correct |
3 ms |
16220 KB |
Output is correct |
45 |
Correct |
127 ms |
38560 KB |
Output is correct |
46 |
Correct |
143 ms |
50804 KB |
Output is correct |
47 |
Correct |
129 ms |
50628 KB |
Output is correct |
48 |
Correct |
2 ms |
15704 KB |
Output is correct |
49 |
Correct |
2 ms |
15708 KB |
Output is correct |
50 |
Correct |
2 ms |
15708 KB |
Output is correct |
51 |
Correct |
2 ms |
15708 KB |
Output is correct |
52 |
Correct |
3 ms |
15708 KB |
Output is correct |
53 |
Correct |
4 ms |
15960 KB |
Output is correct |
54 |
Correct |
2 ms |
15708 KB |
Output is correct |
55 |
Correct |
191 ms |
62052 KB |
Output is correct |
56 |
Correct |
2 ms |
15708 KB |
Output is correct |
57 |
Correct |
3 ms |
16220 KB |
Output is correct |
58 |
Correct |
7 ms |
17244 KB |
Output is correct |
59 |
Correct |
6 ms |
17132 KB |
Output is correct |
60 |
Correct |
102 ms |
38364 KB |
Output is correct |
61 |
Correct |
147 ms |
48656 KB |
Output is correct |
62 |
Correct |
157 ms |
53796 KB |
Output is correct |
63 |
Correct |
189 ms |
61176 KB |
Output is correct |
64 |
Correct |
2 ms |
15708 KB |
Output is correct |
65 |
Correct |
2 ms |
15708 KB |
Output is correct |
66 |
Correct |
2 ms |
15708 KB |
Output is correct |
67 |
Correct |
175 ms |
61460 KB |
Output is correct |
68 |
Correct |
169 ms |
61204 KB |
Output is correct |
69 |
Correct |
166 ms |
61096 KB |
Output is correct |
70 |
Correct |
4 ms |
16216 KB |
Output is correct |
71 |
Correct |
5 ms |
16732 KB |
Output is correct |
72 |
Correct |
84 ms |
38380 KB |
Output is correct |
73 |
Correct |
129 ms |
50544 KB |
Output is correct |
74 |
Correct |
184 ms |
61196 KB |
Output is correct |
75 |
Correct |
188 ms |
65808 KB |
Output is correct |
76 |
Correct |
169 ms |
61792 KB |
Output is correct |
77 |
Correct |
4 ms |
16472 KB |
Output is correct |
78 |
Correct |
5 ms |
16860 KB |
Output is correct |
79 |
Correct |
85 ms |
39540 KB |
Output is correct |
80 |
Correct |
134 ms |
52636 KB |
Output is correct |
81 |
Correct |
186 ms |
63500 KB |
Output is correct |
82 |
Correct |
2 ms |
15708 KB |
Output is correct |
83 |
Correct |
2 ms |
15708 KB |
Output is correct |
84 |
Correct |
2 ms |
15708 KB |
Output is correct |
85 |
Correct |
155 ms |
63784 KB |
Output is correct |
86 |
Correct |
161 ms |
63500 KB |
Output is correct |
87 |
Correct |
153 ms |
63148 KB |
Output is correct |
88 |
Correct |
131 ms |
55792 KB |
Output is correct |
89 |
Correct |
55 ms |
33840 KB |
Output is correct |
90 |
Correct |
81 ms |
40084 KB |
Output is correct |
91 |
Correct |
73 ms |
40560 KB |
Output is correct |
92 |
Correct |
149 ms |
62224 KB |
Output is correct |
93 |
Correct |
147 ms |
62392 KB |
Output is correct |
94 |
Correct |
162 ms |
61716 KB |
Output is correct |
95 |
Correct |
161 ms |
61972 KB |
Output is correct |
96 |
Correct |
2 ms |
15704 KB |
Output is correct |
97 |
Correct |
12 ms |
19164 KB |
Output is correct |
98 |
Correct |
26 ms |
25004 KB |
Output is correct |
99 |
Correct |
151 ms |
63772 KB |
Output is correct |
100 |
Correct |
7 ms |
17116 KB |
Output is correct |
101 |
Correct |
28 ms |
22040 KB |
Output is correct |
102 |
Correct |
42 ms |
28220 KB |
Output is correct |
103 |
Correct |
65 ms |
34948 KB |
Output is correct |
104 |
Correct |
88 ms |
41692 KB |
Output is correct |
105 |
Correct |
114 ms |
50920 KB |
Output is correct |
106 |
Correct |
139 ms |
56312 KB |
Output is correct |
107 |
Correct |
169 ms |
63372 KB |
Output is correct |
108 |
Correct |
2 ms |
15708 KB |
Output is correct |
109 |
Correct |
2 ms |
15908 KB |
Output is correct |
110 |
Correct |
2 ms |
15708 KB |
Output is correct |
111 |
Correct |
2 ms |
15804 KB |
Output is correct |
112 |
Correct |
2 ms |
15708 KB |
Output is correct |
113 |
Correct |
2 ms |
15708 KB |
Output is correct |
114 |
Correct |
2 ms |
15708 KB |
Output is correct |
115 |
Correct |
2 ms |
15708 KB |
Output is correct |
116 |
Correct |
2 ms |
15708 KB |
Output is correct |
117 |
Correct |
2 ms |
15708 KB |
Output is correct |
118 |
Correct |
2 ms |
15924 KB |
Output is correct |
119 |
Correct |
3 ms |
15964 KB |
Output is correct |
120 |
Correct |
3 ms |
16220 KB |
Output is correct |
121 |
Correct |
79 ms |
38556 KB |
Output is correct |
122 |
Correct |
128 ms |
50620 KB |
Output is correct |
123 |
Correct |
122 ms |
49856 KB |
Output is correct |
124 |
Correct |
2 ms |
15708 KB |
Output is correct |
125 |
Correct |
2 ms |
15708 KB |
Output is correct |
126 |
Correct |
2 ms |
15708 KB |
Output is correct |
127 |
Correct |
165 ms |
62088 KB |
Output is correct |
128 |
Correct |
165 ms |
61912 KB |
Output is correct |
129 |
Correct |
187 ms |
61724 KB |
Output is correct |
130 |
Correct |
4 ms |
16220 KB |
Output is correct |
131 |
Correct |
5 ms |
16732 KB |
Output is correct |
132 |
Correct |
81 ms |
38444 KB |
Output is correct |
133 |
Correct |
127 ms |
51992 KB |
Output is correct |
134 |
Correct |
190 ms |
62224 KB |
Output is correct |
135 |
Correct |
160 ms |
62708 KB |
Output is correct |
136 |
Correct |
154 ms |
62740 KB |
Output is correct |
137 |
Correct |
155 ms |
63248 KB |
Output is correct |
138 |
Correct |
180 ms |
68400 KB |
Output is correct |
139 |
Correct |
149 ms |
58828 KB |
Output is correct |
140 |
Correct |
2 ms |
15708 KB |
Output is correct |
141 |
Correct |
25 ms |
23484 KB |
Output is correct |
142 |
Correct |
10 ms |
18260 KB |
Output is correct |
143 |
Correct |
32 ms |
24380 KB |
Output is correct |
144 |
Correct |
50 ms |
30616 KB |
Output is correct |
145 |
Correct |
88 ms |
41768 KB |
Output is correct |
146 |
Correct |
118 ms |
47120 KB |
Output is correct |
147 |
Correct |
138 ms |
55516 KB |
Output is correct |
148 |
Correct |
158 ms |
61652 KB |
Output is correct |
149 |
Correct |
181 ms |
67820 KB |
Output is correct |
150 |
Correct |
191 ms |
66388 KB |
Output is correct |
151 |
Correct |
188 ms |
61960 KB |
Output is correct |
152 |
Correct |
4 ms |
16472 KB |
Output is correct |
153 |
Correct |
5 ms |
16856 KB |
Output is correct |
154 |
Correct |
85 ms |
39456 KB |
Output is correct |
155 |
Correct |
132 ms |
53160 KB |
Output is correct |
156 |
Correct |
186 ms |
64812 KB |
Output is correct |
157 |
Correct |
2 ms |
15708 KB |
Output is correct |
158 |
Correct |
2 ms |
15708 KB |
Output is correct |
159 |
Correct |
2 ms |
15708 KB |
Output is correct |
160 |
Correct |
2 ms |
15708 KB |
Output is correct |
161 |
Correct |
187 ms |
62160 KB |
Output is correct |
162 |
Correct |
156 ms |
62384 KB |
Output is correct |
163 |
Correct |
158 ms |
61964 KB |
Output is correct |
164 |
Correct |
163 ms |
62748 KB |
Output is correct |
165 |
Correct |
154 ms |
61896 KB |
Output is correct |
166 |
Correct |
167 ms |
61712 KB |
Output is correct |
167 |
Correct |
38 ms |
26652 KB |
Output is correct |
168 |
Correct |
13 ms |
19540 KB |
Output is correct |
169 |
Correct |
37 ms |
25412 KB |
Output is correct |
170 |
Correct |
63 ms |
34480 KB |
Output is correct |
171 |
Correct |
86 ms |
40172 KB |
Output is correct |
172 |
Correct |
90 ms |
38948 KB |
Output is correct |
173 |
Correct |
102 ms |
43400 KB |
Output is correct |
174 |
Correct |
120 ms |
49872 KB |
Output is correct |
175 |
Correct |
139 ms |
53324 KB |
Output is correct |
176 |
Correct |
152 ms |
58028 KB |
Output is correct |
177 |
Correct |
182 ms |
62480 KB |
Output is correct |