#include "parks.h"
#include <bits/stdc++.h>
#define fr first
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#define sc second
#define all(s) s.begin(), s.end()
//#define int long long
#define rc(s) return cout << s, 0
using namespace std;
const int nmax = 200005;
int n, par[nmax];
vector<pair<int,int>>vertex;
map <pair<int,int>, int>varfuri, banci;
vector<int>u, v, assigned_a, assigned_b;
int findpar(int x){
if(x != par[x]){
par[x] = findpar(par[x]);
}
return par[x];
}
void join(int x, int y){
x = findpar(x);
y = findpar(y);
par[x] = y;
}
int construct_roads(vector<int> x, vector<int> y) {
n = (int)x.size();
for(int i=0;i<n;i++){
vertex.push_back({x[i], y[i]});
varfuri[{x[i], y[i]}] = i;
}
sort(all(vertex));
for(auto it : vertex){
if(varfuri.count({it.fr - 2, it.sc})){
if(it.fr % 4 == 0){
if(it.sc % 4 == 2){
if(!banci.count({it.fr - 1, it.sc - 1})){
banci[{it.fr-1, it.sc-1}] = 1;
u.push_back(varfuri[{it.fr, it.sc}]);
v.push_back(varfuri[{it.fr - 2, it.sc}]);
assigned_a.push_back(it.fr - 1);
assigned_b.push_back(it.sc - 1);
}
}
else{
if(!banci.count({it.fr - 1, it.sc + 1})){
banci[{it.fr-1, it.sc + 1}] = 1;
u.push_back(varfuri[{it.fr, it.sc}]);
v.push_back(varfuri[{it.fr - 2, it.sc}]);
assigned_a.push_back(it.fr - 1);
assigned_b.push_back(it.sc + 1);
}
}
}
else{
if(it.sc % 4 == 2){
if(!banci.count({it.fr - 1, it.sc + 1})){
banci[{it.fr-1, it.sc+1}] = 1;
u.push_back(varfuri[{it.fr, it.sc}]);
v.push_back(varfuri[{it.fr - 2, it.sc}]);
assigned_a.push_back(it.fr - 1);
assigned_b.push_back(it.sc + 1);
}
}
else{
if(!banci.count({it.fr - 1, it.sc - 1})){
banci[{it.fr-1, it.sc-1}] = 1;
u.push_back(varfuri[{it.fr, it.sc}]);
v.push_back(varfuri[{it.fr - 2, it.sc}]);
assigned_a.push_back(it.fr - 1);
assigned_b.push_back(it.sc - 1);
}
}
}
}
if(varfuri.count({it.fr, it.sc - 2})){
if(it.fr % 4 == 0){
if(it.sc % 4 == 2){
if(!banci.count({it.fr + 1, it.sc - 1})){
banci[{it.fr + 1, it.sc - 1}] = 1;
u.push_back(varfuri[{it.fr, it.sc}]);
v.push_back(varfuri[{it.fr, it.sc - 2}]);
assigned_a.push_back(it.fr + 1);
assigned_b.push_back(it.sc - 1);
}
}
else{
if(!banci.count({it.fr - 1, it.sc - 1})){
banci[{it.fr-1, it.sc - 1}] = 1;
u.push_back(varfuri[{it.fr, it.sc}]);
v.push_back(varfuri[{it.fr, it.sc - 2}]);
assigned_a.push_back(it.fr - 1);
assigned_b.push_back(it.sc - 1);
}
}
}
else{
if(it.sc % 4 == 2){
if(!banci.count({it.fr - 1, it.sc - 1})){
banci[{it.fr-1, it.sc-1}] = 1;
u.push_back(varfuri[{it.fr, it.sc}]);
v.push_back(varfuri[{it.fr, it.sc - 2}]);
assigned_a.push_back(it.fr - 1);
assigned_b.push_back(it.sc - 1);
}
}
else{
if(!banci.count({it.fr + 1, it.sc - 1})){
banci[{it.fr+1, it.sc-1}] = 1;
u.push_back(varfuri[{it.fr, it.sc}]);
v.push_back(varfuri[{it.fr, it.sc - 2}]);
assigned_a.push_back(it.fr + 1);
assigned_b.push_back(it.sc - 1);
}
}
}
}
}
for(int i=0;i<n;i++) par[i] = i;
for(int i=0;i<(int)u.size();i++){
join(u[i], v[i]);
}
for(int i=0;i<n;i++){
findpar(i);
}
for(int i=0;i<n-1;i++){
if(par[i] != par[i + 1]) return 0;
}
build(u, v, assigned_a, assigned_b);
return 1;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
159 ms |
21660 KB |
Output is correct |
10 |
Correct |
12 ms |
2416 KB |
Output is correct |
11 |
Correct |
83 ms |
11700 KB |
Output is correct |
12 |
Correct |
20 ms |
3500 KB |
Output is correct |
13 |
Correct |
48 ms |
7816 KB |
Output is correct |
14 |
Correct |
2 ms |
468 KB |
Output is correct |
15 |
Correct |
2 ms |
596 KB |
Output is correct |
16 |
Correct |
164 ms |
21644 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
159 ms |
21660 KB |
Output is correct |
10 |
Correct |
12 ms |
2416 KB |
Output is correct |
11 |
Correct |
83 ms |
11700 KB |
Output is correct |
12 |
Correct |
20 ms |
3500 KB |
Output is correct |
13 |
Correct |
48 ms |
7816 KB |
Output is correct |
14 |
Correct |
2 ms |
468 KB |
Output is correct |
15 |
Correct |
2 ms |
596 KB |
Output is correct |
16 |
Correct |
164 ms |
21644 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
1 ms |
316 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
212 KB |
Output is correct |
23 |
Correct |
425 ms |
44880 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
468 KB |
Output is correct |
26 |
Correct |
3 ms |
852 KB |
Output is correct |
27 |
Correct |
4 ms |
1012 KB |
Output is correct |
28 |
Correct |
125 ms |
18096 KB |
Output is correct |
29 |
Correct |
212 ms |
26908 KB |
Output is correct |
30 |
Correct |
298 ms |
36132 KB |
Output is correct |
31 |
Correct |
385 ms |
44756 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
1 ms |
212 KB |
Output is correct |
37 |
Correct |
0 ms |
312 KB |
Output is correct |
38 |
Correct |
1 ms |
212 KB |
Output is correct |
39 |
Correct |
1 ms |
320 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
1 ms |
312 KB |
Output is correct |
42 |
Correct |
1 ms |
308 KB |
Output is correct |
43 |
Correct |
4 ms |
596 KB |
Output is correct |
44 |
Correct |
4 ms |
852 KB |
Output is correct |
45 |
Correct |
169 ms |
22496 KB |
Output is correct |
46 |
Correct |
260 ms |
33060 KB |
Output is correct |
47 |
Correct |
259 ms |
32896 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
159 ms |
21660 KB |
Output is correct |
10 |
Correct |
12 ms |
2416 KB |
Output is correct |
11 |
Correct |
83 ms |
11700 KB |
Output is correct |
12 |
Correct |
20 ms |
3500 KB |
Output is correct |
13 |
Correct |
48 ms |
7816 KB |
Output is correct |
14 |
Correct |
2 ms |
468 KB |
Output is correct |
15 |
Correct |
2 ms |
596 KB |
Output is correct |
16 |
Correct |
164 ms |
21644 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
1 ms |
316 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
212 KB |
Output is correct |
23 |
Correct |
425 ms |
44880 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
468 KB |
Output is correct |
26 |
Correct |
3 ms |
852 KB |
Output is correct |
27 |
Correct |
4 ms |
1012 KB |
Output is correct |
28 |
Correct |
125 ms |
18096 KB |
Output is correct |
29 |
Correct |
212 ms |
26908 KB |
Output is correct |
30 |
Correct |
298 ms |
36132 KB |
Output is correct |
31 |
Correct |
385 ms |
44756 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
1 ms |
212 KB |
Output is correct |
37 |
Correct |
0 ms |
312 KB |
Output is correct |
38 |
Correct |
1 ms |
212 KB |
Output is correct |
39 |
Correct |
1 ms |
320 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
1 ms |
312 KB |
Output is correct |
42 |
Correct |
1 ms |
308 KB |
Output is correct |
43 |
Correct |
4 ms |
596 KB |
Output is correct |
44 |
Correct |
4 ms |
852 KB |
Output is correct |
45 |
Correct |
169 ms |
22496 KB |
Output is correct |
46 |
Correct |
260 ms |
33060 KB |
Output is correct |
47 |
Correct |
259 ms |
32896 KB |
Output is correct |
48 |
Correct |
1 ms |
212 KB |
Output is correct |
49 |
Correct |
0 ms |
308 KB |
Output is correct |
50 |
Correct |
0 ms |
308 KB |
Output is correct |
51 |
Correct |
1 ms |
212 KB |
Output is correct |
52 |
Correct |
1 ms |
212 KB |
Output is correct |
53 |
Correct |
1 ms |
212 KB |
Output is correct |
54 |
Correct |
1 ms |
212 KB |
Output is correct |
55 |
Correct |
411 ms |
44804 KB |
Output is correct |
56 |
Correct |
1 ms |
212 KB |
Output is correct |
57 |
Correct |
4 ms |
708 KB |
Output is correct |
58 |
Correct |
9 ms |
1684 KB |
Output is correct |
59 |
Correct |
12 ms |
2068 KB |
Output is correct |
60 |
Correct |
167 ms |
22348 KB |
Output is correct |
61 |
Correct |
270 ms |
31260 KB |
Output is correct |
62 |
Correct |
322 ms |
37264 KB |
Output is correct |
63 |
Correct |
381 ms |
44876 KB |
Output is correct |
64 |
Correct |
1 ms |
212 KB |
Output is correct |
65 |
Correct |
1 ms |
308 KB |
Output is correct |
66 |
Correct |
1 ms |
212 KB |
Output is correct |
67 |
Correct |
367 ms |
44860 KB |
Output is correct |
68 |
Correct |
412 ms |
44812 KB |
Output is correct |
69 |
Correct |
365 ms |
44636 KB |
Output is correct |
70 |
Correct |
4 ms |
980 KB |
Output is correct |
71 |
Correct |
10 ms |
1620 KB |
Output is correct |
72 |
Correct |
161 ms |
22328 KB |
Output is correct |
73 |
Correct |
263 ms |
34012 KB |
Output is correct |
74 |
Correct |
383 ms |
44848 KB |
Output is correct |
75 |
Correct |
408 ms |
49852 KB |
Output is correct |
76 |
Correct |
367 ms |
44936 KB |
Output is correct |
77 |
Correct |
6 ms |
1236 KB |
Output is correct |
78 |
Correct |
10 ms |
1984 KB |
Output is correct |
79 |
Correct |
176 ms |
23656 KB |
Output is correct |
80 |
Correct |
276 ms |
35944 KB |
Output is correct |
81 |
Correct |
365 ms |
47516 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
159 ms |
21660 KB |
Output is correct |
10 |
Correct |
12 ms |
2416 KB |
Output is correct |
11 |
Correct |
83 ms |
11700 KB |
Output is correct |
12 |
Correct |
20 ms |
3500 KB |
Output is correct |
13 |
Correct |
48 ms |
7816 KB |
Output is correct |
14 |
Correct |
2 ms |
468 KB |
Output is correct |
15 |
Correct |
2 ms |
596 KB |
Output is correct |
16 |
Correct |
164 ms |
21644 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
378 ms |
44784 KB |
Output is correct |
21 |
Correct |
375 ms |
43800 KB |
Output is correct |
22 |
Correct |
374 ms |
46408 KB |
Output is correct |
23 |
Correct |
287 ms |
38952 KB |
Output is correct |
24 |
Correct |
177 ms |
20004 KB |
Output is correct |
25 |
Correct |
293 ms |
35776 KB |
Output is correct |
26 |
Correct |
285 ms |
35752 KB |
Output is correct |
27 |
Correct |
320 ms |
44652 KB |
Output is correct |
28 |
Correct |
341 ms |
44804 KB |
Output is correct |
29 |
Correct |
391 ms |
44772 KB |
Output is correct |
30 |
Correct |
356 ms |
44724 KB |
Output is correct |
31 |
Correct |
0 ms |
212 KB |
Output is correct |
32 |
Correct |
27 ms |
3592 KB |
Output is correct |
33 |
Correct |
78 ms |
10528 KB |
Output is correct |
34 |
Correct |
347 ms |
46612 KB |
Output is correct |
35 |
Correct |
11 ms |
2124 KB |
Output is correct |
36 |
Correct |
63 ms |
9412 KB |
Output is correct |
37 |
Correct |
141 ms |
18472 KB |
Output is correct |
38 |
Correct |
130 ms |
18976 KB |
Output is correct |
39 |
Correct |
191 ms |
25568 KB |
Output is correct |
40 |
Correct |
242 ms |
33424 KB |
Output is correct |
41 |
Correct |
322 ms |
39908 KB |
Output is correct |
42 |
Correct |
388 ms |
46620 KB |
Output is correct |
43 |
Correct |
1 ms |
212 KB |
Output is correct |
44 |
Correct |
1 ms |
312 KB |
Output is correct |
45 |
Correct |
0 ms |
308 KB |
Output is correct |
46 |
Correct |
1 ms |
212 KB |
Output is correct |
47 |
Correct |
0 ms |
308 KB |
Output is correct |
48 |
Correct |
1 ms |
212 KB |
Output is correct |
49 |
Correct |
0 ms |
212 KB |
Output is correct |
50 |
Correct |
1 ms |
212 KB |
Output is correct |
51 |
Correct |
1 ms |
212 KB |
Output is correct |
52 |
Correct |
1 ms |
212 KB |
Output is correct |
53 |
Correct |
1 ms |
212 KB |
Output is correct |
54 |
Correct |
3 ms |
580 KB |
Output is correct |
55 |
Correct |
3 ms |
852 KB |
Output is correct |
56 |
Correct |
150 ms |
22492 KB |
Output is correct |
57 |
Correct |
252 ms |
33076 KB |
Output is correct |
58 |
Correct |
322 ms |
32968 KB |
Output is correct |
59 |
Correct |
1 ms |
212 KB |
Output is correct |
60 |
Correct |
1 ms |
212 KB |
Output is correct |
61 |
Correct |
1 ms |
304 KB |
Output is correct |
62 |
Correct |
404 ms |
44816 KB |
Output is correct |
63 |
Correct |
389 ms |
44752 KB |
Output is correct |
64 |
Correct |
385 ms |
44584 KB |
Output is correct |
65 |
Correct |
4 ms |
980 KB |
Output is correct |
66 |
Correct |
9 ms |
1716 KB |
Output is correct |
67 |
Correct |
182 ms |
22272 KB |
Output is correct |
68 |
Correct |
294 ms |
33980 KB |
Output is correct |
69 |
Correct |
430 ms |
44864 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
159 ms |
21660 KB |
Output is correct |
10 |
Correct |
12 ms |
2416 KB |
Output is correct |
11 |
Correct |
83 ms |
11700 KB |
Output is correct |
12 |
Correct |
20 ms |
3500 KB |
Output is correct |
13 |
Correct |
48 ms |
7816 KB |
Output is correct |
14 |
Correct |
2 ms |
468 KB |
Output is correct |
15 |
Correct |
2 ms |
596 KB |
Output is correct |
16 |
Correct |
164 ms |
21644 KB |
Output is correct |
17 |
Correct |
390 ms |
43568 KB |
Output is correct |
18 |
Correct |
384 ms |
43756 KB |
Output is correct |
19 |
Correct |
408 ms |
44076 KB |
Output is correct |
20 |
Correct |
430 ms |
51976 KB |
Output is correct |
21 |
Correct |
394 ms |
41820 KB |
Output is correct |
22 |
Correct |
1 ms |
212 KB |
Output is correct |
23 |
Correct |
56 ms |
7808 KB |
Output is correct |
24 |
Correct |
34 ms |
4168 KB |
Output is correct |
25 |
Correct |
162 ms |
14148 KB |
Output is correct |
26 |
Correct |
183 ms |
24428 KB |
Output is correct |
27 |
Correct |
212 ms |
25864 KB |
Output is correct |
28 |
Correct |
267 ms |
30760 KB |
Output is correct |
29 |
Correct |
336 ms |
39356 KB |
Output is correct |
30 |
Correct |
358 ms |
45068 KB |
Output is correct |
31 |
Correct |
448 ms |
51836 KB |
Output is correct |
32 |
Correct |
420 ms |
49836 KB |
Output is correct |
33 |
Correct |
372 ms |
44772 KB |
Output is correct |
34 |
Correct |
6 ms |
1236 KB |
Output is correct |
35 |
Correct |
10 ms |
1992 KB |
Output is correct |
36 |
Correct |
164 ms |
23584 KB |
Output is correct |
37 |
Correct |
284 ms |
35976 KB |
Output is correct |
38 |
Correct |
411 ms |
47604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
159 ms |
21660 KB |
Output is correct |
10 |
Correct |
12 ms |
2416 KB |
Output is correct |
11 |
Correct |
83 ms |
11700 KB |
Output is correct |
12 |
Correct |
20 ms |
3500 KB |
Output is correct |
13 |
Correct |
48 ms |
7816 KB |
Output is correct |
14 |
Correct |
2 ms |
468 KB |
Output is correct |
15 |
Correct |
2 ms |
596 KB |
Output is correct |
16 |
Correct |
164 ms |
21644 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
1 ms |
316 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
212 KB |
Output is correct |
23 |
Correct |
425 ms |
44880 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
468 KB |
Output is correct |
26 |
Correct |
3 ms |
852 KB |
Output is correct |
27 |
Correct |
4 ms |
1012 KB |
Output is correct |
28 |
Correct |
125 ms |
18096 KB |
Output is correct |
29 |
Correct |
212 ms |
26908 KB |
Output is correct |
30 |
Correct |
298 ms |
36132 KB |
Output is correct |
31 |
Correct |
385 ms |
44756 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
1 ms |
212 KB |
Output is correct |
37 |
Correct |
0 ms |
312 KB |
Output is correct |
38 |
Correct |
1 ms |
212 KB |
Output is correct |
39 |
Correct |
1 ms |
320 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
1 ms |
312 KB |
Output is correct |
42 |
Correct |
1 ms |
308 KB |
Output is correct |
43 |
Correct |
4 ms |
596 KB |
Output is correct |
44 |
Correct |
4 ms |
852 KB |
Output is correct |
45 |
Correct |
169 ms |
22496 KB |
Output is correct |
46 |
Correct |
260 ms |
33060 KB |
Output is correct |
47 |
Correct |
259 ms |
32896 KB |
Output is correct |
48 |
Correct |
1 ms |
212 KB |
Output is correct |
49 |
Correct |
0 ms |
308 KB |
Output is correct |
50 |
Correct |
0 ms |
308 KB |
Output is correct |
51 |
Correct |
1 ms |
212 KB |
Output is correct |
52 |
Correct |
1 ms |
212 KB |
Output is correct |
53 |
Correct |
1 ms |
212 KB |
Output is correct |
54 |
Correct |
1 ms |
212 KB |
Output is correct |
55 |
Correct |
411 ms |
44804 KB |
Output is correct |
56 |
Correct |
1 ms |
212 KB |
Output is correct |
57 |
Correct |
4 ms |
708 KB |
Output is correct |
58 |
Correct |
9 ms |
1684 KB |
Output is correct |
59 |
Correct |
12 ms |
2068 KB |
Output is correct |
60 |
Correct |
167 ms |
22348 KB |
Output is correct |
61 |
Correct |
270 ms |
31260 KB |
Output is correct |
62 |
Correct |
322 ms |
37264 KB |
Output is correct |
63 |
Correct |
381 ms |
44876 KB |
Output is correct |
64 |
Correct |
1 ms |
212 KB |
Output is correct |
65 |
Correct |
1 ms |
308 KB |
Output is correct |
66 |
Correct |
1 ms |
212 KB |
Output is correct |
67 |
Correct |
367 ms |
44860 KB |
Output is correct |
68 |
Correct |
412 ms |
44812 KB |
Output is correct |
69 |
Correct |
365 ms |
44636 KB |
Output is correct |
70 |
Correct |
4 ms |
980 KB |
Output is correct |
71 |
Correct |
10 ms |
1620 KB |
Output is correct |
72 |
Correct |
161 ms |
22328 KB |
Output is correct |
73 |
Correct |
263 ms |
34012 KB |
Output is correct |
74 |
Correct |
383 ms |
44848 KB |
Output is correct |
75 |
Correct |
408 ms |
49852 KB |
Output is correct |
76 |
Correct |
367 ms |
44936 KB |
Output is correct |
77 |
Correct |
6 ms |
1236 KB |
Output is correct |
78 |
Correct |
10 ms |
1984 KB |
Output is correct |
79 |
Correct |
176 ms |
23656 KB |
Output is correct |
80 |
Correct |
276 ms |
35944 KB |
Output is correct |
81 |
Correct |
365 ms |
47516 KB |
Output is correct |
82 |
Correct |
0 ms |
212 KB |
Output is correct |
83 |
Correct |
0 ms |
212 KB |
Output is correct |
84 |
Correct |
0 ms |
212 KB |
Output is correct |
85 |
Correct |
378 ms |
44784 KB |
Output is correct |
86 |
Correct |
375 ms |
43800 KB |
Output is correct |
87 |
Correct |
374 ms |
46408 KB |
Output is correct |
88 |
Correct |
287 ms |
38952 KB |
Output is correct |
89 |
Correct |
177 ms |
20004 KB |
Output is correct |
90 |
Correct |
293 ms |
35776 KB |
Output is correct |
91 |
Correct |
285 ms |
35752 KB |
Output is correct |
92 |
Correct |
320 ms |
44652 KB |
Output is correct |
93 |
Correct |
341 ms |
44804 KB |
Output is correct |
94 |
Correct |
391 ms |
44772 KB |
Output is correct |
95 |
Correct |
356 ms |
44724 KB |
Output is correct |
96 |
Correct |
0 ms |
212 KB |
Output is correct |
97 |
Correct |
27 ms |
3592 KB |
Output is correct |
98 |
Correct |
78 ms |
10528 KB |
Output is correct |
99 |
Correct |
347 ms |
46612 KB |
Output is correct |
100 |
Correct |
11 ms |
2124 KB |
Output is correct |
101 |
Correct |
63 ms |
9412 KB |
Output is correct |
102 |
Correct |
141 ms |
18472 KB |
Output is correct |
103 |
Correct |
130 ms |
18976 KB |
Output is correct |
104 |
Correct |
191 ms |
25568 KB |
Output is correct |
105 |
Correct |
242 ms |
33424 KB |
Output is correct |
106 |
Correct |
322 ms |
39908 KB |
Output is correct |
107 |
Correct |
388 ms |
46620 KB |
Output is correct |
108 |
Correct |
1 ms |
212 KB |
Output is correct |
109 |
Correct |
1 ms |
312 KB |
Output is correct |
110 |
Correct |
0 ms |
308 KB |
Output is correct |
111 |
Correct |
1 ms |
212 KB |
Output is correct |
112 |
Correct |
0 ms |
308 KB |
Output is correct |
113 |
Correct |
1 ms |
212 KB |
Output is correct |
114 |
Correct |
0 ms |
212 KB |
Output is correct |
115 |
Correct |
1 ms |
212 KB |
Output is correct |
116 |
Correct |
1 ms |
212 KB |
Output is correct |
117 |
Correct |
1 ms |
212 KB |
Output is correct |
118 |
Correct |
1 ms |
212 KB |
Output is correct |
119 |
Correct |
3 ms |
580 KB |
Output is correct |
120 |
Correct |
3 ms |
852 KB |
Output is correct |
121 |
Correct |
150 ms |
22492 KB |
Output is correct |
122 |
Correct |
252 ms |
33076 KB |
Output is correct |
123 |
Correct |
322 ms |
32968 KB |
Output is correct |
124 |
Correct |
1 ms |
212 KB |
Output is correct |
125 |
Correct |
1 ms |
212 KB |
Output is correct |
126 |
Correct |
1 ms |
304 KB |
Output is correct |
127 |
Correct |
404 ms |
44816 KB |
Output is correct |
128 |
Correct |
389 ms |
44752 KB |
Output is correct |
129 |
Correct |
385 ms |
44584 KB |
Output is correct |
130 |
Correct |
4 ms |
980 KB |
Output is correct |
131 |
Correct |
9 ms |
1716 KB |
Output is correct |
132 |
Correct |
182 ms |
22272 KB |
Output is correct |
133 |
Correct |
294 ms |
33980 KB |
Output is correct |
134 |
Correct |
430 ms |
44864 KB |
Output is correct |
135 |
Correct |
390 ms |
43568 KB |
Output is correct |
136 |
Correct |
384 ms |
43756 KB |
Output is correct |
137 |
Correct |
408 ms |
44076 KB |
Output is correct |
138 |
Correct |
430 ms |
51976 KB |
Output is correct |
139 |
Correct |
394 ms |
41820 KB |
Output is correct |
140 |
Correct |
1 ms |
212 KB |
Output is correct |
141 |
Correct |
56 ms |
7808 KB |
Output is correct |
142 |
Correct |
34 ms |
4168 KB |
Output is correct |
143 |
Correct |
162 ms |
14148 KB |
Output is correct |
144 |
Correct |
183 ms |
24428 KB |
Output is correct |
145 |
Correct |
212 ms |
25864 KB |
Output is correct |
146 |
Correct |
267 ms |
30760 KB |
Output is correct |
147 |
Correct |
336 ms |
39356 KB |
Output is correct |
148 |
Correct |
358 ms |
45068 KB |
Output is correct |
149 |
Correct |
448 ms |
51836 KB |
Output is correct |
150 |
Correct |
420 ms |
49836 KB |
Output is correct |
151 |
Correct |
372 ms |
44772 KB |
Output is correct |
152 |
Correct |
6 ms |
1236 KB |
Output is correct |
153 |
Correct |
10 ms |
1992 KB |
Output is correct |
154 |
Correct |
164 ms |
23584 KB |
Output is correct |
155 |
Correct |
284 ms |
35976 KB |
Output is correct |
156 |
Correct |
411 ms |
47604 KB |
Output is correct |
157 |
Correct |
0 ms |
212 KB |
Output is correct |
158 |
Correct |
1 ms |
312 KB |
Output is correct |
159 |
Correct |
1 ms |
212 KB |
Output is correct |
160 |
Correct |
0 ms |
212 KB |
Output is correct |
161 |
Correct |
366 ms |
45416 KB |
Output is correct |
162 |
Correct |
354 ms |
46580 KB |
Output is correct |
163 |
Correct |
347 ms |
46352 KB |
Output is correct |
164 |
Correct |
345 ms |
46396 KB |
Output is correct |
165 |
Correct |
383 ms |
45992 KB |
Output is correct |
166 |
Correct |
384 ms |
45456 KB |
Output is correct |
167 |
Correct |
88 ms |
11156 KB |
Output is correct |
168 |
Correct |
38 ms |
5752 KB |
Output is correct |
169 |
Correct |
108 ms |
15040 KB |
Output is correct |
170 |
Correct |
238 ms |
27908 KB |
Output is correct |
171 |
Correct |
321 ms |
36796 KB |
Output is correct |
172 |
Correct |
163 ms |
23332 KB |
Output is correct |
173 |
Correct |
230 ms |
27940 KB |
Output is correct |
174 |
Correct |
260 ms |
33484 KB |
Output is correct |
175 |
Correct |
295 ms |
37212 KB |
Output is correct |
176 |
Correct |
322 ms |
42140 KB |
Output is correct |
177 |
Correct |
369 ms |
46612 KB |
Output is correct |