#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ii pair<ll,ll>
#define fi first
#define se second
#define puf push_front
#define pof pop_front
#define pub push_back
#define pob pop_back
#define lb lower_bound
#define ub upper_bound
#define rep(x,s,e) for (auto x=s-(s>e);x!=e-(s>e);s<e?x++:x--)
#define all(x) (x).begin(),(x).end()
#define sz(x) (int) (x).size()
struct UFDS{
int p[200005];
UFDS(){
rep(x,0,200005) p[x]=x;
}
int parent(int i){
if (p[i]==i) return i;
else return p[i]=parent(p[i]);
}
void unions(int i,int j){
i=parent(i),j=parent(j);
p[i]=j;
}
} ufds;
int n;
ii arr[200005];
//return values
vector<int> id1,id2;
vector<int> bx,by;
map<ii,int> id;
int construct_roads(std::vector<int> X, std::vector<int> Y) {
n=sz(X);
rep(x,0,n) arr[x]=ii(X[x],Y[x]);
rep(x,0,n) id[arr[x]]=x;
rep(x,0,n){
int i,j;
tie(i,j)=arr[x];
if (id.count(ii(i,j+2))){ //vertical
int temp=id[ii(i,j+2)];
ufds.unions(x,temp);
//cout<<"ver: "<<x<<" "<<temp<<endl;
if ((i+j)%4==0){ //left
id1.pub(x);
id2.pub(temp);
bx.pub(i-1);
by.pub(j+1);
}
else{
//right if possible
if (!id.count(ii(i+2,j)) || !id.count(ii(i+2,j+2))){
id1.pub(x);
id2.pub(temp);
bx.pub(i+1);
by.pub(j+1);
}
}
}
if (id.count(ii(i+2,j))){ //horizontal
int temp=id[ii(i+2,j)];
ufds.unions(x,temp);
//cout<<"hor: "<<x<<" "<<temp<<endl;
if (j%4==0){
if (i%4==0){ //up
id1.pub(x);
id2.pub(temp);
bx.pub(i+1);
by.pub(j+1);
}
else{ //down
id1.pub(x);
id2.pub(temp);
bx.pub(i+1);
by.pub(j-1);
}
}
else{
if (i%4==0){ //down if possible
if (!id.count(ii(i,j-2)) || !id.count(ii(i+2,j-2))){
id1.pub(x);
id2.pub(temp);
bx.pub(i+1);
by.pub(j-1);
}
}
else{ //up if possible
if (!id.count(ii(i,j+2)) || !id.count(ii(i+2,j+2))){
id1.pub(x);
id2.pub(temp);
bx.pub(i+1);
by.pub(j+1);
}
}
}
}
}
rep(x,0,n) if (ufds.parent(0)!=ufds.parent(x)) return 0;
build(id1,id2,bx,by);
return 1;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
972 KB |
Output is correct |
2 |
Correct |
1 ms |
1100 KB |
Output is correct |
3 |
Correct |
1 ms |
972 KB |
Output is correct |
4 |
Correct |
1 ms |
972 KB |
Output is correct |
5 |
Correct |
1 ms |
972 KB |
Output is correct |
6 |
Correct |
1 ms |
972 KB |
Output is correct |
7 |
Correct |
1 ms |
972 KB |
Output is correct |
8 |
Correct |
1 ms |
972 KB |
Output is correct |
9 |
Correct |
176 ms |
15348 KB |
Output is correct |
10 |
Correct |
12 ms |
2764 KB |
Output is correct |
11 |
Correct |
71 ms |
9404 KB |
Output is correct |
12 |
Correct |
19 ms |
3572 KB |
Output is correct |
13 |
Correct |
40 ms |
6408 KB |
Output is correct |
14 |
Correct |
2 ms |
1100 KB |
Output is correct |
15 |
Correct |
2 ms |
1228 KB |
Output is correct |
16 |
Correct |
168 ms |
15228 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
972 KB |
Output is correct |
2 |
Correct |
1 ms |
1100 KB |
Output is correct |
3 |
Correct |
1 ms |
972 KB |
Output is correct |
4 |
Correct |
1 ms |
972 KB |
Output is correct |
5 |
Correct |
1 ms |
972 KB |
Output is correct |
6 |
Correct |
1 ms |
972 KB |
Output is correct |
7 |
Correct |
1 ms |
972 KB |
Output is correct |
8 |
Correct |
1 ms |
972 KB |
Output is correct |
9 |
Correct |
176 ms |
15348 KB |
Output is correct |
10 |
Correct |
12 ms |
2764 KB |
Output is correct |
11 |
Correct |
71 ms |
9404 KB |
Output is correct |
12 |
Correct |
19 ms |
3572 KB |
Output is correct |
13 |
Correct |
40 ms |
6408 KB |
Output is correct |
14 |
Correct |
2 ms |
1100 KB |
Output is correct |
15 |
Correct |
2 ms |
1228 KB |
Output is correct |
16 |
Correct |
168 ms |
15228 KB |
Output is correct |
17 |
Correct |
2 ms |
972 KB |
Output is correct |
18 |
Correct |
1 ms |
972 KB |
Output is correct |
19 |
Correct |
1 ms |
972 KB |
Output is correct |
20 |
Correct |
2 ms |
972 KB |
Output is correct |
21 |
Correct |
1 ms |
972 KB |
Output is correct |
22 |
Correct |
2 ms |
972 KB |
Output is correct |
23 |
Correct |
556 ms |
29316 KB |
Output is correct |
24 |
Correct |
1 ms |
972 KB |
Output is correct |
25 |
Correct |
3 ms |
1228 KB |
Output is correct |
26 |
Correct |
4 ms |
1384 KB |
Output is correct |
27 |
Correct |
5 ms |
1484 KB |
Output is correct |
28 |
Correct |
165 ms |
12468 KB |
Output is correct |
29 |
Correct |
367 ms |
18136 KB |
Output is correct |
30 |
Correct |
448 ms |
23720 KB |
Output is correct |
31 |
Correct |
700 ms |
29352 KB |
Output is correct |
32 |
Correct |
1 ms |
972 KB |
Output is correct |
33 |
Correct |
1 ms |
972 KB |
Output is correct |
34 |
Correct |
1 ms |
972 KB |
Output is correct |
35 |
Correct |
1 ms |
972 KB |
Output is correct |
36 |
Correct |
1 ms |
972 KB |
Output is correct |
37 |
Correct |
1 ms |
972 KB |
Output is correct |
38 |
Correct |
2 ms |
972 KB |
Output is correct |
39 |
Correct |
1 ms |
972 KB |
Output is correct |
40 |
Correct |
1 ms |
972 KB |
Output is correct |
41 |
Correct |
1 ms |
972 KB |
Output is correct |
42 |
Correct |
1 ms |
972 KB |
Output is correct |
43 |
Correct |
3 ms |
1228 KB |
Output is correct |
44 |
Correct |
4 ms |
1356 KB |
Output is correct |
45 |
Correct |
201 ms |
15288 KB |
Output is correct |
46 |
Correct |
345 ms |
21568 KB |
Output is correct |
47 |
Correct |
404 ms |
21616 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
972 KB |
Output is correct |
2 |
Correct |
1 ms |
1100 KB |
Output is correct |
3 |
Correct |
1 ms |
972 KB |
Output is correct |
4 |
Correct |
1 ms |
972 KB |
Output is correct |
5 |
Correct |
1 ms |
972 KB |
Output is correct |
6 |
Correct |
1 ms |
972 KB |
Output is correct |
7 |
Correct |
1 ms |
972 KB |
Output is correct |
8 |
Correct |
1 ms |
972 KB |
Output is correct |
9 |
Correct |
176 ms |
15348 KB |
Output is correct |
10 |
Correct |
12 ms |
2764 KB |
Output is correct |
11 |
Correct |
71 ms |
9404 KB |
Output is correct |
12 |
Correct |
19 ms |
3572 KB |
Output is correct |
13 |
Correct |
40 ms |
6408 KB |
Output is correct |
14 |
Correct |
2 ms |
1100 KB |
Output is correct |
15 |
Correct |
2 ms |
1228 KB |
Output is correct |
16 |
Correct |
168 ms |
15228 KB |
Output is correct |
17 |
Correct |
2 ms |
972 KB |
Output is correct |
18 |
Correct |
1 ms |
972 KB |
Output is correct |
19 |
Correct |
1 ms |
972 KB |
Output is correct |
20 |
Correct |
2 ms |
972 KB |
Output is correct |
21 |
Correct |
1 ms |
972 KB |
Output is correct |
22 |
Correct |
2 ms |
972 KB |
Output is correct |
23 |
Correct |
556 ms |
29316 KB |
Output is correct |
24 |
Correct |
1 ms |
972 KB |
Output is correct |
25 |
Correct |
3 ms |
1228 KB |
Output is correct |
26 |
Correct |
4 ms |
1384 KB |
Output is correct |
27 |
Correct |
5 ms |
1484 KB |
Output is correct |
28 |
Correct |
165 ms |
12468 KB |
Output is correct |
29 |
Correct |
367 ms |
18136 KB |
Output is correct |
30 |
Correct |
448 ms |
23720 KB |
Output is correct |
31 |
Correct |
700 ms |
29352 KB |
Output is correct |
32 |
Correct |
1 ms |
972 KB |
Output is correct |
33 |
Correct |
1 ms |
972 KB |
Output is correct |
34 |
Correct |
1 ms |
972 KB |
Output is correct |
35 |
Correct |
1 ms |
972 KB |
Output is correct |
36 |
Correct |
1 ms |
972 KB |
Output is correct |
37 |
Correct |
1 ms |
972 KB |
Output is correct |
38 |
Correct |
2 ms |
972 KB |
Output is correct |
39 |
Correct |
1 ms |
972 KB |
Output is correct |
40 |
Correct |
1 ms |
972 KB |
Output is correct |
41 |
Correct |
1 ms |
972 KB |
Output is correct |
42 |
Correct |
1 ms |
972 KB |
Output is correct |
43 |
Correct |
3 ms |
1228 KB |
Output is correct |
44 |
Correct |
4 ms |
1356 KB |
Output is correct |
45 |
Correct |
201 ms |
15288 KB |
Output is correct |
46 |
Correct |
345 ms |
21568 KB |
Output is correct |
47 |
Correct |
404 ms |
21616 KB |
Output is correct |
48 |
Correct |
1 ms |
972 KB |
Output is correct |
49 |
Correct |
1 ms |
972 KB |
Output is correct |
50 |
Correct |
1 ms |
972 KB |
Output is correct |
51 |
Correct |
1 ms |
972 KB |
Output is correct |
52 |
Correct |
1 ms |
972 KB |
Output is correct |
53 |
Correct |
2 ms |
972 KB |
Output is correct |
54 |
Correct |
1 ms |
972 KB |
Output is correct |
55 |
Correct |
631 ms |
29340 KB |
Output is correct |
56 |
Correct |
1 ms |
972 KB |
Output is correct |
57 |
Correct |
3 ms |
1356 KB |
Output is correct |
58 |
Correct |
10 ms |
1996 KB |
Output is correct |
59 |
Correct |
12 ms |
2296 KB |
Output is correct |
60 |
Correct |
268 ms |
15420 KB |
Output is correct |
61 |
Correct |
360 ms |
20120 KB |
Output is correct |
62 |
Correct |
475 ms |
24592 KB |
Output is correct |
63 |
Correct |
698 ms |
29508 KB |
Output is correct |
64 |
Correct |
1 ms |
972 KB |
Output is correct |
65 |
Correct |
1 ms |
972 KB |
Output is correct |
66 |
Correct |
1 ms |
972 KB |
Output is correct |
67 |
Correct |
504 ms |
29424 KB |
Output is correct |
68 |
Correct |
453 ms |
29380 KB |
Output is correct |
69 |
Correct |
463 ms |
29372 KB |
Output is correct |
70 |
Correct |
5 ms |
1484 KB |
Output is correct |
71 |
Correct |
10 ms |
1968 KB |
Output is correct |
72 |
Correct |
211 ms |
15288 KB |
Output is correct |
73 |
Correct |
370 ms |
22468 KB |
Output is correct |
74 |
Correct |
554 ms |
29368 KB |
Output is correct |
75 |
Correct |
573 ms |
31204 KB |
Output is correct |
76 |
Correct |
474 ms |
29420 KB |
Output is correct |
77 |
Correct |
6 ms |
1612 KB |
Output is correct |
78 |
Correct |
13 ms |
2332 KB |
Output is correct |
79 |
Correct |
238 ms |
15808 KB |
Output is correct |
80 |
Correct |
402 ms |
23140 KB |
Output is correct |
81 |
Correct |
573 ms |
30316 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
972 KB |
Output is correct |
2 |
Correct |
1 ms |
1100 KB |
Output is correct |
3 |
Correct |
1 ms |
972 KB |
Output is correct |
4 |
Correct |
1 ms |
972 KB |
Output is correct |
5 |
Correct |
1 ms |
972 KB |
Output is correct |
6 |
Correct |
1 ms |
972 KB |
Output is correct |
7 |
Correct |
1 ms |
972 KB |
Output is correct |
8 |
Correct |
1 ms |
972 KB |
Output is correct |
9 |
Correct |
176 ms |
15348 KB |
Output is correct |
10 |
Correct |
12 ms |
2764 KB |
Output is correct |
11 |
Correct |
71 ms |
9404 KB |
Output is correct |
12 |
Correct |
19 ms |
3572 KB |
Output is correct |
13 |
Correct |
40 ms |
6408 KB |
Output is correct |
14 |
Correct |
2 ms |
1100 KB |
Output is correct |
15 |
Correct |
2 ms |
1228 KB |
Output is correct |
16 |
Correct |
168 ms |
15228 KB |
Output is correct |
17 |
Correct |
1 ms |
972 KB |
Output is correct |
18 |
Correct |
1 ms |
972 KB |
Output is correct |
19 |
Correct |
1 ms |
972 KB |
Output is correct |
20 |
Correct |
559 ms |
29908 KB |
Output is correct |
21 |
Correct |
545 ms |
29584 KB |
Output is correct |
22 |
Correct |
580 ms |
29568 KB |
Output is correct |
23 |
Correct |
453 ms |
25248 KB |
Output is correct |
24 |
Correct |
370 ms |
19832 KB |
Output is correct |
25 |
Correct |
596 ms |
23312 KB |
Output is correct |
26 |
Correct |
446 ms |
23120 KB |
Output is correct |
27 |
Correct |
569 ms |
29436 KB |
Output is correct |
28 |
Correct |
525 ms |
29344 KB |
Output is correct |
29 |
Correct |
739 ms |
29372 KB |
Output is correct |
30 |
Correct |
712 ms |
29340 KB |
Output is correct |
31 |
Correct |
1 ms |
972 KB |
Output is correct |
32 |
Correct |
25 ms |
3396 KB |
Output is correct |
33 |
Correct |
121 ms |
10432 KB |
Output is correct |
34 |
Correct |
525 ms |
29900 KB |
Output is correct |
35 |
Correct |
13 ms |
2252 KB |
Output is correct |
36 |
Correct |
75 ms |
6796 KB |
Output is correct |
37 |
Correct |
206 ms |
12072 KB |
Output is correct |
38 |
Correct |
217 ms |
12720 KB |
Output is correct |
39 |
Correct |
295 ms |
16860 KB |
Output is correct |
40 |
Correct |
411 ms |
21188 KB |
Output is correct |
41 |
Correct |
575 ms |
25548 KB |
Output is correct |
42 |
Correct |
680 ms |
29872 KB |
Output is correct |
43 |
Correct |
1 ms |
972 KB |
Output is correct |
44 |
Correct |
1 ms |
972 KB |
Output is correct |
45 |
Correct |
1 ms |
972 KB |
Output is correct |
46 |
Correct |
2 ms |
984 KB |
Output is correct |
47 |
Correct |
1 ms |
972 KB |
Output is correct |
48 |
Correct |
1 ms |
972 KB |
Output is correct |
49 |
Correct |
1 ms |
972 KB |
Output is correct |
50 |
Correct |
1 ms |
972 KB |
Output is correct |
51 |
Correct |
1 ms |
972 KB |
Output is correct |
52 |
Correct |
2 ms |
1044 KB |
Output is correct |
53 |
Correct |
1 ms |
972 KB |
Output is correct |
54 |
Correct |
3 ms |
1228 KB |
Output is correct |
55 |
Correct |
4 ms |
1436 KB |
Output is correct |
56 |
Correct |
218 ms |
15220 KB |
Output is correct |
57 |
Correct |
397 ms |
21596 KB |
Output is correct |
58 |
Correct |
396 ms |
21600 KB |
Output is correct |
59 |
Correct |
1 ms |
972 KB |
Output is correct |
60 |
Correct |
1 ms |
972 KB |
Output is correct |
61 |
Correct |
1 ms |
972 KB |
Output is correct |
62 |
Correct |
559 ms |
29364 KB |
Output is correct |
63 |
Correct |
478 ms |
29356 KB |
Output is correct |
64 |
Correct |
495 ms |
29288 KB |
Output is correct |
65 |
Correct |
5 ms |
1484 KB |
Output is correct |
66 |
Correct |
10 ms |
2020 KB |
Output is correct |
67 |
Correct |
230 ms |
15292 KB |
Output is correct |
68 |
Correct |
370 ms |
22336 KB |
Output is correct |
69 |
Correct |
572 ms |
29440 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
972 KB |
Output is correct |
2 |
Correct |
1 ms |
1100 KB |
Output is correct |
3 |
Correct |
1 ms |
972 KB |
Output is correct |
4 |
Correct |
1 ms |
972 KB |
Output is correct |
5 |
Correct |
1 ms |
972 KB |
Output is correct |
6 |
Correct |
1 ms |
972 KB |
Output is correct |
7 |
Correct |
1 ms |
972 KB |
Output is correct |
8 |
Correct |
1 ms |
972 KB |
Output is correct |
9 |
Correct |
176 ms |
15348 KB |
Output is correct |
10 |
Correct |
12 ms |
2764 KB |
Output is correct |
11 |
Correct |
71 ms |
9404 KB |
Output is correct |
12 |
Correct |
19 ms |
3572 KB |
Output is correct |
13 |
Correct |
40 ms |
6408 KB |
Output is correct |
14 |
Correct |
2 ms |
1100 KB |
Output is correct |
15 |
Correct |
2 ms |
1228 KB |
Output is correct |
16 |
Correct |
168 ms |
15228 KB |
Output is correct |
17 |
Correct |
557 ms |
29448 KB |
Output is correct |
18 |
Correct |
485 ms |
29488 KB |
Output is correct |
19 |
Correct |
612 ms |
29652 KB |
Output is correct |
20 |
Correct |
682 ms |
31896 KB |
Output is correct |
21 |
Correct |
520 ms |
26776 KB |
Output is correct |
22 |
Correct |
1 ms |
972 KB |
Output is correct |
23 |
Correct |
57 ms |
6016 KB |
Output is correct |
24 |
Correct |
35 ms |
3544 KB |
Output is correct |
25 |
Correct |
130 ms |
9060 KB |
Output is correct |
26 |
Correct |
276 ms |
15072 KB |
Output is correct |
27 |
Correct |
270 ms |
16568 KB |
Output is correct |
28 |
Correct |
372 ms |
20576 KB |
Output is correct |
29 |
Correct |
519 ms |
24536 KB |
Output is correct |
30 |
Correct |
573 ms |
28016 KB |
Output is correct |
31 |
Correct |
678 ms |
32088 KB |
Output is correct |
32 |
Correct |
586 ms |
31260 KB |
Output is correct |
33 |
Correct |
438 ms |
29340 KB |
Output is correct |
34 |
Correct |
6 ms |
1612 KB |
Output is correct |
35 |
Correct |
12 ms |
2124 KB |
Output is correct |
36 |
Correct |
251 ms |
15696 KB |
Output is correct |
37 |
Correct |
366 ms |
23120 KB |
Output is correct |
38 |
Correct |
550 ms |
30376 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
972 KB |
Output is correct |
2 |
Correct |
1 ms |
1100 KB |
Output is correct |
3 |
Correct |
1 ms |
972 KB |
Output is correct |
4 |
Correct |
1 ms |
972 KB |
Output is correct |
5 |
Correct |
1 ms |
972 KB |
Output is correct |
6 |
Correct |
1 ms |
972 KB |
Output is correct |
7 |
Correct |
1 ms |
972 KB |
Output is correct |
8 |
Correct |
1 ms |
972 KB |
Output is correct |
9 |
Correct |
176 ms |
15348 KB |
Output is correct |
10 |
Correct |
12 ms |
2764 KB |
Output is correct |
11 |
Correct |
71 ms |
9404 KB |
Output is correct |
12 |
Correct |
19 ms |
3572 KB |
Output is correct |
13 |
Correct |
40 ms |
6408 KB |
Output is correct |
14 |
Correct |
2 ms |
1100 KB |
Output is correct |
15 |
Correct |
2 ms |
1228 KB |
Output is correct |
16 |
Correct |
168 ms |
15228 KB |
Output is correct |
17 |
Correct |
2 ms |
972 KB |
Output is correct |
18 |
Correct |
1 ms |
972 KB |
Output is correct |
19 |
Correct |
1 ms |
972 KB |
Output is correct |
20 |
Correct |
2 ms |
972 KB |
Output is correct |
21 |
Correct |
1 ms |
972 KB |
Output is correct |
22 |
Correct |
2 ms |
972 KB |
Output is correct |
23 |
Correct |
556 ms |
29316 KB |
Output is correct |
24 |
Correct |
1 ms |
972 KB |
Output is correct |
25 |
Correct |
3 ms |
1228 KB |
Output is correct |
26 |
Correct |
4 ms |
1384 KB |
Output is correct |
27 |
Correct |
5 ms |
1484 KB |
Output is correct |
28 |
Correct |
165 ms |
12468 KB |
Output is correct |
29 |
Correct |
367 ms |
18136 KB |
Output is correct |
30 |
Correct |
448 ms |
23720 KB |
Output is correct |
31 |
Correct |
700 ms |
29352 KB |
Output is correct |
32 |
Correct |
1 ms |
972 KB |
Output is correct |
33 |
Correct |
1 ms |
972 KB |
Output is correct |
34 |
Correct |
1 ms |
972 KB |
Output is correct |
35 |
Correct |
1 ms |
972 KB |
Output is correct |
36 |
Correct |
1 ms |
972 KB |
Output is correct |
37 |
Correct |
1 ms |
972 KB |
Output is correct |
38 |
Correct |
2 ms |
972 KB |
Output is correct |
39 |
Correct |
1 ms |
972 KB |
Output is correct |
40 |
Correct |
1 ms |
972 KB |
Output is correct |
41 |
Correct |
1 ms |
972 KB |
Output is correct |
42 |
Correct |
1 ms |
972 KB |
Output is correct |
43 |
Correct |
3 ms |
1228 KB |
Output is correct |
44 |
Correct |
4 ms |
1356 KB |
Output is correct |
45 |
Correct |
201 ms |
15288 KB |
Output is correct |
46 |
Correct |
345 ms |
21568 KB |
Output is correct |
47 |
Correct |
404 ms |
21616 KB |
Output is correct |
48 |
Correct |
1 ms |
972 KB |
Output is correct |
49 |
Correct |
1 ms |
972 KB |
Output is correct |
50 |
Correct |
1 ms |
972 KB |
Output is correct |
51 |
Correct |
1 ms |
972 KB |
Output is correct |
52 |
Correct |
1 ms |
972 KB |
Output is correct |
53 |
Correct |
2 ms |
972 KB |
Output is correct |
54 |
Correct |
1 ms |
972 KB |
Output is correct |
55 |
Correct |
631 ms |
29340 KB |
Output is correct |
56 |
Correct |
1 ms |
972 KB |
Output is correct |
57 |
Correct |
3 ms |
1356 KB |
Output is correct |
58 |
Correct |
10 ms |
1996 KB |
Output is correct |
59 |
Correct |
12 ms |
2296 KB |
Output is correct |
60 |
Correct |
268 ms |
15420 KB |
Output is correct |
61 |
Correct |
360 ms |
20120 KB |
Output is correct |
62 |
Correct |
475 ms |
24592 KB |
Output is correct |
63 |
Correct |
698 ms |
29508 KB |
Output is correct |
64 |
Correct |
1 ms |
972 KB |
Output is correct |
65 |
Correct |
1 ms |
972 KB |
Output is correct |
66 |
Correct |
1 ms |
972 KB |
Output is correct |
67 |
Correct |
504 ms |
29424 KB |
Output is correct |
68 |
Correct |
453 ms |
29380 KB |
Output is correct |
69 |
Correct |
463 ms |
29372 KB |
Output is correct |
70 |
Correct |
5 ms |
1484 KB |
Output is correct |
71 |
Correct |
10 ms |
1968 KB |
Output is correct |
72 |
Correct |
211 ms |
15288 KB |
Output is correct |
73 |
Correct |
370 ms |
22468 KB |
Output is correct |
74 |
Correct |
554 ms |
29368 KB |
Output is correct |
75 |
Correct |
573 ms |
31204 KB |
Output is correct |
76 |
Correct |
474 ms |
29420 KB |
Output is correct |
77 |
Correct |
6 ms |
1612 KB |
Output is correct |
78 |
Correct |
13 ms |
2332 KB |
Output is correct |
79 |
Correct |
238 ms |
15808 KB |
Output is correct |
80 |
Correct |
402 ms |
23140 KB |
Output is correct |
81 |
Correct |
573 ms |
30316 KB |
Output is correct |
82 |
Correct |
1 ms |
972 KB |
Output is correct |
83 |
Correct |
1 ms |
972 KB |
Output is correct |
84 |
Correct |
1 ms |
972 KB |
Output is correct |
85 |
Correct |
559 ms |
29908 KB |
Output is correct |
86 |
Correct |
545 ms |
29584 KB |
Output is correct |
87 |
Correct |
580 ms |
29568 KB |
Output is correct |
88 |
Correct |
453 ms |
25248 KB |
Output is correct |
89 |
Correct |
370 ms |
19832 KB |
Output is correct |
90 |
Correct |
596 ms |
23312 KB |
Output is correct |
91 |
Correct |
446 ms |
23120 KB |
Output is correct |
92 |
Correct |
569 ms |
29436 KB |
Output is correct |
93 |
Correct |
525 ms |
29344 KB |
Output is correct |
94 |
Correct |
739 ms |
29372 KB |
Output is correct |
95 |
Correct |
712 ms |
29340 KB |
Output is correct |
96 |
Correct |
1 ms |
972 KB |
Output is correct |
97 |
Correct |
25 ms |
3396 KB |
Output is correct |
98 |
Correct |
121 ms |
10432 KB |
Output is correct |
99 |
Correct |
525 ms |
29900 KB |
Output is correct |
100 |
Correct |
13 ms |
2252 KB |
Output is correct |
101 |
Correct |
75 ms |
6796 KB |
Output is correct |
102 |
Correct |
206 ms |
12072 KB |
Output is correct |
103 |
Correct |
217 ms |
12720 KB |
Output is correct |
104 |
Correct |
295 ms |
16860 KB |
Output is correct |
105 |
Correct |
411 ms |
21188 KB |
Output is correct |
106 |
Correct |
575 ms |
25548 KB |
Output is correct |
107 |
Correct |
680 ms |
29872 KB |
Output is correct |
108 |
Correct |
1 ms |
972 KB |
Output is correct |
109 |
Correct |
1 ms |
972 KB |
Output is correct |
110 |
Correct |
1 ms |
972 KB |
Output is correct |
111 |
Correct |
2 ms |
984 KB |
Output is correct |
112 |
Correct |
1 ms |
972 KB |
Output is correct |
113 |
Correct |
1 ms |
972 KB |
Output is correct |
114 |
Correct |
1 ms |
972 KB |
Output is correct |
115 |
Correct |
1 ms |
972 KB |
Output is correct |
116 |
Correct |
1 ms |
972 KB |
Output is correct |
117 |
Correct |
2 ms |
1044 KB |
Output is correct |
118 |
Correct |
1 ms |
972 KB |
Output is correct |
119 |
Correct |
3 ms |
1228 KB |
Output is correct |
120 |
Correct |
4 ms |
1436 KB |
Output is correct |
121 |
Correct |
218 ms |
15220 KB |
Output is correct |
122 |
Correct |
397 ms |
21596 KB |
Output is correct |
123 |
Correct |
396 ms |
21600 KB |
Output is correct |
124 |
Correct |
1 ms |
972 KB |
Output is correct |
125 |
Correct |
1 ms |
972 KB |
Output is correct |
126 |
Correct |
1 ms |
972 KB |
Output is correct |
127 |
Correct |
559 ms |
29364 KB |
Output is correct |
128 |
Correct |
478 ms |
29356 KB |
Output is correct |
129 |
Correct |
495 ms |
29288 KB |
Output is correct |
130 |
Correct |
5 ms |
1484 KB |
Output is correct |
131 |
Correct |
10 ms |
2020 KB |
Output is correct |
132 |
Correct |
230 ms |
15292 KB |
Output is correct |
133 |
Correct |
370 ms |
22336 KB |
Output is correct |
134 |
Correct |
572 ms |
29440 KB |
Output is correct |
135 |
Correct |
557 ms |
29448 KB |
Output is correct |
136 |
Correct |
485 ms |
29488 KB |
Output is correct |
137 |
Correct |
612 ms |
29652 KB |
Output is correct |
138 |
Correct |
682 ms |
31896 KB |
Output is correct |
139 |
Correct |
520 ms |
26776 KB |
Output is correct |
140 |
Correct |
1 ms |
972 KB |
Output is correct |
141 |
Correct |
57 ms |
6016 KB |
Output is correct |
142 |
Correct |
35 ms |
3544 KB |
Output is correct |
143 |
Correct |
130 ms |
9060 KB |
Output is correct |
144 |
Correct |
276 ms |
15072 KB |
Output is correct |
145 |
Correct |
270 ms |
16568 KB |
Output is correct |
146 |
Correct |
372 ms |
20576 KB |
Output is correct |
147 |
Correct |
519 ms |
24536 KB |
Output is correct |
148 |
Correct |
573 ms |
28016 KB |
Output is correct |
149 |
Correct |
678 ms |
32088 KB |
Output is correct |
150 |
Correct |
586 ms |
31260 KB |
Output is correct |
151 |
Correct |
438 ms |
29340 KB |
Output is correct |
152 |
Correct |
6 ms |
1612 KB |
Output is correct |
153 |
Correct |
12 ms |
2124 KB |
Output is correct |
154 |
Correct |
251 ms |
15696 KB |
Output is correct |
155 |
Correct |
366 ms |
23120 KB |
Output is correct |
156 |
Correct |
550 ms |
30376 KB |
Output is correct |
157 |
Correct |
2 ms |
972 KB |
Output is correct |
158 |
Correct |
1 ms |
972 KB |
Output is correct |
159 |
Correct |
1 ms |
972 KB |
Output is correct |
160 |
Correct |
1 ms |
972 KB |
Output is correct |
161 |
Correct |
724 ms |
29388 KB |
Output is correct |
162 |
Correct |
528 ms |
29780 KB |
Output is correct |
163 |
Correct |
545 ms |
29828 KB |
Output is correct |
164 |
Correct |
546 ms |
29784 KB |
Output is correct |
165 |
Correct |
642 ms |
29696 KB |
Output is correct |
166 |
Correct |
685 ms |
29352 KB |
Output is correct |
167 |
Correct |
129 ms |
7816 KB |
Output is correct |
168 |
Correct |
63 ms |
4520 KB |
Output is correct |
169 |
Correct |
162 ms |
10072 KB |
Output is correct |
170 |
Correct |
421 ms |
17948 KB |
Output is correct |
171 |
Correct |
615 ms |
23168 KB |
Output is correct |
172 |
Correct |
263 ms |
15356 KB |
Output is correct |
173 |
Correct |
346 ms |
18332 KB |
Output is correct |
174 |
Correct |
447 ms |
21244 KB |
Output is correct |
175 |
Correct |
602 ms |
24012 KB |
Output is correct |
176 |
Correct |
595 ms |
27024 KB |
Output is correct |
177 |
Correct |
805 ms |
29904 KB |
Output is correct |