#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> PP;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef vector<bool> vb;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define REP(i,k,n) for(ll i=(ll)(k);i<(ll)(n);i++)
#define all(a) a.begin(),a.end()
#define fi first
#define se second
#define pb emplace_back
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
template<class T> bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;}
template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;}
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<'\n';}
const ll inf=1001001001001001001;
struct UF{
ll n;
vi par,sz;
UF(ll n_):n(n_),par(n,-1),sz(n,1){}
void merge(ll a,ll b){
a=root(a);b=root(b);
if(a==b)return;
if(sz[a]>sz[b])swap(a,b);
par[a]=b;
sz[b]+=sz[a];
}
ll root(ll i){
if(par[i]==-1)return i;
par[i]=root(par[i]);
return par[i];
}
bool same(ll a,ll b){
return root(a)==root(b);
}
ll getsz(ll i){
return sz[root(i)];
}
};
int construct_roads(std::vector<int> x, std::vector<int> y) {
ll n=x.size();
UF uf(n);
vector<PP> v(n);
rep(i,n)v[i]=PP(x[i],y[i],i);
sort(all(v));
vi dx={2,0},dy={0,2};
set<P> S;
vector<int> U, V, A, B;
rep(k,4)rep(i,n)rep(j,2){
P a(x[i],y[i]),b(x[i]+dx[j],y[i]+dy[j]);
ll l=lb(v,PP(b.fi,b.se,-1));
if(l==n)continue;
l=get<2>(v[l]);
if(P(x[l],y[l])!=b)continue;
P c((a.fi+b.fi)/2,(a.se+b.se)/2);
if(a.fi==b.fi){
if((a.fi+a.se)%4!=k)continue;
if((a.fi+a.se)%4==0)c.fi--;
else c.fi++;
}
else{
if((a.fi+a.se)%4!=k)continue;
if((a.fi+a.se)%4==0)c.se++;
else c.se--;
}
uf.merge(i,l);
if(S.insert(c).se){
U.pb(i);
V.pb(l);
A.pb(c.fi);
B.pb(c.se);
}
}
if(uf.getsz(0)<n)return 0;
build(U,V,A,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 |
1 ms |
260 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
158 ms |
16648 KB |
Output is correct |
10 |
Correct |
9 ms |
1896 KB |
Output is correct |
11 |
Correct |
52 ms |
9180 KB |
Output is correct |
12 |
Correct |
13 ms |
2772 KB |
Output is correct |
13 |
Correct |
36 ms |
6204 KB |
Output is correct |
14 |
Correct |
2 ms |
340 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
176 ms |
16728 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 |
1 ms |
260 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
158 ms |
16648 KB |
Output is correct |
10 |
Correct |
9 ms |
1896 KB |
Output is correct |
11 |
Correct |
52 ms |
9180 KB |
Output is correct |
12 |
Correct |
13 ms |
2772 KB |
Output is correct |
13 |
Correct |
36 ms |
6204 KB |
Output is correct |
14 |
Correct |
2 ms |
340 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
176 ms |
16728 KB |
Output is correct |
17 |
Correct |
1 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 |
256 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
212 KB |
Output is correct |
23 |
Correct |
494 ms |
33184 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
468 KB |
Output is correct |
26 |
Correct |
5 ms |
724 KB |
Output is correct |
27 |
Correct |
5 ms |
724 KB |
Output is correct |
28 |
Correct |
173 ms |
13464 KB |
Output is correct |
29 |
Correct |
265 ms |
20004 KB |
Output is correct |
30 |
Correct |
433 ms |
26580 KB |
Output is correct |
31 |
Correct |
539 ms |
33160 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
0 ms |
212 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
1 ms |
212 KB |
Output is correct |
36 |
Correct |
0 ms |
212 KB |
Output is correct |
37 |
Correct |
0 ms |
212 KB |
Output is correct |
38 |
Correct |
0 ms |
212 KB |
Output is correct |
39 |
Correct |
0 ms |
212 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
0 ms |
212 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
2 ms |
468 KB |
Output is correct |
44 |
Correct |
3 ms |
596 KB |
Output is correct |
45 |
Correct |
198 ms |
16700 KB |
Output is correct |
46 |
Correct |
308 ms |
24096 KB |
Output is correct |
47 |
Correct |
347 ms |
24100 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 |
1 ms |
260 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
158 ms |
16648 KB |
Output is correct |
10 |
Correct |
9 ms |
1896 KB |
Output is correct |
11 |
Correct |
52 ms |
9180 KB |
Output is correct |
12 |
Correct |
13 ms |
2772 KB |
Output is correct |
13 |
Correct |
36 ms |
6204 KB |
Output is correct |
14 |
Correct |
2 ms |
340 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
176 ms |
16728 KB |
Output is correct |
17 |
Correct |
1 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 |
256 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
212 KB |
Output is correct |
23 |
Correct |
494 ms |
33184 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
468 KB |
Output is correct |
26 |
Correct |
5 ms |
724 KB |
Output is correct |
27 |
Correct |
5 ms |
724 KB |
Output is correct |
28 |
Correct |
173 ms |
13464 KB |
Output is correct |
29 |
Correct |
265 ms |
20004 KB |
Output is correct |
30 |
Correct |
433 ms |
26580 KB |
Output is correct |
31 |
Correct |
539 ms |
33160 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
0 ms |
212 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
1 ms |
212 KB |
Output is correct |
36 |
Correct |
0 ms |
212 KB |
Output is correct |
37 |
Correct |
0 ms |
212 KB |
Output is correct |
38 |
Correct |
0 ms |
212 KB |
Output is correct |
39 |
Correct |
0 ms |
212 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
0 ms |
212 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
2 ms |
468 KB |
Output is correct |
44 |
Correct |
3 ms |
596 KB |
Output is correct |
45 |
Correct |
198 ms |
16700 KB |
Output is correct |
46 |
Correct |
308 ms |
24096 KB |
Output is correct |
47 |
Correct |
347 ms |
24100 KB |
Output is correct |
48 |
Correct |
0 ms |
212 KB |
Output is correct |
49 |
Correct |
0 ms |
212 KB |
Output is correct |
50 |
Correct |
0 ms |
212 KB |
Output is correct |
51 |
Correct |
0 ms |
212 KB |
Output is correct |
52 |
Correct |
1 ms |
212 KB |
Output is correct |
53 |
Correct |
0 ms |
212 KB |
Output is correct |
54 |
Correct |
0 ms |
212 KB |
Output is correct |
55 |
Correct |
596 ms |
33104 KB |
Output is correct |
56 |
Correct |
1 ms |
212 KB |
Output is correct |
57 |
Correct |
4 ms |
596 KB |
Output is correct |
58 |
Correct |
9 ms |
1312 KB |
Output is correct |
59 |
Correct |
13 ms |
1748 KB |
Output is correct |
60 |
Correct |
261 ms |
17452 KB |
Output is correct |
61 |
Correct |
311 ms |
23168 KB |
Output is correct |
62 |
Correct |
435 ms |
28876 KB |
Output is correct |
63 |
Correct |
745 ms |
34952 KB |
Output is correct |
64 |
Correct |
1 ms |
212 KB |
Output is correct |
65 |
Correct |
1 ms |
212 KB |
Output is correct |
66 |
Correct |
1 ms |
212 KB |
Output is correct |
67 |
Correct |
408 ms |
34824 KB |
Output is correct |
68 |
Correct |
420 ms |
34964 KB |
Output is correct |
69 |
Correct |
379 ms |
34656 KB |
Output is correct |
70 |
Correct |
5 ms |
852 KB |
Output is correct |
71 |
Correct |
10 ms |
1320 KB |
Output is correct |
72 |
Correct |
197 ms |
17528 KB |
Output is correct |
73 |
Correct |
330 ms |
26204 KB |
Output is correct |
74 |
Correct |
506 ms |
34832 KB |
Output is correct |
75 |
Correct |
622 ms |
39116 KB |
Output is correct |
76 |
Correct |
410 ms |
34836 KB |
Output is correct |
77 |
Correct |
6 ms |
980 KB |
Output is correct |
78 |
Correct |
12 ms |
1652 KB |
Output is correct |
79 |
Correct |
211 ms |
18660 KB |
Output is correct |
80 |
Correct |
366 ms |
27936 KB |
Output is correct |
81 |
Correct |
505 ms |
37144 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 |
1 ms |
260 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
158 ms |
16648 KB |
Output is correct |
10 |
Correct |
9 ms |
1896 KB |
Output is correct |
11 |
Correct |
52 ms |
9180 KB |
Output is correct |
12 |
Correct |
13 ms |
2772 KB |
Output is correct |
13 |
Correct |
36 ms |
6204 KB |
Output is correct |
14 |
Correct |
2 ms |
340 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
176 ms |
16728 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 |
437 ms |
33208 KB |
Output is correct |
21 |
Correct |
502 ms |
33204 KB |
Output is correct |
22 |
Correct |
439 ms |
33152 KB |
Output is correct |
23 |
Correct |
379 ms |
28312 KB |
Output is correct |
24 |
Correct |
253 ms |
11220 KB |
Output is correct |
25 |
Correct |
429 ms |
26864 KB |
Output is correct |
26 |
Correct |
384 ms |
26892 KB |
Output is correct |
27 |
Correct |
425 ms |
33208 KB |
Output is correct |
28 |
Correct |
430 ms |
33144 KB |
Output is correct |
29 |
Correct |
500 ms |
33168 KB |
Output is correct |
30 |
Correct |
497 ms |
33220 KB |
Output is correct |
31 |
Correct |
0 ms |
212 KB |
Output is correct |
32 |
Correct |
25 ms |
2580 KB |
Output is correct |
33 |
Correct |
120 ms |
5784 KB |
Output is correct |
34 |
Correct |
492 ms |
33220 KB |
Output is correct |
35 |
Correct |
14 ms |
1620 KB |
Output is correct |
36 |
Correct |
84 ms |
6860 KB |
Output is correct |
37 |
Correct |
188 ms |
13616 KB |
Output is correct |
38 |
Correct |
176 ms |
13464 KB |
Output is correct |
39 |
Correct |
240 ms |
18412 KB |
Output is correct |
40 |
Correct |
347 ms |
23424 KB |
Output is correct |
41 |
Correct |
422 ms |
28248 KB |
Output is correct |
42 |
Correct |
512 ms |
33184 KB |
Output is correct |
43 |
Correct |
0 ms |
212 KB |
Output is correct |
44 |
Correct |
0 ms |
212 KB |
Output is correct |
45 |
Correct |
0 ms |
212 KB |
Output is correct |
46 |
Correct |
0 ms |
212 KB |
Output is correct |
47 |
Correct |
0 ms |
212 KB |
Output is correct |
48 |
Correct |
0 ms |
212 KB |
Output is correct |
49 |
Correct |
0 ms |
212 KB |
Output is correct |
50 |
Correct |
0 ms |
212 KB |
Output is correct |
51 |
Correct |
0 ms |
212 KB |
Output is correct |
52 |
Correct |
0 ms |
212 KB |
Output is correct |
53 |
Correct |
0 ms |
212 KB |
Output is correct |
54 |
Correct |
2 ms |
468 KB |
Output is correct |
55 |
Correct |
3 ms |
596 KB |
Output is correct |
56 |
Correct |
199 ms |
16792 KB |
Output is correct |
57 |
Correct |
305 ms |
24104 KB |
Output is correct |
58 |
Correct |
300 ms |
24104 KB |
Output is correct |
59 |
Correct |
1 ms |
212 KB |
Output is correct |
60 |
Correct |
0 ms |
212 KB |
Output is correct |
61 |
Correct |
1 ms |
212 KB |
Output is correct |
62 |
Correct |
410 ms |
33216 KB |
Output is correct |
63 |
Correct |
370 ms |
33188 KB |
Output is correct |
64 |
Correct |
379 ms |
32952 KB |
Output is correct |
65 |
Correct |
5 ms |
724 KB |
Output is correct |
66 |
Correct |
9 ms |
1284 KB |
Output is correct |
67 |
Correct |
196 ms |
16672 KB |
Output is correct |
68 |
Correct |
319 ms |
24884 KB |
Output is correct |
69 |
Correct |
490 ms |
33212 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 |
1 ms |
260 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
158 ms |
16648 KB |
Output is correct |
10 |
Correct |
9 ms |
1896 KB |
Output is correct |
11 |
Correct |
52 ms |
9180 KB |
Output is correct |
12 |
Correct |
13 ms |
2772 KB |
Output is correct |
13 |
Correct |
36 ms |
6204 KB |
Output is correct |
14 |
Correct |
2 ms |
340 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
176 ms |
16728 KB |
Output is correct |
17 |
Correct |
454 ms |
33188 KB |
Output is correct |
18 |
Correct |
451 ms |
33144 KB |
Output is correct |
19 |
Correct |
466 ms |
33112 KB |
Output is correct |
20 |
Correct |
565 ms |
39724 KB |
Output is correct |
21 |
Correct |
462 ms |
31208 KB |
Output is correct |
22 |
Correct |
0 ms |
212 KB |
Output is correct |
23 |
Correct |
62 ms |
5696 KB |
Output is correct |
24 |
Correct |
31 ms |
3236 KB |
Output is correct |
25 |
Correct |
136 ms |
10588 KB |
Output is correct |
26 |
Correct |
280 ms |
17948 KB |
Output is correct |
27 |
Correct |
242 ms |
18912 KB |
Output is correct |
28 |
Correct |
307 ms |
23536 KB |
Output is correct |
29 |
Correct |
387 ms |
28176 KB |
Output is correct |
30 |
Correct |
468 ms |
32884 KB |
Output is correct |
31 |
Correct |
566 ms |
37464 KB |
Output is correct |
32 |
Correct |
527 ms |
37584 KB |
Output is correct |
33 |
Correct |
402 ms |
33108 KB |
Output is correct |
34 |
Correct |
9 ms |
980 KB |
Output is correct |
35 |
Correct |
11 ms |
1492 KB |
Output is correct |
36 |
Correct |
197 ms |
17872 KB |
Output is correct |
37 |
Correct |
358 ms |
26648 KB |
Output is correct |
38 |
Correct |
549 ms |
35508 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 |
1 ms |
260 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
158 ms |
16648 KB |
Output is correct |
10 |
Correct |
9 ms |
1896 KB |
Output is correct |
11 |
Correct |
52 ms |
9180 KB |
Output is correct |
12 |
Correct |
13 ms |
2772 KB |
Output is correct |
13 |
Correct |
36 ms |
6204 KB |
Output is correct |
14 |
Correct |
2 ms |
340 KB |
Output is correct |
15 |
Correct |
3 ms |
468 KB |
Output is correct |
16 |
Correct |
176 ms |
16728 KB |
Output is correct |
17 |
Correct |
1 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 |
256 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
212 KB |
Output is correct |
23 |
Correct |
494 ms |
33184 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
468 KB |
Output is correct |
26 |
Correct |
5 ms |
724 KB |
Output is correct |
27 |
Correct |
5 ms |
724 KB |
Output is correct |
28 |
Correct |
173 ms |
13464 KB |
Output is correct |
29 |
Correct |
265 ms |
20004 KB |
Output is correct |
30 |
Correct |
433 ms |
26580 KB |
Output is correct |
31 |
Correct |
539 ms |
33160 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
0 ms |
212 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
1 ms |
212 KB |
Output is correct |
36 |
Correct |
0 ms |
212 KB |
Output is correct |
37 |
Correct |
0 ms |
212 KB |
Output is correct |
38 |
Correct |
0 ms |
212 KB |
Output is correct |
39 |
Correct |
0 ms |
212 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
0 ms |
212 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
2 ms |
468 KB |
Output is correct |
44 |
Correct |
3 ms |
596 KB |
Output is correct |
45 |
Correct |
198 ms |
16700 KB |
Output is correct |
46 |
Correct |
308 ms |
24096 KB |
Output is correct |
47 |
Correct |
347 ms |
24100 KB |
Output is correct |
48 |
Correct |
0 ms |
212 KB |
Output is correct |
49 |
Correct |
0 ms |
212 KB |
Output is correct |
50 |
Correct |
0 ms |
212 KB |
Output is correct |
51 |
Correct |
0 ms |
212 KB |
Output is correct |
52 |
Correct |
1 ms |
212 KB |
Output is correct |
53 |
Correct |
0 ms |
212 KB |
Output is correct |
54 |
Correct |
0 ms |
212 KB |
Output is correct |
55 |
Correct |
596 ms |
33104 KB |
Output is correct |
56 |
Correct |
1 ms |
212 KB |
Output is correct |
57 |
Correct |
4 ms |
596 KB |
Output is correct |
58 |
Correct |
9 ms |
1312 KB |
Output is correct |
59 |
Correct |
13 ms |
1748 KB |
Output is correct |
60 |
Correct |
261 ms |
17452 KB |
Output is correct |
61 |
Correct |
311 ms |
23168 KB |
Output is correct |
62 |
Correct |
435 ms |
28876 KB |
Output is correct |
63 |
Correct |
745 ms |
34952 KB |
Output is correct |
64 |
Correct |
1 ms |
212 KB |
Output is correct |
65 |
Correct |
1 ms |
212 KB |
Output is correct |
66 |
Correct |
1 ms |
212 KB |
Output is correct |
67 |
Correct |
408 ms |
34824 KB |
Output is correct |
68 |
Correct |
420 ms |
34964 KB |
Output is correct |
69 |
Correct |
379 ms |
34656 KB |
Output is correct |
70 |
Correct |
5 ms |
852 KB |
Output is correct |
71 |
Correct |
10 ms |
1320 KB |
Output is correct |
72 |
Correct |
197 ms |
17528 KB |
Output is correct |
73 |
Correct |
330 ms |
26204 KB |
Output is correct |
74 |
Correct |
506 ms |
34832 KB |
Output is correct |
75 |
Correct |
622 ms |
39116 KB |
Output is correct |
76 |
Correct |
410 ms |
34836 KB |
Output is correct |
77 |
Correct |
6 ms |
980 KB |
Output is correct |
78 |
Correct |
12 ms |
1652 KB |
Output is correct |
79 |
Correct |
211 ms |
18660 KB |
Output is correct |
80 |
Correct |
366 ms |
27936 KB |
Output is correct |
81 |
Correct |
505 ms |
37144 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 |
437 ms |
33208 KB |
Output is correct |
86 |
Correct |
502 ms |
33204 KB |
Output is correct |
87 |
Correct |
439 ms |
33152 KB |
Output is correct |
88 |
Correct |
379 ms |
28312 KB |
Output is correct |
89 |
Correct |
253 ms |
11220 KB |
Output is correct |
90 |
Correct |
429 ms |
26864 KB |
Output is correct |
91 |
Correct |
384 ms |
26892 KB |
Output is correct |
92 |
Correct |
425 ms |
33208 KB |
Output is correct |
93 |
Correct |
430 ms |
33144 KB |
Output is correct |
94 |
Correct |
500 ms |
33168 KB |
Output is correct |
95 |
Correct |
497 ms |
33220 KB |
Output is correct |
96 |
Correct |
0 ms |
212 KB |
Output is correct |
97 |
Correct |
25 ms |
2580 KB |
Output is correct |
98 |
Correct |
120 ms |
5784 KB |
Output is correct |
99 |
Correct |
492 ms |
33220 KB |
Output is correct |
100 |
Correct |
14 ms |
1620 KB |
Output is correct |
101 |
Correct |
84 ms |
6860 KB |
Output is correct |
102 |
Correct |
188 ms |
13616 KB |
Output is correct |
103 |
Correct |
176 ms |
13464 KB |
Output is correct |
104 |
Correct |
240 ms |
18412 KB |
Output is correct |
105 |
Correct |
347 ms |
23424 KB |
Output is correct |
106 |
Correct |
422 ms |
28248 KB |
Output is correct |
107 |
Correct |
512 ms |
33184 KB |
Output is correct |
108 |
Correct |
0 ms |
212 KB |
Output is correct |
109 |
Correct |
0 ms |
212 KB |
Output is correct |
110 |
Correct |
0 ms |
212 KB |
Output is correct |
111 |
Correct |
0 ms |
212 KB |
Output is correct |
112 |
Correct |
0 ms |
212 KB |
Output is correct |
113 |
Correct |
0 ms |
212 KB |
Output is correct |
114 |
Correct |
0 ms |
212 KB |
Output is correct |
115 |
Correct |
0 ms |
212 KB |
Output is correct |
116 |
Correct |
0 ms |
212 KB |
Output is correct |
117 |
Correct |
0 ms |
212 KB |
Output is correct |
118 |
Correct |
0 ms |
212 KB |
Output is correct |
119 |
Correct |
2 ms |
468 KB |
Output is correct |
120 |
Correct |
3 ms |
596 KB |
Output is correct |
121 |
Correct |
199 ms |
16792 KB |
Output is correct |
122 |
Correct |
305 ms |
24104 KB |
Output is correct |
123 |
Correct |
300 ms |
24104 KB |
Output is correct |
124 |
Correct |
1 ms |
212 KB |
Output is correct |
125 |
Correct |
0 ms |
212 KB |
Output is correct |
126 |
Correct |
1 ms |
212 KB |
Output is correct |
127 |
Correct |
410 ms |
33216 KB |
Output is correct |
128 |
Correct |
370 ms |
33188 KB |
Output is correct |
129 |
Correct |
379 ms |
32952 KB |
Output is correct |
130 |
Correct |
5 ms |
724 KB |
Output is correct |
131 |
Correct |
9 ms |
1284 KB |
Output is correct |
132 |
Correct |
196 ms |
16672 KB |
Output is correct |
133 |
Correct |
319 ms |
24884 KB |
Output is correct |
134 |
Correct |
490 ms |
33212 KB |
Output is correct |
135 |
Correct |
454 ms |
33188 KB |
Output is correct |
136 |
Correct |
451 ms |
33144 KB |
Output is correct |
137 |
Correct |
466 ms |
33112 KB |
Output is correct |
138 |
Correct |
565 ms |
39724 KB |
Output is correct |
139 |
Correct |
462 ms |
31208 KB |
Output is correct |
140 |
Correct |
0 ms |
212 KB |
Output is correct |
141 |
Correct |
62 ms |
5696 KB |
Output is correct |
142 |
Correct |
31 ms |
3236 KB |
Output is correct |
143 |
Correct |
136 ms |
10588 KB |
Output is correct |
144 |
Correct |
280 ms |
17948 KB |
Output is correct |
145 |
Correct |
242 ms |
18912 KB |
Output is correct |
146 |
Correct |
307 ms |
23536 KB |
Output is correct |
147 |
Correct |
387 ms |
28176 KB |
Output is correct |
148 |
Correct |
468 ms |
32884 KB |
Output is correct |
149 |
Correct |
566 ms |
37464 KB |
Output is correct |
150 |
Correct |
527 ms |
37584 KB |
Output is correct |
151 |
Correct |
402 ms |
33108 KB |
Output is correct |
152 |
Correct |
9 ms |
980 KB |
Output is correct |
153 |
Correct |
11 ms |
1492 KB |
Output is correct |
154 |
Correct |
197 ms |
17872 KB |
Output is correct |
155 |
Correct |
358 ms |
26648 KB |
Output is correct |
156 |
Correct |
549 ms |
35508 KB |
Output is correct |
157 |
Correct |
1 ms |
212 KB |
Output is correct |
158 |
Correct |
1 ms |
212 KB |
Output is correct |
159 |
Correct |
0 ms |
212 KB |
Output is correct |
160 |
Correct |
1 ms |
212 KB |
Output is correct |
161 |
Correct |
603 ms |
35148 KB |
Output is correct |
162 |
Correct |
467 ms |
35728 KB |
Output is correct |
163 |
Correct |
490 ms |
35524 KB |
Output is correct |
164 |
Correct |
508 ms |
35712 KB |
Output is correct |
165 |
Correct |
578 ms |
35400 KB |
Output is correct |
166 |
Correct |
580 ms |
35320 KB |
Output is correct |
167 |
Correct |
98 ms |
8668 KB |
Output is correct |
168 |
Correct |
53 ms |
4732 KB |
Output is correct |
169 |
Correct |
159 ms |
11924 KB |
Output is correct |
170 |
Correct |
362 ms |
22176 KB |
Output is correct |
171 |
Correct |
565 ms |
29456 KB |
Output is correct |
172 |
Correct |
245 ms |
18008 KB |
Output is correct |
173 |
Correct |
304 ms |
21528 KB |
Output is correct |
174 |
Correct |
382 ms |
25096 KB |
Output is correct |
175 |
Correct |
454 ms |
28536 KB |
Output is correct |
176 |
Correct |
521 ms |
32236 KB |
Output is correct |
177 |
Correct |
604 ms |
35784 KB |
Output is correct |