#include "parks.h"
#include<bits/stdc++.h>
using namespace std;
mt19937 rng;
struct bpmatch{
vector<int>adj[200100];
int match1[200100],match2[400100],dep[200100];
void AE(int a,int b){
adj[a].push_back(b);
}
int bfs(int n){
queue<int>q;
for(int i=1;i<=n;i++)
if(!match1[i])
q.push(i),
dep[i]=1;
else dep[i]=0;
dep[0]=0;
while(q.size()){
int x=q.front();
q.pop();
if(dep[x]>=dep[0]&&dep[0])
continue;
for(auto i:adj[x])
if(!dep[match2[i]])
dep[match2[i]]=dep[x]+1,
q.push(match2[i]);
}
return dep[0];
}
int dfs(int n){
if(!n)return 1;
for(auto i:adj[n]){
if(dep[match2[i]]==dep[n]+1&&dfs(match2[i]))
return match2[match1[n]=i]=n,1;
}
dep[n]=1e9;
return 0;
}
int matching(int n){
int ans=0;
while(bfs(n))for(int i=1;i<=n;i++)
if(!match1[i]) ans+=dfs(i);
return ans;
}
} G;
map<int,int> pts[200100];
vector<pair<int,int>> tre_edges;
struct dsu{
int par[200100];
int abp(int n){
return par[n]?par[n]=abp(par[n]):n;
}
int merge(int a,int b){
a=abp(a),b=abp(b);
return a-b?par[a]=b:0;
}
} DT;
int Xpos[400100],Ypos[400100];
int construct_roads(std::vector<int> x, std::vector<int> y) {
int n=x.size();
for(int i=0;i<n;i++)
pts[x[i]][y[i]]=i+1;
vector<tuple<int,int,int>>E,pt;
for(int i=0;i<n;i++)
pt.push_back({x[i],y[i],i});
sort(pt.begin(),pt.end());
for(auto[X,Y,i]:pt)
if(pts[X][Y+2])
E.push_back({i+1,pts[X][Y+2],1});
for(auto[X,Y,i]:pt)
if(pts[X+2][Y])
E.push_back({i+1,pts[X+2][Y],0});
vector<int>u,v,A,B;
int CC=0;
for(auto [i,j,k]:E){
if(DT.merge(i,j)){
u.push_back(i-1);
v.push_back(j-1);
int x1=x[i-1]+1,y1=y[i-1]+1;
int x2=x1,y2=y1;
if(k)x2-=2;
else y2-=2;
if(!pts[x1][y1])
pts[x1][y1]=++CC,
Xpos[CC]=x1,
Ypos[CC]=y1;
if(!pts[x2][y2])
pts[x2][y2]=++CC,
Xpos[CC]=x2,
Ypos[CC]=y2;
G.AE(u.size(),pts[x1][y1]);
G.AE(u.size(),pts[x2][y2]);
}
}
if(u.size()-n+1)return 0;
if(G.matching(n-1)!=n-1)
return 0;
for(int i=1;i<n;i++)
A.push_back(Xpos[G.match1[i]]),
B.push_back(Ypos[G.match1[i]]);
build(u,v,A,B);
return 1;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
18776 KB |
Output is correct |
2 |
Correct |
2 ms |
20828 KB |
Output is correct |
3 |
Correct |
2 ms |
16732 KB |
Output is correct |
4 |
Correct |
2 ms |
20828 KB |
Output is correct |
5 |
Correct |
2 ms |
20828 KB |
Output is correct |
6 |
Correct |
2 ms |
18908 KB |
Output is correct |
7 |
Correct |
2 ms |
18792 KB |
Output is correct |
8 |
Correct |
2 ms |
18780 KB |
Output is correct |
9 |
Correct |
148 ms |
52036 KB |
Output is correct |
10 |
Correct |
12 ms |
24052 KB |
Output is correct |
11 |
Correct |
64 ms |
37708 KB |
Output is correct |
12 |
Correct |
18 ms |
25560 KB |
Output is correct |
13 |
Correct |
51 ms |
30624 KB |
Output is correct |
14 |
Correct |
3 ms |
19036 KB |
Output is correct |
15 |
Correct |
3 ms |
19292 KB |
Output is correct |
16 |
Correct |
169 ms |
52096 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
18776 KB |
Output is correct |
2 |
Correct |
2 ms |
20828 KB |
Output is correct |
3 |
Correct |
2 ms |
16732 KB |
Output is correct |
4 |
Correct |
2 ms |
20828 KB |
Output is correct |
5 |
Correct |
2 ms |
20828 KB |
Output is correct |
6 |
Correct |
2 ms |
18908 KB |
Output is correct |
7 |
Correct |
2 ms |
18792 KB |
Output is correct |
8 |
Correct |
2 ms |
18780 KB |
Output is correct |
9 |
Correct |
148 ms |
52036 KB |
Output is correct |
10 |
Correct |
12 ms |
24052 KB |
Output is correct |
11 |
Correct |
64 ms |
37708 KB |
Output is correct |
12 |
Correct |
18 ms |
25560 KB |
Output is correct |
13 |
Correct |
51 ms |
30624 KB |
Output is correct |
14 |
Correct |
3 ms |
19036 KB |
Output is correct |
15 |
Correct |
3 ms |
19292 KB |
Output is correct |
16 |
Correct |
169 ms |
52096 KB |
Output is correct |
17 |
Correct |
3 ms |
20824 KB |
Output is correct |
18 |
Correct |
2 ms |
20828 KB |
Output is correct |
19 |
Correct |
3 ms |
20828 KB |
Output is correct |
20 |
Correct |
2 ms |
20828 KB |
Output is correct |
21 |
Correct |
2 ms |
18780 KB |
Output is correct |
22 |
Correct |
2 ms |
20828 KB |
Output is correct |
23 |
Correct |
288 ms |
77396 KB |
Output is correct |
24 |
Correct |
2 ms |
20824 KB |
Output is correct |
25 |
Correct |
3 ms |
21084 KB |
Output is correct |
26 |
Correct |
4 ms |
19548 KB |
Output is correct |
27 |
Correct |
5 ms |
19804 KB |
Output is correct |
28 |
Correct |
106 ms |
42912 KB |
Output is correct |
29 |
Correct |
178 ms |
54152 KB |
Output is correct |
30 |
Correct |
219 ms |
65348 KB |
Output is correct |
31 |
Correct |
303 ms |
76852 KB |
Output is correct |
32 |
Correct |
3 ms |
20828 KB |
Output is correct |
33 |
Correct |
2 ms |
20828 KB |
Output is correct |
34 |
Correct |
3 ms |
20828 KB |
Output is correct |
35 |
Correct |
2 ms |
16732 KB |
Output is correct |
36 |
Correct |
2 ms |
16728 KB |
Output is correct |
37 |
Correct |
2 ms |
20828 KB |
Output is correct |
38 |
Correct |
2 ms |
20828 KB |
Output is correct |
39 |
Correct |
2 ms |
20828 KB |
Output is correct |
40 |
Correct |
2 ms |
20828 KB |
Output is correct |
41 |
Correct |
3 ms |
16732 KB |
Output is correct |
42 |
Correct |
3 ms |
20828 KB |
Output is correct |
43 |
Correct |
4 ms |
19360 KB |
Output is correct |
44 |
Correct |
4 ms |
19472 KB |
Output is correct |
45 |
Correct |
140 ms |
48328 KB |
Output is correct |
46 |
Correct |
201 ms |
61632 KB |
Output is correct |
47 |
Correct |
216 ms |
61380 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
18776 KB |
Output is correct |
2 |
Correct |
2 ms |
20828 KB |
Output is correct |
3 |
Correct |
2 ms |
16732 KB |
Output is correct |
4 |
Correct |
2 ms |
20828 KB |
Output is correct |
5 |
Correct |
2 ms |
20828 KB |
Output is correct |
6 |
Correct |
2 ms |
18908 KB |
Output is correct |
7 |
Correct |
2 ms |
18792 KB |
Output is correct |
8 |
Correct |
2 ms |
18780 KB |
Output is correct |
9 |
Correct |
148 ms |
52036 KB |
Output is correct |
10 |
Correct |
12 ms |
24052 KB |
Output is correct |
11 |
Correct |
64 ms |
37708 KB |
Output is correct |
12 |
Correct |
18 ms |
25560 KB |
Output is correct |
13 |
Correct |
51 ms |
30624 KB |
Output is correct |
14 |
Correct |
3 ms |
19036 KB |
Output is correct |
15 |
Correct |
3 ms |
19292 KB |
Output is correct |
16 |
Correct |
169 ms |
52096 KB |
Output is correct |
17 |
Correct |
3 ms |
20824 KB |
Output is correct |
18 |
Correct |
2 ms |
20828 KB |
Output is correct |
19 |
Correct |
3 ms |
20828 KB |
Output is correct |
20 |
Correct |
2 ms |
20828 KB |
Output is correct |
21 |
Correct |
2 ms |
18780 KB |
Output is correct |
22 |
Correct |
2 ms |
20828 KB |
Output is correct |
23 |
Correct |
288 ms |
77396 KB |
Output is correct |
24 |
Correct |
2 ms |
20824 KB |
Output is correct |
25 |
Correct |
3 ms |
21084 KB |
Output is correct |
26 |
Correct |
4 ms |
19548 KB |
Output is correct |
27 |
Correct |
5 ms |
19804 KB |
Output is correct |
28 |
Correct |
106 ms |
42912 KB |
Output is correct |
29 |
Correct |
178 ms |
54152 KB |
Output is correct |
30 |
Correct |
219 ms |
65348 KB |
Output is correct |
31 |
Correct |
303 ms |
76852 KB |
Output is correct |
32 |
Correct |
3 ms |
20828 KB |
Output is correct |
33 |
Correct |
2 ms |
20828 KB |
Output is correct |
34 |
Correct |
3 ms |
20828 KB |
Output is correct |
35 |
Correct |
2 ms |
16732 KB |
Output is correct |
36 |
Correct |
2 ms |
16728 KB |
Output is correct |
37 |
Correct |
2 ms |
20828 KB |
Output is correct |
38 |
Correct |
2 ms |
20828 KB |
Output is correct |
39 |
Correct |
2 ms |
20828 KB |
Output is correct |
40 |
Correct |
2 ms |
20828 KB |
Output is correct |
41 |
Correct |
3 ms |
16732 KB |
Output is correct |
42 |
Correct |
3 ms |
20828 KB |
Output is correct |
43 |
Correct |
4 ms |
19360 KB |
Output is correct |
44 |
Correct |
4 ms |
19472 KB |
Output is correct |
45 |
Correct |
140 ms |
48328 KB |
Output is correct |
46 |
Correct |
201 ms |
61632 KB |
Output is correct |
47 |
Correct |
216 ms |
61380 KB |
Output is correct |
48 |
Correct |
3 ms |
20828 KB |
Output is correct |
49 |
Correct |
3 ms |
20828 KB |
Output is correct |
50 |
Correct |
3 ms |
20928 KB |
Output is correct |
51 |
Correct |
2 ms |
20828 KB |
Output is correct |
52 |
Correct |
2 ms |
20908 KB |
Output is correct |
53 |
Correct |
2 ms |
20828 KB |
Output is correct |
54 |
Correct |
2 ms |
20940 KB |
Output is correct |
55 |
Correct |
275 ms |
74840 KB |
Output is correct |
56 |
Correct |
3 ms |
20824 KB |
Output is correct |
57 |
Correct |
4 ms |
21340 KB |
Output is correct |
58 |
Correct |
7 ms |
22496 KB |
Output is correct |
59 |
Correct |
10 ms |
21024 KB |
Output is correct |
60 |
Correct |
124 ms |
47004 KB |
Output is correct |
61 |
Correct |
178 ms |
56632 KB |
Output is correct |
62 |
Correct |
221 ms |
64712 KB |
Output is correct |
63 |
Correct |
314 ms |
73520 KB |
Output is correct |
64 |
Correct |
2 ms |
16728 KB |
Output is correct |
65 |
Correct |
2 ms |
20828 KB |
Output is correct |
66 |
Correct |
2 ms |
16732 KB |
Output is correct |
67 |
Correct |
333 ms |
83336 KB |
Output is correct |
68 |
Correct |
300 ms |
85300 KB |
Output is correct |
69 |
Correct |
316 ms |
83696 KB |
Output is correct |
70 |
Correct |
5 ms |
19800 KB |
Output is correct |
71 |
Correct |
8 ms |
20572 KB |
Output is correct |
72 |
Correct |
133 ms |
47784 KB |
Output is correct |
73 |
Correct |
228 ms |
62956 KB |
Output is correct |
74 |
Correct |
280 ms |
75712 KB |
Output is correct |
75 |
Correct |
318 ms |
78276 KB |
Output is correct |
76 |
Correct |
307 ms |
84860 KB |
Output is correct |
77 |
Correct |
6 ms |
20056 KB |
Output is correct |
78 |
Correct |
10 ms |
20972 KB |
Output is correct |
79 |
Correct |
129 ms |
47968 KB |
Output is correct |
80 |
Correct |
217 ms |
62456 KB |
Output is correct |
81 |
Correct |
291 ms |
75716 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
18776 KB |
Output is correct |
2 |
Correct |
2 ms |
20828 KB |
Output is correct |
3 |
Correct |
2 ms |
16732 KB |
Output is correct |
4 |
Correct |
2 ms |
20828 KB |
Output is correct |
5 |
Correct |
2 ms |
20828 KB |
Output is correct |
6 |
Correct |
2 ms |
18908 KB |
Output is correct |
7 |
Correct |
2 ms |
18792 KB |
Output is correct |
8 |
Correct |
2 ms |
18780 KB |
Output is correct |
9 |
Correct |
148 ms |
52036 KB |
Output is correct |
10 |
Correct |
12 ms |
24052 KB |
Output is correct |
11 |
Correct |
64 ms |
37708 KB |
Output is correct |
12 |
Correct |
18 ms |
25560 KB |
Output is correct |
13 |
Correct |
51 ms |
30624 KB |
Output is correct |
14 |
Correct |
3 ms |
19036 KB |
Output is correct |
15 |
Correct |
3 ms |
19292 KB |
Output is correct |
16 |
Correct |
169 ms |
52096 KB |
Output is correct |
17 |
Correct |
2 ms |
20828 KB |
Output is correct |
18 |
Correct |
2 ms |
20828 KB |
Output is correct |
19 |
Correct |
2 ms |
18780 KB |
Output is correct |
20 |
Correct |
169 ms |
69308 KB |
Output is correct |
21 |
Correct |
150 ms |
73664 KB |
Output is correct |
22 |
Correct |
138 ms |
68984 KB |
Output is correct |
23 |
Correct |
159 ms |
73668 KB |
Output is correct |
24 |
Correct |
124 ms |
50364 KB |
Output is correct |
25 |
Correct |
172 ms |
72248 KB |
Output is correct |
26 |
Correct |
159 ms |
72060 KB |
Output is correct |
27 |
Correct |
201 ms |
83796 KB |
Output is correct |
28 |
Correct |
192 ms |
83028 KB |
Output is correct |
29 |
Correct |
211 ms |
83424 KB |
Output is correct |
30 |
Correct |
208 ms |
83268 KB |
Output is correct |
31 |
Correct |
2 ms |
20824 KB |
Output is correct |
32 |
Correct |
14 ms |
24780 KB |
Output is correct |
33 |
Correct |
34 ms |
33480 KB |
Output is correct |
34 |
Correct |
151 ms |
74008 KB |
Output is correct |
35 |
Correct |
9 ms |
21024 KB |
Output is correct |
36 |
Correct |
47 ms |
29644 KB |
Output is correct |
37 |
Correct |
80 ms |
40100 KB |
Output is correct |
38 |
Correct |
82 ms |
41412 KB |
Output is correct |
39 |
Correct |
121 ms |
48840 KB |
Output is correct |
40 |
Correct |
148 ms |
57716 KB |
Output is correct |
41 |
Correct |
201 ms |
64968 KB |
Output is correct |
42 |
Correct |
226 ms |
73112 KB |
Output is correct |
43 |
Correct |
2 ms |
20828 KB |
Output is correct |
44 |
Correct |
2 ms |
20828 KB |
Output is correct |
45 |
Correct |
2 ms |
20828 KB |
Output is correct |
46 |
Correct |
2 ms |
16728 KB |
Output is correct |
47 |
Correct |
2 ms |
16732 KB |
Output is correct |
48 |
Correct |
2 ms |
20828 KB |
Output is correct |
49 |
Correct |
2 ms |
20828 KB |
Output is correct |
50 |
Correct |
3 ms |
20828 KB |
Output is correct |
51 |
Correct |
2 ms |
20828 KB |
Output is correct |
52 |
Correct |
2 ms |
16732 KB |
Output is correct |
53 |
Correct |
3 ms |
20828 KB |
Output is correct |
54 |
Correct |
3 ms |
19292 KB |
Output is correct |
55 |
Correct |
5 ms |
19496 KB |
Output is correct |
56 |
Correct |
134 ms |
48324 KB |
Output is correct |
57 |
Correct |
201 ms |
61892 KB |
Output is correct |
58 |
Correct |
221 ms |
62344 KB |
Output is correct |
59 |
Correct |
2 ms |
16732 KB |
Output is correct |
60 |
Correct |
3 ms |
20828 KB |
Output is correct |
61 |
Correct |
2 ms |
16728 KB |
Output is correct |
62 |
Correct |
320 ms |
83256 KB |
Output is correct |
63 |
Correct |
312 ms |
85560 KB |
Output is correct |
64 |
Correct |
317 ms |
84296 KB |
Output is correct |
65 |
Correct |
5 ms |
19804 KB |
Output is correct |
66 |
Correct |
8 ms |
20572 KB |
Output is correct |
67 |
Correct |
126 ms |
47812 KB |
Output is correct |
68 |
Correct |
218 ms |
63020 KB |
Output is correct |
69 |
Correct |
298 ms |
75204 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
18776 KB |
Output is correct |
2 |
Correct |
2 ms |
20828 KB |
Output is correct |
3 |
Correct |
2 ms |
16732 KB |
Output is correct |
4 |
Correct |
2 ms |
20828 KB |
Output is correct |
5 |
Correct |
2 ms |
20828 KB |
Output is correct |
6 |
Correct |
2 ms |
18908 KB |
Output is correct |
7 |
Correct |
2 ms |
18792 KB |
Output is correct |
8 |
Correct |
2 ms |
18780 KB |
Output is correct |
9 |
Correct |
148 ms |
52036 KB |
Output is correct |
10 |
Correct |
12 ms |
24052 KB |
Output is correct |
11 |
Correct |
64 ms |
37708 KB |
Output is correct |
12 |
Correct |
18 ms |
25560 KB |
Output is correct |
13 |
Correct |
51 ms |
30624 KB |
Output is correct |
14 |
Correct |
3 ms |
19036 KB |
Output is correct |
15 |
Correct |
3 ms |
19292 KB |
Output is correct |
16 |
Correct |
169 ms |
52096 KB |
Output is correct |
17 |
Correct |
268 ms |
83808 KB |
Output is correct |
18 |
Correct |
227 ms |
84164 KB |
Output is correct |
19 |
Correct |
143 ms |
71360 KB |
Output is correct |
20 |
Correct |
192 ms |
71104 KB |
Output is correct |
21 |
Correct |
197 ms |
73164 KB |
Output is correct |
22 |
Correct |
2 ms |
20828 KB |
Output is correct |
23 |
Correct |
30 ms |
29144 KB |
Output is correct |
24 |
Correct |
15 ms |
23124 KB |
Output is correct |
25 |
Correct |
55 ms |
33944 KB |
Output is correct |
26 |
Correct |
94 ms |
44360 KB |
Output is correct |
27 |
Correct |
114 ms |
46536 KB |
Output is correct |
28 |
Correct |
143 ms |
52596 KB |
Output is correct |
29 |
Correct |
167 ms |
59840 KB |
Output is correct |
30 |
Correct |
195 ms |
66212 KB |
Output is correct |
31 |
Correct |
245 ms |
72292 KB |
Output is correct |
32 |
Correct |
292 ms |
78020 KB |
Output is correct |
33 |
Correct |
305 ms |
84796 KB |
Output is correct |
34 |
Correct |
6 ms |
20056 KB |
Output is correct |
35 |
Correct |
9 ms |
21020 KB |
Output is correct |
36 |
Correct |
136 ms |
47896 KB |
Output is correct |
37 |
Correct |
214 ms |
62656 KB |
Output is correct |
38 |
Correct |
287 ms |
75376 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
18776 KB |
Output is correct |
2 |
Correct |
2 ms |
20828 KB |
Output is correct |
3 |
Correct |
2 ms |
16732 KB |
Output is correct |
4 |
Correct |
2 ms |
20828 KB |
Output is correct |
5 |
Correct |
2 ms |
20828 KB |
Output is correct |
6 |
Correct |
2 ms |
18908 KB |
Output is correct |
7 |
Correct |
2 ms |
18792 KB |
Output is correct |
8 |
Correct |
2 ms |
18780 KB |
Output is correct |
9 |
Correct |
148 ms |
52036 KB |
Output is correct |
10 |
Correct |
12 ms |
24052 KB |
Output is correct |
11 |
Correct |
64 ms |
37708 KB |
Output is correct |
12 |
Correct |
18 ms |
25560 KB |
Output is correct |
13 |
Correct |
51 ms |
30624 KB |
Output is correct |
14 |
Correct |
3 ms |
19036 KB |
Output is correct |
15 |
Correct |
3 ms |
19292 KB |
Output is correct |
16 |
Correct |
169 ms |
52096 KB |
Output is correct |
17 |
Correct |
3 ms |
20824 KB |
Output is correct |
18 |
Correct |
2 ms |
20828 KB |
Output is correct |
19 |
Correct |
3 ms |
20828 KB |
Output is correct |
20 |
Correct |
2 ms |
20828 KB |
Output is correct |
21 |
Correct |
2 ms |
18780 KB |
Output is correct |
22 |
Correct |
2 ms |
20828 KB |
Output is correct |
23 |
Correct |
288 ms |
77396 KB |
Output is correct |
24 |
Correct |
2 ms |
20824 KB |
Output is correct |
25 |
Correct |
3 ms |
21084 KB |
Output is correct |
26 |
Correct |
4 ms |
19548 KB |
Output is correct |
27 |
Correct |
5 ms |
19804 KB |
Output is correct |
28 |
Correct |
106 ms |
42912 KB |
Output is correct |
29 |
Correct |
178 ms |
54152 KB |
Output is correct |
30 |
Correct |
219 ms |
65348 KB |
Output is correct |
31 |
Correct |
303 ms |
76852 KB |
Output is correct |
32 |
Correct |
3 ms |
20828 KB |
Output is correct |
33 |
Correct |
2 ms |
20828 KB |
Output is correct |
34 |
Correct |
3 ms |
20828 KB |
Output is correct |
35 |
Correct |
2 ms |
16732 KB |
Output is correct |
36 |
Correct |
2 ms |
16728 KB |
Output is correct |
37 |
Correct |
2 ms |
20828 KB |
Output is correct |
38 |
Correct |
2 ms |
20828 KB |
Output is correct |
39 |
Correct |
2 ms |
20828 KB |
Output is correct |
40 |
Correct |
2 ms |
20828 KB |
Output is correct |
41 |
Correct |
3 ms |
16732 KB |
Output is correct |
42 |
Correct |
3 ms |
20828 KB |
Output is correct |
43 |
Correct |
4 ms |
19360 KB |
Output is correct |
44 |
Correct |
4 ms |
19472 KB |
Output is correct |
45 |
Correct |
140 ms |
48328 KB |
Output is correct |
46 |
Correct |
201 ms |
61632 KB |
Output is correct |
47 |
Correct |
216 ms |
61380 KB |
Output is correct |
48 |
Correct |
3 ms |
20828 KB |
Output is correct |
49 |
Correct |
3 ms |
20828 KB |
Output is correct |
50 |
Correct |
3 ms |
20928 KB |
Output is correct |
51 |
Correct |
2 ms |
20828 KB |
Output is correct |
52 |
Correct |
2 ms |
20908 KB |
Output is correct |
53 |
Correct |
2 ms |
20828 KB |
Output is correct |
54 |
Correct |
2 ms |
20940 KB |
Output is correct |
55 |
Correct |
275 ms |
74840 KB |
Output is correct |
56 |
Correct |
3 ms |
20824 KB |
Output is correct |
57 |
Correct |
4 ms |
21340 KB |
Output is correct |
58 |
Correct |
7 ms |
22496 KB |
Output is correct |
59 |
Correct |
10 ms |
21024 KB |
Output is correct |
60 |
Correct |
124 ms |
47004 KB |
Output is correct |
61 |
Correct |
178 ms |
56632 KB |
Output is correct |
62 |
Correct |
221 ms |
64712 KB |
Output is correct |
63 |
Correct |
314 ms |
73520 KB |
Output is correct |
64 |
Correct |
2 ms |
16728 KB |
Output is correct |
65 |
Correct |
2 ms |
20828 KB |
Output is correct |
66 |
Correct |
2 ms |
16732 KB |
Output is correct |
67 |
Correct |
333 ms |
83336 KB |
Output is correct |
68 |
Correct |
300 ms |
85300 KB |
Output is correct |
69 |
Correct |
316 ms |
83696 KB |
Output is correct |
70 |
Correct |
5 ms |
19800 KB |
Output is correct |
71 |
Correct |
8 ms |
20572 KB |
Output is correct |
72 |
Correct |
133 ms |
47784 KB |
Output is correct |
73 |
Correct |
228 ms |
62956 KB |
Output is correct |
74 |
Correct |
280 ms |
75712 KB |
Output is correct |
75 |
Correct |
318 ms |
78276 KB |
Output is correct |
76 |
Correct |
307 ms |
84860 KB |
Output is correct |
77 |
Correct |
6 ms |
20056 KB |
Output is correct |
78 |
Correct |
10 ms |
20972 KB |
Output is correct |
79 |
Correct |
129 ms |
47968 KB |
Output is correct |
80 |
Correct |
217 ms |
62456 KB |
Output is correct |
81 |
Correct |
291 ms |
75716 KB |
Output is correct |
82 |
Correct |
2 ms |
20828 KB |
Output is correct |
83 |
Correct |
2 ms |
20828 KB |
Output is correct |
84 |
Correct |
2 ms |
18780 KB |
Output is correct |
85 |
Correct |
169 ms |
69308 KB |
Output is correct |
86 |
Correct |
150 ms |
73664 KB |
Output is correct |
87 |
Correct |
138 ms |
68984 KB |
Output is correct |
88 |
Correct |
159 ms |
73668 KB |
Output is correct |
89 |
Correct |
124 ms |
50364 KB |
Output is correct |
90 |
Correct |
172 ms |
72248 KB |
Output is correct |
91 |
Correct |
159 ms |
72060 KB |
Output is correct |
92 |
Correct |
201 ms |
83796 KB |
Output is correct |
93 |
Correct |
192 ms |
83028 KB |
Output is correct |
94 |
Correct |
211 ms |
83424 KB |
Output is correct |
95 |
Correct |
208 ms |
83268 KB |
Output is correct |
96 |
Correct |
2 ms |
20824 KB |
Output is correct |
97 |
Correct |
14 ms |
24780 KB |
Output is correct |
98 |
Correct |
34 ms |
33480 KB |
Output is correct |
99 |
Correct |
151 ms |
74008 KB |
Output is correct |
100 |
Correct |
9 ms |
21024 KB |
Output is correct |
101 |
Correct |
47 ms |
29644 KB |
Output is correct |
102 |
Correct |
80 ms |
40100 KB |
Output is correct |
103 |
Correct |
82 ms |
41412 KB |
Output is correct |
104 |
Correct |
121 ms |
48840 KB |
Output is correct |
105 |
Correct |
148 ms |
57716 KB |
Output is correct |
106 |
Correct |
201 ms |
64968 KB |
Output is correct |
107 |
Correct |
226 ms |
73112 KB |
Output is correct |
108 |
Correct |
2 ms |
20828 KB |
Output is correct |
109 |
Correct |
2 ms |
20828 KB |
Output is correct |
110 |
Correct |
2 ms |
20828 KB |
Output is correct |
111 |
Correct |
2 ms |
16728 KB |
Output is correct |
112 |
Correct |
2 ms |
16732 KB |
Output is correct |
113 |
Correct |
2 ms |
20828 KB |
Output is correct |
114 |
Correct |
2 ms |
20828 KB |
Output is correct |
115 |
Correct |
3 ms |
20828 KB |
Output is correct |
116 |
Correct |
2 ms |
20828 KB |
Output is correct |
117 |
Correct |
2 ms |
16732 KB |
Output is correct |
118 |
Correct |
3 ms |
20828 KB |
Output is correct |
119 |
Correct |
3 ms |
19292 KB |
Output is correct |
120 |
Correct |
5 ms |
19496 KB |
Output is correct |
121 |
Correct |
134 ms |
48324 KB |
Output is correct |
122 |
Correct |
201 ms |
61892 KB |
Output is correct |
123 |
Correct |
221 ms |
62344 KB |
Output is correct |
124 |
Correct |
2 ms |
16732 KB |
Output is correct |
125 |
Correct |
3 ms |
20828 KB |
Output is correct |
126 |
Correct |
2 ms |
16728 KB |
Output is correct |
127 |
Correct |
320 ms |
83256 KB |
Output is correct |
128 |
Correct |
312 ms |
85560 KB |
Output is correct |
129 |
Correct |
317 ms |
84296 KB |
Output is correct |
130 |
Correct |
5 ms |
19804 KB |
Output is correct |
131 |
Correct |
8 ms |
20572 KB |
Output is correct |
132 |
Correct |
126 ms |
47812 KB |
Output is correct |
133 |
Correct |
218 ms |
63020 KB |
Output is correct |
134 |
Correct |
298 ms |
75204 KB |
Output is correct |
135 |
Correct |
268 ms |
83808 KB |
Output is correct |
136 |
Correct |
227 ms |
84164 KB |
Output is correct |
137 |
Correct |
143 ms |
71360 KB |
Output is correct |
138 |
Correct |
192 ms |
71104 KB |
Output is correct |
139 |
Correct |
197 ms |
73164 KB |
Output is correct |
140 |
Correct |
2 ms |
20828 KB |
Output is correct |
141 |
Correct |
30 ms |
29144 KB |
Output is correct |
142 |
Correct |
15 ms |
23124 KB |
Output is correct |
143 |
Correct |
55 ms |
33944 KB |
Output is correct |
144 |
Correct |
94 ms |
44360 KB |
Output is correct |
145 |
Correct |
114 ms |
46536 KB |
Output is correct |
146 |
Correct |
143 ms |
52596 KB |
Output is correct |
147 |
Correct |
167 ms |
59840 KB |
Output is correct |
148 |
Correct |
195 ms |
66212 KB |
Output is correct |
149 |
Correct |
245 ms |
72292 KB |
Output is correct |
150 |
Correct |
292 ms |
78020 KB |
Output is correct |
151 |
Correct |
305 ms |
84796 KB |
Output is correct |
152 |
Correct |
6 ms |
20056 KB |
Output is correct |
153 |
Correct |
9 ms |
21020 KB |
Output is correct |
154 |
Correct |
136 ms |
47896 KB |
Output is correct |
155 |
Correct |
214 ms |
62656 KB |
Output is correct |
156 |
Correct |
287 ms |
75376 KB |
Output is correct |
157 |
Correct |
3 ms |
20824 KB |
Output is correct |
158 |
Correct |
2 ms |
16732 KB |
Output is correct |
159 |
Correct |
2 ms |
20928 KB |
Output is correct |
160 |
Correct |
2 ms |
20944 KB |
Output is correct |
161 |
Correct |
188 ms |
67012 KB |
Output is correct |
162 |
Correct |
152 ms |
76220 KB |
Output is correct |
163 |
Correct |
139 ms |
74472 KB |
Output is correct |
164 |
Correct |
138 ms |
74688 KB |
Output is correct |
165 |
Correct |
161 ms |
71604 KB |
Output is correct |
166 |
Correct |
272 ms |
69564 KB |
Output is correct |
167 |
Incorrect |
54 ms |
30664 KB |
Solution announced impossible, but it is possible. |
168 |
Halted |
0 ms |
0 KB |
- |