#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pi;
void build(vector<int> u,vector<int> v, vector<int> a, vector<int> b);
void mbuild(vector<int> u,vector<int> v, vector<int> a, vector<int> b){
int m = u.size();
for(int i = 0; i < m; i++){
cout << u[i] << " " << v[i] << " " << a[i] << " " << b[i] << "\n";
}
}
int construct_roads(vector<int> sus, vector<int> amongus){
set<array<int,3>> a; set<array<int,2>> used;
int n = sus.size();
vector<int> par(n),sz(n,1); int cnt = n;
for(int i = 0; i < n; i++) a.insert({sus[i],amongus[i],i}),par[i] = i;
auto has = [&](int x, int y){
auto itr = a.lower_bound({x,y,-1});
if(itr == a.end()) return -1;
if((*itr)[0] != x || (*itr)[1] != y) return -1;
return (*itr)[2];
};
auto find = [&](int x){
while(x != par[x]){
par[x] = par[par[x]];
x = par[x];
}
return x;
};
auto join = [&](int x, int y){
x = find(x); y = find(y);
if(x == y) return false;
if(sz[x] > sz[y]) swap(x,y);
sz[y] += sz[x];
cnt--;
par[x] = y;
return true;
};
vector<int> u,v,ba,bb;
auto add_sol = [&](int i, int j, int x, int y){ // connect fountain i and j with (x,y) bench
u.emplace_back(i); v.emplace_back(j);
used.insert({x,y});
ba.emplace_back(x); bb.emplace_back(y);
};
for(auto[x,y,i] : a){
int p;
if((p = has(x+2,y)) != -1){
if(find(i) != find(p)){
if((x+y) % 4 == 0){
join(i,p);
add_sol(i,p,x+1,y+1);
} else if(used.find({x+1,y-1}) == used.end()){
join(i,p);
add_sol(i,p,x+1,y-1);
}
}
}
if((p = has(x,y+2)) != -1){
if(find(i) != find(p)){
if((x+y) % 4 != 0){
join(i,p);
add_sol(i,p,x+1,y+1);
} else if(used.find({x-1,y+1}) == used.end()){
join(i,p);
add_sol(i,p,x-1,y+1);
}
}
}
}
if(cnt != 1) return 0;
build(u,v,ba,bb);
//mbuild(u,v,ba,bb);
return 1;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
292 KB |
Output is correct |
5 |
Correct |
0 ms |
288 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
292 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
145 ms |
18344 KB |
Output is correct |
10 |
Correct |
11 ms |
2252 KB |
Output is correct |
11 |
Correct |
64 ms |
9944 KB |
Output is correct |
12 |
Correct |
16 ms |
3232 KB |
Output is correct |
13 |
Correct |
43 ms |
6904 KB |
Output is correct |
14 |
Correct |
1 ms |
332 KB |
Output is correct |
15 |
Correct |
2 ms |
640 KB |
Output is correct |
16 |
Correct |
141 ms |
18352 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
292 KB |
Output is correct |
5 |
Correct |
0 ms |
288 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
292 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
145 ms |
18344 KB |
Output is correct |
10 |
Correct |
11 ms |
2252 KB |
Output is correct |
11 |
Correct |
64 ms |
9944 KB |
Output is correct |
12 |
Correct |
16 ms |
3232 KB |
Output is correct |
13 |
Correct |
43 ms |
6904 KB |
Output is correct |
14 |
Correct |
1 ms |
332 KB |
Output is correct |
15 |
Correct |
2 ms |
640 KB |
Output is correct |
16 |
Correct |
141 ms |
18352 KB |
Output is correct |
17 |
Correct |
0 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
204 KB |
Output is correct |
19 |
Correct |
0 ms |
204 KB |
Output is correct |
20 |
Correct |
0 ms |
204 KB |
Output is correct |
21 |
Correct |
1 ms |
204 KB |
Output is correct |
22 |
Correct |
0 ms |
204 KB |
Output is correct |
23 |
Correct |
376 ms |
36400 KB |
Output is correct |
24 |
Correct |
0 ms |
204 KB |
Output is correct |
25 |
Correct |
2 ms |
416 KB |
Output is correct |
26 |
Correct |
3 ms |
716 KB |
Output is correct |
27 |
Correct |
3 ms |
844 KB |
Output is correct |
28 |
Correct |
116 ms |
14752 KB |
Output is correct |
29 |
Correct |
197 ms |
21996 KB |
Output is correct |
30 |
Correct |
260 ms |
29144 KB |
Output is correct |
31 |
Correct |
348 ms |
36372 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
0 ms |
204 KB |
Output is correct |
34 |
Correct |
1 ms |
204 KB |
Output is correct |
35 |
Correct |
0 ms |
204 KB |
Output is correct |
36 |
Correct |
1 ms |
204 KB |
Output is correct |
37 |
Correct |
1 ms |
204 KB |
Output is correct |
38 |
Correct |
0 ms |
204 KB |
Output is correct |
39 |
Correct |
0 ms |
204 KB |
Output is correct |
40 |
Correct |
0 ms |
204 KB |
Output is correct |
41 |
Correct |
0 ms |
204 KB |
Output is correct |
42 |
Correct |
0 ms |
292 KB |
Output is correct |
43 |
Correct |
2 ms |
588 KB |
Output is correct |
44 |
Correct |
3 ms |
716 KB |
Output is correct |
45 |
Correct |
138 ms |
18336 KB |
Output is correct |
46 |
Correct |
248 ms |
27628 KB |
Output is correct |
47 |
Correct |
263 ms |
27600 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
292 KB |
Output is correct |
5 |
Correct |
0 ms |
288 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
292 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
145 ms |
18344 KB |
Output is correct |
10 |
Correct |
11 ms |
2252 KB |
Output is correct |
11 |
Correct |
64 ms |
9944 KB |
Output is correct |
12 |
Correct |
16 ms |
3232 KB |
Output is correct |
13 |
Correct |
43 ms |
6904 KB |
Output is correct |
14 |
Correct |
1 ms |
332 KB |
Output is correct |
15 |
Correct |
2 ms |
640 KB |
Output is correct |
16 |
Correct |
141 ms |
18352 KB |
Output is correct |
17 |
Correct |
0 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
204 KB |
Output is correct |
19 |
Correct |
0 ms |
204 KB |
Output is correct |
20 |
Correct |
0 ms |
204 KB |
Output is correct |
21 |
Correct |
1 ms |
204 KB |
Output is correct |
22 |
Correct |
0 ms |
204 KB |
Output is correct |
23 |
Correct |
376 ms |
36400 KB |
Output is correct |
24 |
Correct |
0 ms |
204 KB |
Output is correct |
25 |
Correct |
2 ms |
416 KB |
Output is correct |
26 |
Correct |
3 ms |
716 KB |
Output is correct |
27 |
Correct |
3 ms |
844 KB |
Output is correct |
28 |
Correct |
116 ms |
14752 KB |
Output is correct |
29 |
Correct |
197 ms |
21996 KB |
Output is correct |
30 |
Correct |
260 ms |
29144 KB |
Output is correct |
31 |
Correct |
348 ms |
36372 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
0 ms |
204 KB |
Output is correct |
34 |
Correct |
1 ms |
204 KB |
Output is correct |
35 |
Correct |
0 ms |
204 KB |
Output is correct |
36 |
Correct |
1 ms |
204 KB |
Output is correct |
37 |
Correct |
1 ms |
204 KB |
Output is correct |
38 |
Correct |
0 ms |
204 KB |
Output is correct |
39 |
Correct |
0 ms |
204 KB |
Output is correct |
40 |
Correct |
0 ms |
204 KB |
Output is correct |
41 |
Correct |
0 ms |
204 KB |
Output is correct |
42 |
Correct |
0 ms |
292 KB |
Output is correct |
43 |
Correct |
2 ms |
588 KB |
Output is correct |
44 |
Correct |
3 ms |
716 KB |
Output is correct |
45 |
Correct |
138 ms |
18336 KB |
Output is correct |
46 |
Correct |
248 ms |
27628 KB |
Output is correct |
47 |
Correct |
263 ms |
27600 KB |
Output is correct |
48 |
Correct |
0 ms |
204 KB |
Output is correct |
49 |
Correct |
0 ms |
284 KB |
Output is correct |
50 |
Correct |
0 ms |
204 KB |
Output is correct |
51 |
Correct |
0 ms |
292 KB |
Output is correct |
52 |
Correct |
0 ms |
204 KB |
Output is correct |
53 |
Correct |
0 ms |
288 KB |
Output is correct |
54 |
Correct |
0 ms |
204 KB |
Output is correct |
55 |
Correct |
380 ms |
37884 KB |
Output is correct |
56 |
Correct |
0 ms |
204 KB |
Output is correct |
57 |
Correct |
2 ms |
588 KB |
Output is correct |
58 |
Correct |
7 ms |
1460 KB |
Output is correct |
59 |
Correct |
12 ms |
1840 KB |
Output is correct |
60 |
Correct |
149 ms |
18948 KB |
Output is correct |
61 |
Correct |
206 ms |
25408 KB |
Output is correct |
62 |
Correct |
305 ms |
31400 KB |
Output is correct |
63 |
Correct |
351 ms |
36880 KB |
Output is correct |
64 |
Correct |
0 ms |
204 KB |
Output is correct |
65 |
Correct |
0 ms |
204 KB |
Output is correct |
66 |
Correct |
0 ms |
204 KB |
Output is correct |
67 |
Correct |
359 ms |
37892 KB |
Output is correct |
68 |
Correct |
397 ms |
37652 KB |
Output is correct |
69 |
Correct |
377 ms |
37732 KB |
Output is correct |
70 |
Correct |
4 ms |
844 KB |
Output is correct |
71 |
Correct |
7 ms |
1536 KB |
Output is correct |
72 |
Correct |
152 ms |
19072 KB |
Output is correct |
73 |
Correct |
237 ms |
28568 KB |
Output is correct |
74 |
Correct |
342 ms |
37888 KB |
Output is correct |
75 |
Correct |
390 ms |
37988 KB |
Output is correct |
76 |
Correct |
370 ms |
37892 KB |
Output is correct |
77 |
Correct |
4 ms |
1032 KB |
Output is correct |
78 |
Correct |
9 ms |
1840 KB |
Output is correct |
79 |
Correct |
144 ms |
18980 KB |
Output is correct |
80 |
Correct |
254 ms |
28548 KB |
Output is correct |
81 |
Correct |
364 ms |
37896 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
292 KB |
Output is correct |
5 |
Correct |
0 ms |
288 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
292 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
145 ms |
18344 KB |
Output is correct |
10 |
Correct |
11 ms |
2252 KB |
Output is correct |
11 |
Correct |
64 ms |
9944 KB |
Output is correct |
12 |
Correct |
16 ms |
3232 KB |
Output is correct |
13 |
Correct |
43 ms |
6904 KB |
Output is correct |
14 |
Correct |
1 ms |
332 KB |
Output is correct |
15 |
Correct |
2 ms |
640 KB |
Output is correct |
16 |
Correct |
141 ms |
18352 KB |
Output is correct |
17 |
Correct |
0 ms |
204 KB |
Output is correct |
18 |
Correct |
0 ms |
204 KB |
Output is correct |
19 |
Correct |
1 ms |
288 KB |
Output is correct |
20 |
Correct |
357 ms |
38832 KB |
Output is correct |
21 |
Correct |
392 ms |
38684 KB |
Output is correct |
22 |
Correct |
395 ms |
38604 KB |
Output is correct |
23 |
Correct |
284 ms |
32660 KB |
Output is correct |
24 |
Correct |
196 ms |
19304 KB |
Output is correct |
25 |
Correct |
356 ms |
31612 KB |
Output is correct |
26 |
Correct |
295 ms |
31576 KB |
Output is correct |
27 |
Correct |
318 ms |
37912 KB |
Output is correct |
28 |
Correct |
318 ms |
37924 KB |
Output is correct |
29 |
Correct |
334 ms |
38184 KB |
Output is correct |
30 |
Correct |
353 ms |
37936 KB |
Output is correct |
31 |
Correct |
0 ms |
204 KB |
Output is correct |
32 |
Correct |
17 ms |
3260 KB |
Output is correct |
33 |
Correct |
77 ms |
10140 KB |
Output is correct |
34 |
Correct |
318 ms |
38796 KB |
Output is correct |
35 |
Correct |
9 ms |
1868 KB |
Output is correct |
36 |
Correct |
61 ms |
8232 KB |
Output is correct |
37 |
Correct |
111 ms |
16300 KB |
Output is correct |
38 |
Correct |
116 ms |
15740 KB |
Output is correct |
39 |
Correct |
159 ms |
21456 KB |
Output is correct |
40 |
Correct |
227 ms |
27260 KB |
Output is correct |
41 |
Correct |
270 ms |
33200 KB |
Output is correct |
42 |
Correct |
331 ms |
38868 KB |
Output is correct |
43 |
Correct |
1 ms |
292 KB |
Output is correct |
44 |
Correct |
0 ms |
204 KB |
Output is correct |
45 |
Correct |
0 ms |
204 KB |
Output is correct |
46 |
Correct |
0 ms |
204 KB |
Output is correct |
47 |
Correct |
0 ms |
292 KB |
Output is correct |
48 |
Correct |
0 ms |
204 KB |
Output is correct |
49 |
Correct |
0 ms |
204 KB |
Output is correct |
50 |
Correct |
0 ms |
204 KB |
Output is correct |
51 |
Correct |
0 ms |
204 KB |
Output is correct |
52 |
Correct |
0 ms |
204 KB |
Output is correct |
53 |
Correct |
0 ms |
292 KB |
Output is correct |
54 |
Correct |
2 ms |
588 KB |
Output is correct |
55 |
Correct |
2 ms |
716 KB |
Output is correct |
56 |
Correct |
146 ms |
19144 KB |
Output is correct |
57 |
Correct |
226 ms |
27624 KB |
Output is correct |
58 |
Correct |
269 ms |
27544 KB |
Output is correct |
59 |
Correct |
0 ms |
288 KB |
Output is correct |
60 |
Correct |
0 ms |
204 KB |
Output is correct |
61 |
Correct |
0 ms |
296 KB |
Output is correct |
62 |
Correct |
339 ms |
37904 KB |
Output is correct |
63 |
Correct |
346 ms |
38004 KB |
Output is correct |
64 |
Correct |
347 ms |
37768 KB |
Output is correct |
65 |
Correct |
4 ms |
844 KB |
Output is correct |
66 |
Correct |
7 ms |
1444 KB |
Output is correct |
67 |
Correct |
193 ms |
19028 KB |
Output is correct |
68 |
Correct |
243 ms |
28488 KB |
Output is correct |
69 |
Correct |
329 ms |
37980 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
292 KB |
Output is correct |
5 |
Correct |
0 ms |
288 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
292 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
145 ms |
18344 KB |
Output is correct |
10 |
Correct |
11 ms |
2252 KB |
Output is correct |
11 |
Correct |
64 ms |
9944 KB |
Output is correct |
12 |
Correct |
16 ms |
3232 KB |
Output is correct |
13 |
Correct |
43 ms |
6904 KB |
Output is correct |
14 |
Correct |
1 ms |
332 KB |
Output is correct |
15 |
Correct |
2 ms |
640 KB |
Output is correct |
16 |
Correct |
141 ms |
18352 KB |
Output is correct |
17 |
Correct |
339 ms |
36464 KB |
Output is correct |
18 |
Correct |
339 ms |
36488 KB |
Output is correct |
19 |
Correct |
368 ms |
36500 KB |
Output is correct |
20 |
Correct |
308 ms |
37048 KB |
Output is correct |
21 |
Correct |
261 ms |
33304 KB |
Output is correct |
22 |
Correct |
0 ms |
204 KB |
Output is correct |
23 |
Correct |
38 ms |
6576 KB |
Output is correct |
24 |
Correct |
19 ms |
3456 KB |
Output is correct |
25 |
Correct |
84 ms |
11704 KB |
Output is correct |
26 |
Correct |
135 ms |
19584 KB |
Output is correct |
27 |
Correct |
150 ms |
19568 KB |
Output is correct |
28 |
Correct |
199 ms |
24728 KB |
Output is correct |
29 |
Correct |
269 ms |
29324 KB |
Output is correct |
30 |
Correct |
294 ms |
33732 KB |
Output is correct |
31 |
Correct |
356 ms |
38788 KB |
Output is correct |
32 |
Correct |
377 ms |
37940 KB |
Output is correct |
33 |
Correct |
372 ms |
37968 KB |
Output is correct |
34 |
Correct |
5 ms |
972 KB |
Output is correct |
35 |
Correct |
8 ms |
1704 KB |
Output is correct |
36 |
Correct |
149 ms |
18976 KB |
Output is correct |
37 |
Correct |
266 ms |
28536 KB |
Output is correct |
38 |
Correct |
343 ms |
38016 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
292 KB |
Output is correct |
5 |
Correct |
0 ms |
288 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
292 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
145 ms |
18344 KB |
Output is correct |
10 |
Correct |
11 ms |
2252 KB |
Output is correct |
11 |
Correct |
64 ms |
9944 KB |
Output is correct |
12 |
Correct |
16 ms |
3232 KB |
Output is correct |
13 |
Correct |
43 ms |
6904 KB |
Output is correct |
14 |
Correct |
1 ms |
332 KB |
Output is correct |
15 |
Correct |
2 ms |
640 KB |
Output is correct |
16 |
Correct |
141 ms |
18352 KB |
Output is correct |
17 |
Correct |
0 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
204 KB |
Output is correct |
19 |
Correct |
0 ms |
204 KB |
Output is correct |
20 |
Correct |
0 ms |
204 KB |
Output is correct |
21 |
Correct |
1 ms |
204 KB |
Output is correct |
22 |
Correct |
0 ms |
204 KB |
Output is correct |
23 |
Correct |
376 ms |
36400 KB |
Output is correct |
24 |
Correct |
0 ms |
204 KB |
Output is correct |
25 |
Correct |
2 ms |
416 KB |
Output is correct |
26 |
Correct |
3 ms |
716 KB |
Output is correct |
27 |
Correct |
3 ms |
844 KB |
Output is correct |
28 |
Correct |
116 ms |
14752 KB |
Output is correct |
29 |
Correct |
197 ms |
21996 KB |
Output is correct |
30 |
Correct |
260 ms |
29144 KB |
Output is correct |
31 |
Correct |
348 ms |
36372 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
0 ms |
204 KB |
Output is correct |
34 |
Correct |
1 ms |
204 KB |
Output is correct |
35 |
Correct |
0 ms |
204 KB |
Output is correct |
36 |
Correct |
1 ms |
204 KB |
Output is correct |
37 |
Correct |
1 ms |
204 KB |
Output is correct |
38 |
Correct |
0 ms |
204 KB |
Output is correct |
39 |
Correct |
0 ms |
204 KB |
Output is correct |
40 |
Correct |
0 ms |
204 KB |
Output is correct |
41 |
Correct |
0 ms |
204 KB |
Output is correct |
42 |
Correct |
0 ms |
292 KB |
Output is correct |
43 |
Correct |
2 ms |
588 KB |
Output is correct |
44 |
Correct |
3 ms |
716 KB |
Output is correct |
45 |
Correct |
138 ms |
18336 KB |
Output is correct |
46 |
Correct |
248 ms |
27628 KB |
Output is correct |
47 |
Correct |
263 ms |
27600 KB |
Output is correct |
48 |
Correct |
0 ms |
204 KB |
Output is correct |
49 |
Correct |
0 ms |
284 KB |
Output is correct |
50 |
Correct |
0 ms |
204 KB |
Output is correct |
51 |
Correct |
0 ms |
292 KB |
Output is correct |
52 |
Correct |
0 ms |
204 KB |
Output is correct |
53 |
Correct |
0 ms |
288 KB |
Output is correct |
54 |
Correct |
0 ms |
204 KB |
Output is correct |
55 |
Correct |
380 ms |
37884 KB |
Output is correct |
56 |
Correct |
0 ms |
204 KB |
Output is correct |
57 |
Correct |
2 ms |
588 KB |
Output is correct |
58 |
Correct |
7 ms |
1460 KB |
Output is correct |
59 |
Correct |
12 ms |
1840 KB |
Output is correct |
60 |
Correct |
149 ms |
18948 KB |
Output is correct |
61 |
Correct |
206 ms |
25408 KB |
Output is correct |
62 |
Correct |
305 ms |
31400 KB |
Output is correct |
63 |
Correct |
351 ms |
36880 KB |
Output is correct |
64 |
Correct |
0 ms |
204 KB |
Output is correct |
65 |
Correct |
0 ms |
204 KB |
Output is correct |
66 |
Correct |
0 ms |
204 KB |
Output is correct |
67 |
Correct |
359 ms |
37892 KB |
Output is correct |
68 |
Correct |
397 ms |
37652 KB |
Output is correct |
69 |
Correct |
377 ms |
37732 KB |
Output is correct |
70 |
Correct |
4 ms |
844 KB |
Output is correct |
71 |
Correct |
7 ms |
1536 KB |
Output is correct |
72 |
Correct |
152 ms |
19072 KB |
Output is correct |
73 |
Correct |
237 ms |
28568 KB |
Output is correct |
74 |
Correct |
342 ms |
37888 KB |
Output is correct |
75 |
Correct |
390 ms |
37988 KB |
Output is correct |
76 |
Correct |
370 ms |
37892 KB |
Output is correct |
77 |
Correct |
4 ms |
1032 KB |
Output is correct |
78 |
Correct |
9 ms |
1840 KB |
Output is correct |
79 |
Correct |
144 ms |
18980 KB |
Output is correct |
80 |
Correct |
254 ms |
28548 KB |
Output is correct |
81 |
Correct |
364 ms |
37896 KB |
Output is correct |
82 |
Correct |
0 ms |
204 KB |
Output is correct |
83 |
Correct |
0 ms |
204 KB |
Output is correct |
84 |
Correct |
1 ms |
288 KB |
Output is correct |
85 |
Correct |
357 ms |
38832 KB |
Output is correct |
86 |
Correct |
392 ms |
38684 KB |
Output is correct |
87 |
Correct |
395 ms |
38604 KB |
Output is correct |
88 |
Correct |
284 ms |
32660 KB |
Output is correct |
89 |
Correct |
196 ms |
19304 KB |
Output is correct |
90 |
Correct |
356 ms |
31612 KB |
Output is correct |
91 |
Correct |
295 ms |
31576 KB |
Output is correct |
92 |
Correct |
318 ms |
37912 KB |
Output is correct |
93 |
Correct |
318 ms |
37924 KB |
Output is correct |
94 |
Correct |
334 ms |
38184 KB |
Output is correct |
95 |
Correct |
353 ms |
37936 KB |
Output is correct |
96 |
Correct |
0 ms |
204 KB |
Output is correct |
97 |
Correct |
17 ms |
3260 KB |
Output is correct |
98 |
Correct |
77 ms |
10140 KB |
Output is correct |
99 |
Correct |
318 ms |
38796 KB |
Output is correct |
100 |
Correct |
9 ms |
1868 KB |
Output is correct |
101 |
Correct |
61 ms |
8232 KB |
Output is correct |
102 |
Correct |
111 ms |
16300 KB |
Output is correct |
103 |
Correct |
116 ms |
15740 KB |
Output is correct |
104 |
Correct |
159 ms |
21456 KB |
Output is correct |
105 |
Correct |
227 ms |
27260 KB |
Output is correct |
106 |
Correct |
270 ms |
33200 KB |
Output is correct |
107 |
Correct |
331 ms |
38868 KB |
Output is correct |
108 |
Correct |
1 ms |
292 KB |
Output is correct |
109 |
Correct |
0 ms |
204 KB |
Output is correct |
110 |
Correct |
0 ms |
204 KB |
Output is correct |
111 |
Correct |
0 ms |
204 KB |
Output is correct |
112 |
Correct |
0 ms |
292 KB |
Output is correct |
113 |
Correct |
0 ms |
204 KB |
Output is correct |
114 |
Correct |
0 ms |
204 KB |
Output is correct |
115 |
Correct |
0 ms |
204 KB |
Output is correct |
116 |
Correct |
0 ms |
204 KB |
Output is correct |
117 |
Correct |
0 ms |
204 KB |
Output is correct |
118 |
Correct |
0 ms |
292 KB |
Output is correct |
119 |
Correct |
2 ms |
588 KB |
Output is correct |
120 |
Correct |
2 ms |
716 KB |
Output is correct |
121 |
Correct |
146 ms |
19144 KB |
Output is correct |
122 |
Correct |
226 ms |
27624 KB |
Output is correct |
123 |
Correct |
269 ms |
27544 KB |
Output is correct |
124 |
Correct |
0 ms |
288 KB |
Output is correct |
125 |
Correct |
0 ms |
204 KB |
Output is correct |
126 |
Correct |
0 ms |
296 KB |
Output is correct |
127 |
Correct |
339 ms |
37904 KB |
Output is correct |
128 |
Correct |
346 ms |
38004 KB |
Output is correct |
129 |
Correct |
347 ms |
37768 KB |
Output is correct |
130 |
Correct |
4 ms |
844 KB |
Output is correct |
131 |
Correct |
7 ms |
1444 KB |
Output is correct |
132 |
Correct |
193 ms |
19028 KB |
Output is correct |
133 |
Correct |
243 ms |
28488 KB |
Output is correct |
134 |
Correct |
329 ms |
37980 KB |
Output is correct |
135 |
Correct |
339 ms |
36464 KB |
Output is correct |
136 |
Correct |
339 ms |
36488 KB |
Output is correct |
137 |
Correct |
368 ms |
36500 KB |
Output is correct |
138 |
Correct |
308 ms |
37048 KB |
Output is correct |
139 |
Correct |
261 ms |
33304 KB |
Output is correct |
140 |
Correct |
0 ms |
204 KB |
Output is correct |
141 |
Correct |
38 ms |
6576 KB |
Output is correct |
142 |
Correct |
19 ms |
3456 KB |
Output is correct |
143 |
Correct |
84 ms |
11704 KB |
Output is correct |
144 |
Correct |
135 ms |
19584 KB |
Output is correct |
145 |
Correct |
150 ms |
19568 KB |
Output is correct |
146 |
Correct |
199 ms |
24728 KB |
Output is correct |
147 |
Correct |
269 ms |
29324 KB |
Output is correct |
148 |
Correct |
294 ms |
33732 KB |
Output is correct |
149 |
Correct |
356 ms |
38788 KB |
Output is correct |
150 |
Correct |
377 ms |
37940 KB |
Output is correct |
151 |
Correct |
372 ms |
37968 KB |
Output is correct |
152 |
Correct |
5 ms |
972 KB |
Output is correct |
153 |
Correct |
8 ms |
1704 KB |
Output is correct |
154 |
Correct |
149 ms |
18976 KB |
Output is correct |
155 |
Correct |
266 ms |
28536 KB |
Output is correct |
156 |
Correct |
343 ms |
38016 KB |
Output is correct |
157 |
Correct |
0 ms |
284 KB |
Output is correct |
158 |
Correct |
1 ms |
204 KB |
Output is correct |
159 |
Correct |
1 ms |
288 KB |
Output is correct |
160 |
Correct |
1 ms |
204 KB |
Output is correct |
161 |
Correct |
359 ms |
38284 KB |
Output is correct |
162 |
Correct |
371 ms |
38784 KB |
Output is correct |
163 |
Correct |
381 ms |
38652 KB |
Output is correct |
164 |
Correct |
351 ms |
38660 KB |
Output is correct |
165 |
Correct |
375 ms |
38552 KB |
Output is correct |
166 |
Correct |
365 ms |
38280 KB |
Output is correct |
167 |
Correct |
92 ms |
9244 KB |
Output is correct |
168 |
Correct |
29 ms |
5144 KB |
Output is correct |
169 |
Correct |
90 ms |
13152 KB |
Output is correct |
170 |
Correct |
210 ms |
24440 KB |
Output is correct |
171 |
Correct |
289 ms |
32648 KB |
Output is correct |
172 |
Correct |
149 ms |
19500 KB |
Output is correct |
173 |
Correct |
177 ms |
23468 KB |
Output is correct |
174 |
Correct |
238 ms |
27372 KB |
Output is correct |
175 |
Correct |
280 ms |
31088 KB |
Output is correct |
176 |
Correct |
305 ms |
34980 KB |
Output is correct |
177 |
Correct |
373 ms |
38816 KB |
Output is correct |