/////////////////////////////
#include "parks.h"
#include<bits/stdc++.h>
using namespace std;
#define n nnn
typedef array<int,4> arin;
const int N=2e5+1;
int n;
int cx[N],cy[N];
vector<arin>edges;
vector<int>built[4];
int dx[4]={-2,0,2,0};
int dy[4]={0,-2,0,2};
int ex[4]={-1,1,1,-1};
int ey[4]={-1,-1,1,1};
int p[N];
int find(int x){
if(p[x]!=x) p[x]=find(p[x]);
return p[x];
}
bool join(int x,int y){
x=find(x);y=find(y);
if(x==y) return false;
p[x]=y;
return true;
}
map<pair<int,int>,int>mp,sq;
map<pair<int,int>,bool>used;
map<pair<int,int>,bool>ban;
vector<pair<int,pair<int,int> > >adj[N];
bool vis[N];
#define fi first
#define se second
void dfs(int id){
for(auto c:adj[id]){
if(!vis[c.fi]){
vis[c.fi]=true;
ban[c.se]=true;
dfs(c.fi);
}
}
}
vector<pair<pair<int,int>,int> >sqq;
int construct_roads(vector<int>x,vector<int>y){
n=x.size();
for(int i=1; i<=n ;i++){
cx[i]=x[i-1];
cy[i]=y[i-1];
mp[{cx[i],cy[i]}]=i;
p[i]=i;
}
int m=0;
for(int i=1; i<=n ;i++){
if(!mp[{cx[i],cy[i]}]) continue;
if(!mp[{cx[i]+2,cy[i]}]) continue;
if(!mp[{cx[i],cy[i]+2}]) continue;
if(!mp[{cx[i]+2,cy[i]+2}]) continue;
sq[{cx[i]+1,cy[i]+1}]=++m;
}
typedef pair<int,int> pii;
for(auto c:sq) sqq.push_back({c.fi,c.se});
for(auto c:sqq){
auto cur=c.fi;
int c1=mp[(pii){cur.fi-1,cur.se-1}];
int c2=mp[(pii){cur.fi+1,cur.se-1}];
int c3=mp[(pii){cur.fi-1,cur.se+1}];
int c4=mp[(pii){cur.fi+1,cur.se+1}];
if((cur.fi+cur.se)%4==0){//horizontal
int u=sq[{cur.fi-2,cur.se}];
int v=sq[{cur.fi+2,cur.se}];
adj[u].push_back({c.se,{c1,c3}});
adj[v].push_back({c.se,{c2,c4}});
}
else{
int u=sq[{cur.fi,cur.se-2}];
int v=sq[{cur.fi,cur.se+2}];
adj[u].push_back({c.se,{c1,c2}});
adj[v].push_back({c.se,{c3,c4}});
}
}
dfs(0);
for(int i=1; i<=n ;i++){
if((cx[i]+cy[i])%4!=0) continue;
for(int j=0; j<4 ;j++){
int s=mp[{cx[i]+dx[j],cy[i]+dy[j]}];
if(s==0) continue;
if(ban[{i,s}]==1 || ban[{s,i}]==1) continue;
if(join(i,s)){
edges.push_back(arin{i-1,s-1,cx[i]+ex[j],cy[i]+ey[j]});
}
}
}
if(edges.size()!=n-1) return 0;
for(auto c:edges){
for(int j=0; j<4 ;j++){
built[j].push_back(c[j]);
}
}
build(built[0],built[1],built[2],built[3]);
return 1;
}
////////////////////////////////////////////////////////////////////////
Compilation message
parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:94:20: warning: comparison of integer expressions of different signedness: 'std::vector<std::array<int, 4> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
94 | if(edges.size()!=n-1) return 0;
| ~~~~~~~~~~~~^~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
4940 KB |
Output is correct |
2 |
Correct |
4 ms |
5000 KB |
Output is correct |
3 |
Correct |
4 ms |
4896 KB |
Output is correct |
4 |
Correct |
4 ms |
4940 KB |
Output is correct |
5 |
Correct |
3 ms |
4940 KB |
Output is correct |
6 |
Correct |
5 ms |
4940 KB |
Output is correct |
7 |
Correct |
4 ms |
4940 KB |
Output is correct |
8 |
Correct |
4 ms |
4940 KB |
Output is correct |
9 |
Correct |
646 ms |
43820 KB |
Output is correct |
10 |
Correct |
29 ms |
8896 KB |
Output is correct |
11 |
Correct |
121 ms |
25796 KB |
Output is correct |
12 |
Correct |
33 ms |
10856 KB |
Output is correct |
13 |
Correct |
78 ms |
19356 KB |
Output is correct |
14 |
Correct |
5 ms |
5324 KB |
Output is correct |
15 |
Correct |
10 ms |
5580 KB |
Output is correct |
16 |
Correct |
650 ms |
43776 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
4940 KB |
Output is correct |
2 |
Correct |
4 ms |
5000 KB |
Output is correct |
3 |
Correct |
4 ms |
4896 KB |
Output is correct |
4 |
Correct |
4 ms |
4940 KB |
Output is correct |
5 |
Correct |
3 ms |
4940 KB |
Output is correct |
6 |
Correct |
5 ms |
4940 KB |
Output is correct |
7 |
Correct |
4 ms |
4940 KB |
Output is correct |
8 |
Correct |
4 ms |
4940 KB |
Output is correct |
9 |
Correct |
646 ms |
43820 KB |
Output is correct |
10 |
Correct |
29 ms |
8896 KB |
Output is correct |
11 |
Correct |
121 ms |
25796 KB |
Output is correct |
12 |
Correct |
33 ms |
10856 KB |
Output is correct |
13 |
Correct |
78 ms |
19356 KB |
Output is correct |
14 |
Correct |
5 ms |
5324 KB |
Output is correct |
15 |
Correct |
10 ms |
5580 KB |
Output is correct |
16 |
Correct |
650 ms |
43776 KB |
Output is correct |
17 |
Correct |
5 ms |
4940 KB |
Output is correct |
18 |
Correct |
3 ms |
4940 KB |
Output is correct |
19 |
Correct |
4 ms |
4940 KB |
Output is correct |
20 |
Correct |
3 ms |
4940 KB |
Output is correct |
21 |
Correct |
3 ms |
4940 KB |
Output is correct |
22 |
Correct |
4 ms |
4940 KB |
Output is correct |
23 |
Correct |
2160 ms |
99324 KB |
Output is correct |
24 |
Correct |
4 ms |
4940 KB |
Output is correct |
25 |
Correct |
10 ms |
5532 KB |
Output is correct |
26 |
Correct |
14 ms |
6180 KB |
Output is correct |
27 |
Correct |
16 ms |
6604 KB |
Output is correct |
28 |
Correct |
610 ms |
42880 KB |
Output is correct |
29 |
Correct |
1119 ms |
61304 KB |
Output is correct |
30 |
Correct |
1676 ms |
81024 KB |
Output is correct |
31 |
Correct |
2155 ms |
99424 KB |
Output is correct |
32 |
Correct |
4 ms |
4940 KB |
Output is correct |
33 |
Correct |
4 ms |
4940 KB |
Output is correct |
34 |
Correct |
4 ms |
4940 KB |
Output is correct |
35 |
Correct |
4 ms |
4940 KB |
Output is correct |
36 |
Correct |
4 ms |
4940 KB |
Output is correct |
37 |
Correct |
4 ms |
5012 KB |
Output is correct |
38 |
Correct |
4 ms |
4940 KB |
Output is correct |
39 |
Correct |
4 ms |
4940 KB |
Output is correct |
40 |
Correct |
4 ms |
4940 KB |
Output is correct |
41 |
Correct |
3 ms |
4940 KB |
Output is correct |
42 |
Correct |
4 ms |
4940 KB |
Output is correct |
43 |
Correct |
9 ms |
5580 KB |
Output is correct |
44 |
Correct |
10 ms |
5836 KB |
Output is correct |
45 |
Correct |
641 ms |
41500 KB |
Output is correct |
46 |
Correct |
1091 ms |
58760 KB |
Output is correct |
47 |
Correct |
1116 ms |
58752 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
4940 KB |
Output is correct |
2 |
Correct |
4 ms |
5000 KB |
Output is correct |
3 |
Correct |
4 ms |
4896 KB |
Output is correct |
4 |
Correct |
4 ms |
4940 KB |
Output is correct |
5 |
Correct |
3 ms |
4940 KB |
Output is correct |
6 |
Correct |
5 ms |
4940 KB |
Output is correct |
7 |
Correct |
4 ms |
4940 KB |
Output is correct |
8 |
Correct |
4 ms |
4940 KB |
Output is correct |
9 |
Correct |
646 ms |
43820 KB |
Output is correct |
10 |
Correct |
29 ms |
8896 KB |
Output is correct |
11 |
Correct |
121 ms |
25796 KB |
Output is correct |
12 |
Correct |
33 ms |
10856 KB |
Output is correct |
13 |
Correct |
78 ms |
19356 KB |
Output is correct |
14 |
Correct |
5 ms |
5324 KB |
Output is correct |
15 |
Correct |
10 ms |
5580 KB |
Output is correct |
16 |
Correct |
650 ms |
43776 KB |
Output is correct |
17 |
Correct |
5 ms |
4940 KB |
Output is correct |
18 |
Correct |
3 ms |
4940 KB |
Output is correct |
19 |
Correct |
4 ms |
4940 KB |
Output is correct |
20 |
Correct |
3 ms |
4940 KB |
Output is correct |
21 |
Correct |
3 ms |
4940 KB |
Output is correct |
22 |
Correct |
4 ms |
4940 KB |
Output is correct |
23 |
Correct |
2160 ms |
99324 KB |
Output is correct |
24 |
Correct |
4 ms |
4940 KB |
Output is correct |
25 |
Correct |
10 ms |
5532 KB |
Output is correct |
26 |
Correct |
14 ms |
6180 KB |
Output is correct |
27 |
Correct |
16 ms |
6604 KB |
Output is correct |
28 |
Correct |
610 ms |
42880 KB |
Output is correct |
29 |
Correct |
1119 ms |
61304 KB |
Output is correct |
30 |
Correct |
1676 ms |
81024 KB |
Output is correct |
31 |
Correct |
2155 ms |
99424 KB |
Output is correct |
32 |
Correct |
4 ms |
4940 KB |
Output is correct |
33 |
Correct |
4 ms |
4940 KB |
Output is correct |
34 |
Correct |
4 ms |
4940 KB |
Output is correct |
35 |
Correct |
4 ms |
4940 KB |
Output is correct |
36 |
Correct |
4 ms |
4940 KB |
Output is correct |
37 |
Correct |
4 ms |
5012 KB |
Output is correct |
38 |
Correct |
4 ms |
4940 KB |
Output is correct |
39 |
Correct |
4 ms |
4940 KB |
Output is correct |
40 |
Correct |
4 ms |
4940 KB |
Output is correct |
41 |
Correct |
3 ms |
4940 KB |
Output is correct |
42 |
Correct |
4 ms |
4940 KB |
Output is correct |
43 |
Correct |
9 ms |
5580 KB |
Output is correct |
44 |
Correct |
10 ms |
5836 KB |
Output is correct |
45 |
Correct |
641 ms |
41500 KB |
Output is correct |
46 |
Correct |
1091 ms |
58760 KB |
Output is correct |
47 |
Correct |
1116 ms |
58752 KB |
Output is correct |
48 |
Correct |
3 ms |
5004 KB |
Output is correct |
49 |
Correct |
3 ms |
4940 KB |
Output is correct |
50 |
Correct |
3 ms |
4940 KB |
Output is correct |
51 |
Correct |
3 ms |
4940 KB |
Output is correct |
52 |
Correct |
4 ms |
4980 KB |
Output is correct |
53 |
Correct |
4 ms |
4940 KB |
Output is correct |
54 |
Correct |
4 ms |
4940 KB |
Output is correct |
55 |
Correct |
2437 ms |
112304 KB |
Output is correct |
56 |
Correct |
4 ms |
4940 KB |
Output is correct |
57 |
Correct |
10 ms |
5964 KB |
Output is correct |
58 |
Correct |
27 ms |
8252 KB |
Output is correct |
59 |
Correct |
39 ms |
9132 KB |
Output is correct |
60 |
Correct |
1081 ms |
58552 KB |
Output is correct |
61 |
Correct |
1549 ms |
78284 KB |
Output is correct |
62 |
Correct |
2213 ms |
94196 KB |
Output is correct |
63 |
Correct |
2476 ms |
112428 KB |
Output is correct |
64 |
Correct |
4 ms |
4940 KB |
Output is correct |
65 |
Correct |
4 ms |
4940 KB |
Output is correct |
66 |
Correct |
4 ms |
4940 KB |
Output is correct |
67 |
Correct |
1772 ms |
79612 KB |
Output is correct |
68 |
Correct |
1714 ms |
79688 KB |
Output is correct |
69 |
Correct |
1734 ms |
79352 KB |
Output is correct |
70 |
Correct |
12 ms |
6092 KB |
Output is correct |
71 |
Correct |
28 ms |
7332 KB |
Output is correct |
72 |
Correct |
649 ms |
40248 KB |
Output is correct |
73 |
Correct |
1187 ms |
58972 KB |
Output is correct |
74 |
Correct |
1932 ms |
75880 KB |
Output is correct |
75 |
Correct |
1814 ms |
79008 KB |
Output is correct |
76 |
Correct |
1783 ms |
79600 KB |
Output is correct |
77 |
Correct |
14 ms |
6476 KB |
Output is correct |
78 |
Correct |
23 ms |
7628 KB |
Output is correct |
79 |
Correct |
741 ms |
41080 KB |
Output is correct |
80 |
Correct |
1331 ms |
60088 KB |
Output is correct |
81 |
Correct |
1876 ms |
77516 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
4940 KB |
Output is correct |
2 |
Correct |
4 ms |
5000 KB |
Output is correct |
3 |
Correct |
4 ms |
4896 KB |
Output is correct |
4 |
Correct |
4 ms |
4940 KB |
Output is correct |
5 |
Correct |
3 ms |
4940 KB |
Output is correct |
6 |
Correct |
5 ms |
4940 KB |
Output is correct |
7 |
Correct |
4 ms |
4940 KB |
Output is correct |
8 |
Correct |
4 ms |
4940 KB |
Output is correct |
9 |
Correct |
646 ms |
43820 KB |
Output is correct |
10 |
Correct |
29 ms |
8896 KB |
Output is correct |
11 |
Correct |
121 ms |
25796 KB |
Output is correct |
12 |
Correct |
33 ms |
10856 KB |
Output is correct |
13 |
Correct |
78 ms |
19356 KB |
Output is correct |
14 |
Correct |
5 ms |
5324 KB |
Output is correct |
15 |
Correct |
10 ms |
5580 KB |
Output is correct |
16 |
Correct |
650 ms |
43776 KB |
Output is correct |
17 |
Correct |
4 ms |
4940 KB |
Output is correct |
18 |
Correct |
4 ms |
4940 KB |
Output is correct |
19 |
Correct |
4 ms |
4940 KB |
Output is correct |
20 |
Correct |
1519 ms |
71212 KB |
Output is correct |
21 |
Correct |
1615 ms |
77228 KB |
Output is correct |
22 |
Correct |
1619 ms |
74168 KB |
Output is correct |
23 |
Correct |
1454 ms |
71916 KB |
Output is correct |
24 |
Correct |
1380 ms |
48048 KB |
Output is correct |
25 |
Correct |
1466 ms |
63796 KB |
Output is correct |
26 |
Correct |
1415 ms |
63668 KB |
Output is correct |
27 |
Correct |
1628 ms |
76508 KB |
Output is correct |
28 |
Correct |
1646 ms |
76500 KB |
Output is correct |
29 |
Correct |
1617 ms |
76468 KB |
Output is correct |
30 |
Correct |
1763 ms |
76428 KB |
Output is correct |
31 |
Correct |
4 ms |
4940 KB |
Output is correct |
32 |
Correct |
45 ms |
10000 KB |
Output is correct |
33 |
Correct |
343 ms |
26404 KB |
Output is correct |
34 |
Correct |
1383 ms |
77444 KB |
Output is correct |
35 |
Correct |
27 ms |
7752 KB |
Output is correct |
36 |
Correct |
188 ms |
18472 KB |
Output is correct |
37 |
Correct |
582 ms |
32068 KB |
Output is correct |
38 |
Correct |
442 ms |
32380 KB |
Output is correct |
39 |
Correct |
771 ms |
42004 KB |
Output is correct |
40 |
Correct |
1012 ms |
53284 KB |
Output is correct |
41 |
Correct |
1216 ms |
62972 KB |
Output is correct |
42 |
Correct |
1558 ms |
72824 KB |
Output is correct |
43 |
Correct |
4 ms |
4940 KB |
Output is correct |
44 |
Correct |
4 ms |
4940 KB |
Output is correct |
45 |
Correct |
3 ms |
4940 KB |
Output is correct |
46 |
Correct |
4 ms |
4940 KB |
Output is correct |
47 |
Correct |
4 ms |
4940 KB |
Output is correct |
48 |
Correct |
4 ms |
4940 KB |
Output is correct |
49 |
Correct |
4 ms |
4940 KB |
Output is correct |
50 |
Correct |
4 ms |
4940 KB |
Output is correct |
51 |
Correct |
5 ms |
4940 KB |
Output is correct |
52 |
Correct |
5 ms |
4940 KB |
Output is correct |
53 |
Correct |
4 ms |
4940 KB |
Output is correct |
54 |
Correct |
7 ms |
5580 KB |
Output is correct |
55 |
Correct |
10 ms |
5844 KB |
Output is correct |
56 |
Correct |
658 ms |
41412 KB |
Output is correct |
57 |
Correct |
1084 ms |
58660 KB |
Output is correct |
58 |
Correct |
1056 ms |
58640 KB |
Output is correct |
59 |
Correct |
4 ms |
4992 KB |
Output is correct |
60 |
Correct |
3 ms |
4940 KB |
Output is correct |
61 |
Correct |
5 ms |
4940 KB |
Output is correct |
62 |
Correct |
1652 ms |
79636 KB |
Output is correct |
63 |
Correct |
1659 ms |
79724 KB |
Output is correct |
64 |
Correct |
1588 ms |
79308 KB |
Output is correct |
65 |
Correct |
12 ms |
6092 KB |
Output is correct |
66 |
Correct |
20 ms |
7320 KB |
Output is correct |
67 |
Correct |
669 ms |
40272 KB |
Output is correct |
68 |
Correct |
1099 ms |
58876 KB |
Output is correct |
69 |
Correct |
1646 ms |
75932 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
4940 KB |
Output is correct |
2 |
Correct |
4 ms |
5000 KB |
Output is correct |
3 |
Correct |
4 ms |
4896 KB |
Output is correct |
4 |
Correct |
4 ms |
4940 KB |
Output is correct |
5 |
Correct |
3 ms |
4940 KB |
Output is correct |
6 |
Correct |
5 ms |
4940 KB |
Output is correct |
7 |
Correct |
4 ms |
4940 KB |
Output is correct |
8 |
Correct |
4 ms |
4940 KB |
Output is correct |
9 |
Correct |
646 ms |
43820 KB |
Output is correct |
10 |
Correct |
29 ms |
8896 KB |
Output is correct |
11 |
Correct |
121 ms |
25796 KB |
Output is correct |
12 |
Correct |
33 ms |
10856 KB |
Output is correct |
13 |
Correct |
78 ms |
19356 KB |
Output is correct |
14 |
Correct |
5 ms |
5324 KB |
Output is correct |
15 |
Correct |
10 ms |
5580 KB |
Output is correct |
16 |
Correct |
650 ms |
43776 KB |
Output is correct |
17 |
Correct |
1514 ms |
83140 KB |
Output is correct |
18 |
Correct |
1717 ms |
83364 KB |
Output is correct |
19 |
Correct |
1513 ms |
75624 KB |
Output is correct |
20 |
Correct |
1618 ms |
75036 KB |
Output is correct |
21 |
Correct |
1677 ms |
71072 KB |
Output is correct |
22 |
Correct |
4 ms |
4940 KB |
Output is correct |
23 |
Correct |
119 ms |
16240 KB |
Output is correct |
24 |
Correct |
60 ms |
10620 KB |
Output is correct |
25 |
Correct |
346 ms |
24904 KB |
Output is correct |
26 |
Correct |
766 ms |
39244 KB |
Output is correct |
27 |
Correct |
675 ms |
40272 KB |
Output is correct |
28 |
Correct |
897 ms |
48848 KB |
Output is correct |
29 |
Correct |
1202 ms |
58984 KB |
Output is correct |
30 |
Correct |
1413 ms |
67180 KB |
Output is correct |
31 |
Correct |
1708 ms |
75756 KB |
Output is correct |
32 |
Correct |
1683 ms |
78908 KB |
Output is correct |
33 |
Correct |
1594 ms |
79608 KB |
Output is correct |
34 |
Correct |
14 ms |
6476 KB |
Output is correct |
35 |
Correct |
24 ms |
7664 KB |
Output is correct |
36 |
Correct |
698 ms |
41096 KB |
Output is correct |
37 |
Correct |
1123 ms |
60156 KB |
Output is correct |
38 |
Correct |
1661 ms |
77492 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
4940 KB |
Output is correct |
2 |
Correct |
4 ms |
5000 KB |
Output is correct |
3 |
Correct |
4 ms |
4896 KB |
Output is correct |
4 |
Correct |
4 ms |
4940 KB |
Output is correct |
5 |
Correct |
3 ms |
4940 KB |
Output is correct |
6 |
Correct |
5 ms |
4940 KB |
Output is correct |
7 |
Correct |
4 ms |
4940 KB |
Output is correct |
8 |
Correct |
4 ms |
4940 KB |
Output is correct |
9 |
Correct |
646 ms |
43820 KB |
Output is correct |
10 |
Correct |
29 ms |
8896 KB |
Output is correct |
11 |
Correct |
121 ms |
25796 KB |
Output is correct |
12 |
Correct |
33 ms |
10856 KB |
Output is correct |
13 |
Correct |
78 ms |
19356 KB |
Output is correct |
14 |
Correct |
5 ms |
5324 KB |
Output is correct |
15 |
Correct |
10 ms |
5580 KB |
Output is correct |
16 |
Correct |
650 ms |
43776 KB |
Output is correct |
17 |
Correct |
5 ms |
4940 KB |
Output is correct |
18 |
Correct |
3 ms |
4940 KB |
Output is correct |
19 |
Correct |
4 ms |
4940 KB |
Output is correct |
20 |
Correct |
3 ms |
4940 KB |
Output is correct |
21 |
Correct |
3 ms |
4940 KB |
Output is correct |
22 |
Correct |
4 ms |
4940 KB |
Output is correct |
23 |
Correct |
2160 ms |
99324 KB |
Output is correct |
24 |
Correct |
4 ms |
4940 KB |
Output is correct |
25 |
Correct |
10 ms |
5532 KB |
Output is correct |
26 |
Correct |
14 ms |
6180 KB |
Output is correct |
27 |
Correct |
16 ms |
6604 KB |
Output is correct |
28 |
Correct |
610 ms |
42880 KB |
Output is correct |
29 |
Correct |
1119 ms |
61304 KB |
Output is correct |
30 |
Correct |
1676 ms |
81024 KB |
Output is correct |
31 |
Correct |
2155 ms |
99424 KB |
Output is correct |
32 |
Correct |
4 ms |
4940 KB |
Output is correct |
33 |
Correct |
4 ms |
4940 KB |
Output is correct |
34 |
Correct |
4 ms |
4940 KB |
Output is correct |
35 |
Correct |
4 ms |
4940 KB |
Output is correct |
36 |
Correct |
4 ms |
4940 KB |
Output is correct |
37 |
Correct |
4 ms |
5012 KB |
Output is correct |
38 |
Correct |
4 ms |
4940 KB |
Output is correct |
39 |
Correct |
4 ms |
4940 KB |
Output is correct |
40 |
Correct |
4 ms |
4940 KB |
Output is correct |
41 |
Correct |
3 ms |
4940 KB |
Output is correct |
42 |
Correct |
4 ms |
4940 KB |
Output is correct |
43 |
Correct |
9 ms |
5580 KB |
Output is correct |
44 |
Correct |
10 ms |
5836 KB |
Output is correct |
45 |
Correct |
641 ms |
41500 KB |
Output is correct |
46 |
Correct |
1091 ms |
58760 KB |
Output is correct |
47 |
Correct |
1116 ms |
58752 KB |
Output is correct |
48 |
Correct |
3 ms |
5004 KB |
Output is correct |
49 |
Correct |
3 ms |
4940 KB |
Output is correct |
50 |
Correct |
3 ms |
4940 KB |
Output is correct |
51 |
Correct |
3 ms |
4940 KB |
Output is correct |
52 |
Correct |
4 ms |
4980 KB |
Output is correct |
53 |
Correct |
4 ms |
4940 KB |
Output is correct |
54 |
Correct |
4 ms |
4940 KB |
Output is correct |
55 |
Correct |
2437 ms |
112304 KB |
Output is correct |
56 |
Correct |
4 ms |
4940 KB |
Output is correct |
57 |
Correct |
10 ms |
5964 KB |
Output is correct |
58 |
Correct |
27 ms |
8252 KB |
Output is correct |
59 |
Correct |
39 ms |
9132 KB |
Output is correct |
60 |
Correct |
1081 ms |
58552 KB |
Output is correct |
61 |
Correct |
1549 ms |
78284 KB |
Output is correct |
62 |
Correct |
2213 ms |
94196 KB |
Output is correct |
63 |
Correct |
2476 ms |
112428 KB |
Output is correct |
64 |
Correct |
4 ms |
4940 KB |
Output is correct |
65 |
Correct |
4 ms |
4940 KB |
Output is correct |
66 |
Correct |
4 ms |
4940 KB |
Output is correct |
67 |
Correct |
1772 ms |
79612 KB |
Output is correct |
68 |
Correct |
1714 ms |
79688 KB |
Output is correct |
69 |
Correct |
1734 ms |
79352 KB |
Output is correct |
70 |
Correct |
12 ms |
6092 KB |
Output is correct |
71 |
Correct |
28 ms |
7332 KB |
Output is correct |
72 |
Correct |
649 ms |
40248 KB |
Output is correct |
73 |
Correct |
1187 ms |
58972 KB |
Output is correct |
74 |
Correct |
1932 ms |
75880 KB |
Output is correct |
75 |
Correct |
1814 ms |
79008 KB |
Output is correct |
76 |
Correct |
1783 ms |
79600 KB |
Output is correct |
77 |
Correct |
14 ms |
6476 KB |
Output is correct |
78 |
Correct |
23 ms |
7628 KB |
Output is correct |
79 |
Correct |
741 ms |
41080 KB |
Output is correct |
80 |
Correct |
1331 ms |
60088 KB |
Output is correct |
81 |
Correct |
1876 ms |
77516 KB |
Output is correct |
82 |
Correct |
4 ms |
4940 KB |
Output is correct |
83 |
Correct |
4 ms |
4940 KB |
Output is correct |
84 |
Correct |
4 ms |
4940 KB |
Output is correct |
85 |
Correct |
1519 ms |
71212 KB |
Output is correct |
86 |
Correct |
1615 ms |
77228 KB |
Output is correct |
87 |
Correct |
1619 ms |
74168 KB |
Output is correct |
88 |
Correct |
1454 ms |
71916 KB |
Output is correct |
89 |
Correct |
1380 ms |
48048 KB |
Output is correct |
90 |
Correct |
1466 ms |
63796 KB |
Output is correct |
91 |
Correct |
1415 ms |
63668 KB |
Output is correct |
92 |
Correct |
1628 ms |
76508 KB |
Output is correct |
93 |
Correct |
1646 ms |
76500 KB |
Output is correct |
94 |
Correct |
1617 ms |
76468 KB |
Output is correct |
95 |
Correct |
1763 ms |
76428 KB |
Output is correct |
96 |
Correct |
4 ms |
4940 KB |
Output is correct |
97 |
Correct |
45 ms |
10000 KB |
Output is correct |
98 |
Correct |
343 ms |
26404 KB |
Output is correct |
99 |
Correct |
1383 ms |
77444 KB |
Output is correct |
100 |
Correct |
27 ms |
7752 KB |
Output is correct |
101 |
Correct |
188 ms |
18472 KB |
Output is correct |
102 |
Correct |
582 ms |
32068 KB |
Output is correct |
103 |
Correct |
442 ms |
32380 KB |
Output is correct |
104 |
Correct |
771 ms |
42004 KB |
Output is correct |
105 |
Correct |
1012 ms |
53284 KB |
Output is correct |
106 |
Correct |
1216 ms |
62972 KB |
Output is correct |
107 |
Correct |
1558 ms |
72824 KB |
Output is correct |
108 |
Correct |
4 ms |
4940 KB |
Output is correct |
109 |
Correct |
4 ms |
4940 KB |
Output is correct |
110 |
Correct |
3 ms |
4940 KB |
Output is correct |
111 |
Correct |
4 ms |
4940 KB |
Output is correct |
112 |
Correct |
4 ms |
4940 KB |
Output is correct |
113 |
Correct |
4 ms |
4940 KB |
Output is correct |
114 |
Correct |
4 ms |
4940 KB |
Output is correct |
115 |
Correct |
4 ms |
4940 KB |
Output is correct |
116 |
Correct |
5 ms |
4940 KB |
Output is correct |
117 |
Correct |
5 ms |
4940 KB |
Output is correct |
118 |
Correct |
4 ms |
4940 KB |
Output is correct |
119 |
Correct |
7 ms |
5580 KB |
Output is correct |
120 |
Correct |
10 ms |
5844 KB |
Output is correct |
121 |
Correct |
658 ms |
41412 KB |
Output is correct |
122 |
Correct |
1084 ms |
58660 KB |
Output is correct |
123 |
Correct |
1056 ms |
58640 KB |
Output is correct |
124 |
Correct |
4 ms |
4992 KB |
Output is correct |
125 |
Correct |
3 ms |
4940 KB |
Output is correct |
126 |
Correct |
5 ms |
4940 KB |
Output is correct |
127 |
Correct |
1652 ms |
79636 KB |
Output is correct |
128 |
Correct |
1659 ms |
79724 KB |
Output is correct |
129 |
Correct |
1588 ms |
79308 KB |
Output is correct |
130 |
Correct |
12 ms |
6092 KB |
Output is correct |
131 |
Correct |
20 ms |
7320 KB |
Output is correct |
132 |
Correct |
669 ms |
40272 KB |
Output is correct |
133 |
Correct |
1099 ms |
58876 KB |
Output is correct |
134 |
Correct |
1646 ms |
75932 KB |
Output is correct |
135 |
Correct |
1514 ms |
83140 KB |
Output is correct |
136 |
Correct |
1717 ms |
83364 KB |
Output is correct |
137 |
Correct |
1513 ms |
75624 KB |
Output is correct |
138 |
Correct |
1618 ms |
75036 KB |
Output is correct |
139 |
Correct |
1677 ms |
71072 KB |
Output is correct |
140 |
Correct |
4 ms |
4940 KB |
Output is correct |
141 |
Correct |
119 ms |
16240 KB |
Output is correct |
142 |
Correct |
60 ms |
10620 KB |
Output is correct |
143 |
Correct |
346 ms |
24904 KB |
Output is correct |
144 |
Correct |
766 ms |
39244 KB |
Output is correct |
145 |
Correct |
675 ms |
40272 KB |
Output is correct |
146 |
Correct |
897 ms |
48848 KB |
Output is correct |
147 |
Correct |
1202 ms |
58984 KB |
Output is correct |
148 |
Correct |
1413 ms |
67180 KB |
Output is correct |
149 |
Correct |
1708 ms |
75756 KB |
Output is correct |
150 |
Correct |
1683 ms |
78908 KB |
Output is correct |
151 |
Correct |
1594 ms |
79608 KB |
Output is correct |
152 |
Correct |
14 ms |
6476 KB |
Output is correct |
153 |
Correct |
24 ms |
7664 KB |
Output is correct |
154 |
Correct |
698 ms |
41096 KB |
Output is correct |
155 |
Correct |
1123 ms |
60156 KB |
Output is correct |
156 |
Correct |
1661 ms |
77492 KB |
Output is correct |
157 |
Correct |
4 ms |
4976 KB |
Output is correct |
158 |
Correct |
3 ms |
4940 KB |
Output is correct |
159 |
Correct |
4 ms |
4940 KB |
Output is correct |
160 |
Correct |
4 ms |
4940 KB |
Output is correct |
161 |
Correct |
2982 ms |
123008 KB |
Output is correct |
162 |
Correct |
1360 ms |
77420 KB |
Output is correct |
163 |
Correct |
1634 ms |
92500 KB |
Output is correct |
164 |
Correct |
2040 ms |
96476 KB |
Output is correct |
165 |
Correct |
2349 ms |
111452 KB |
Output is correct |
166 |
Correct |
2519 ms |
115432 KB |
Output is correct |
167 |
Correct |
319 ms |
27716 KB |
Output is correct |
168 |
Correct |
164 ms |
18772 KB |
Output is correct |
169 |
Correct |
665 ms |
39792 KB |
Output is correct |
170 |
Correct |
1746 ms |
69660 KB |
Output is correct |
171 |
Correct |
2430 ms |
90092 KB |
Output is correct |
172 |
Correct |
1012 ms |
61132 KB |
Output is correct |
173 |
Correct |
1295 ms |
72272 KB |
Output is correct |
174 |
Correct |
1620 ms |
84712 KB |
Output is correct |
175 |
Correct |
1961 ms |
95488 KB |
Output is correct |
176 |
Correct |
2230 ms |
107316 KB |
Output is correct |
177 |
Correct |
2548 ms |
118332 KB |
Output is correct |