#include "parks.h"
#include<bits/stdc++.h>
using namespace std;
#define ll long long
//#define int ll
#define rep(n) rep1(i,n)
#define rep1(i,n) rep2(i,0,n)
#define rep2(i,a,b) for(int i=a; i<(b); ++i)
#define rep3(i,a,b) for(int i=a; i>=(b); --i)
#define chkmax(a,b) (a=max(a,b))
#define chkmin(a,b) (a=min(a,b))
#define sz(a) ((int)a.size())
#define all(a) a.begin(),a.end()
#define pb push_back
#define pii pair<int,int>
#define pow2(x) (1ll<<(x))
#ifdef zisk
#define bug(...) cerr << "#" << __LINE__ << ": " << #__VA_ARGS__ << "- ", _do(__VA_ARGS__)
template<typename T> void _do(T x){cerr << x << endl;}
template<typename T, typename ...S> void _do(T x, S... y){cerr << x << ", "; _do(y...);}
#else
#define bug(...) 49
#endif
const int maxn=200005;
int n;
vector<pii> p;
map<pii,int> mp;
map<pii,vector<pii>> adj;
set<array<int,4>> edges;
int par[maxn];
int Find(int x){return x==par[x]?x:par[x]=Find(par[x]);}
#define y1 _y_1
pii get(int x1, int y1, int x2, int y2){
if(x1==x2){
if((x1+y1)%4==0) return pii(x1+1,y1+1);
else return pii(x1-1,y1+1);
}
else{
if((x1+y1)%4==0) return pii(x1+1,y1-1);
else return pii(x1+1,y1+1);
}
}
int construct_roads(vector<int> x, vector<int> y) {
n=sz(x);
rep(n) par[i]=i;
rep(n) mp[{x[i],y[i]}]=i;
vector<int> u, v, a, b;
rep(n){
if(mp.count({x[i],y[i]+2})){
int k=mp[{x[i],y[i]+2}];
if(Find(i)!=Find(k)){
bug(i,k);
par[Find(k)]=Find(i);
edges.insert({x[i],y[i],x[i],y[i]+2});
adj[{x[i],y[i]}].pb({x[i],y[i]+2});
adj[{x[i],y[i]+2}].pb({x[i],y[i]});
}
}
}
rep(n) p.pb({x[i],y[i]});
sort(all(p));
for(auto [x0,y0]: p){
if(mp.count({x0+2,y0})){
int k=mp[{x0+2,y0}];
if(Find(mp[{x0,y0}])!=Find(k)){
bug(mp[{x0,y0}],k);
par[Find(k)]=Find(mp[{x0,y0}]);
edges.insert({x0,y0,x0+2,y0});
adj[{x0,y0}].pb({x0+2,y0});
adj[{x0+2,y0}].pb({x0,y0});
}
}
}
bool flag=1;
rep(n) if(Find(i)!=Find(0)) flag=0;
if(!flag) return 0;
rep(n) if((x[i]+y[i])%4==0){
if(edges.count({x[i],y[i],x[i],y[i]+2})&&edges.count({x[i]+2,y[i],x[i]+2,y[i]+2})){
edges.erase({x[i]+2,y[i],x[i]+2,y[i]+2});
assert(!edges.count({x[i],y[i]+2,x[i]+2,y[i]+2}));
edges.insert({x[i],y[i]+2,x[i]+2,y[i]+2});
}
}
set<pii> st;
for(auto arr: edges){
u.pb(mp[{arr[0],arr[1]}]),v.pb(mp[{arr[2],arr[3]}]);
pii tmp=get(arr[0],arr[1],arr[2],arr[3]);
assert(!st.count(tmp));
st.insert(tmp);
a.pb(tmp.first),b.pb(tmp.second);
}
build(u, v, a, b);
return 1;
}
Compilation message
parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:23:18: warning: statement has no effect [-Wunused-value]
23 | #define bug(...) 49
| ^~
parks.cpp:57:17: note: in expansion of macro 'bug'
57 | bug(i,k);
| ^~~
parks.cpp:23:18: warning: statement has no effect [-Wunused-value]
23 | #define bug(...) 49
| ^~
parks.cpp:71:17: note: in expansion of macro 'bug'
71 | bug(mp[{x0,y0}],k);
| ^~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
501 ms |
37232 KB |
Output is correct |
10 |
Correct |
24 ms |
4044 KB |
Output is correct |
11 |
Correct |
147 ms |
20120 KB |
Output is correct |
12 |
Correct |
35 ms |
5868 KB |
Output is correct |
13 |
Correct |
68 ms |
12084 KB |
Output is correct |
14 |
Correct |
2 ms |
460 KB |
Output is correct |
15 |
Correct |
4 ms |
716 KB |
Output is correct |
16 |
Correct |
520 ms |
37196 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
501 ms |
37232 KB |
Output is correct |
10 |
Correct |
24 ms |
4044 KB |
Output is correct |
11 |
Correct |
147 ms |
20120 KB |
Output is correct |
12 |
Correct |
35 ms |
5868 KB |
Output is correct |
13 |
Correct |
68 ms |
12084 KB |
Output is correct |
14 |
Correct |
2 ms |
460 KB |
Output is correct |
15 |
Correct |
4 ms |
716 KB |
Output is correct |
16 |
Correct |
520 ms |
37196 KB |
Output is correct |
17 |
Correct |
0 ms |
204 KB |
Output is correct |
18 |
Correct |
0 ms |
312 KB |
Output is correct |
19 |
Correct |
0 ms |
204 KB |
Output is correct |
20 |
Correct |
0 ms |
204 KB |
Output is correct |
21 |
Correct |
0 ms |
204 KB |
Output is correct |
22 |
Correct |
1 ms |
308 KB |
Output is correct |
23 |
Correct |
1346 ms |
76128 KB |
Output is correct |
24 |
Correct |
0 ms |
204 KB |
Output is correct |
25 |
Correct |
4 ms |
716 KB |
Output is correct |
26 |
Correct |
6 ms |
1100 KB |
Output is correct |
27 |
Correct |
8 ms |
1356 KB |
Output is correct |
28 |
Correct |
419 ms |
30556 KB |
Output is correct |
29 |
Correct |
718 ms |
45652 KB |
Output is correct |
30 |
Correct |
1002 ms |
61136 KB |
Output is correct |
31 |
Correct |
1361 ms |
76064 KB |
Output is correct |
32 |
Correct |
0 ms |
204 KB |
Output is correct |
33 |
Correct |
0 ms |
204 KB |
Output is correct |
34 |
Correct |
0 ms |
312 KB |
Output is correct |
35 |
Correct |
1 ms |
204 KB |
Output is correct |
36 |
Correct |
0 ms |
304 KB |
Output is correct |
37 |
Correct |
0 ms |
204 KB |
Output is correct |
38 |
Correct |
1 ms |
204 KB |
Output is correct |
39 |
Correct |
0 ms |
204 KB |
Output is correct |
40 |
Correct |
0 ms |
204 KB |
Output is correct |
41 |
Correct |
0 ms |
204 KB |
Output is correct |
42 |
Correct |
1 ms |
204 KB |
Output is correct |
43 |
Correct |
5 ms |
820 KB |
Output is correct |
44 |
Correct |
7 ms |
1100 KB |
Output is correct |
45 |
Correct |
446 ms |
38572 KB |
Output is correct |
46 |
Correct |
776 ms |
56472 KB |
Output is correct |
47 |
Correct |
784 ms |
56344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
501 ms |
37232 KB |
Output is correct |
10 |
Correct |
24 ms |
4044 KB |
Output is correct |
11 |
Correct |
147 ms |
20120 KB |
Output is correct |
12 |
Correct |
35 ms |
5868 KB |
Output is correct |
13 |
Correct |
68 ms |
12084 KB |
Output is correct |
14 |
Correct |
2 ms |
460 KB |
Output is correct |
15 |
Correct |
4 ms |
716 KB |
Output is correct |
16 |
Correct |
520 ms |
37196 KB |
Output is correct |
17 |
Correct |
0 ms |
204 KB |
Output is correct |
18 |
Correct |
0 ms |
312 KB |
Output is correct |
19 |
Correct |
0 ms |
204 KB |
Output is correct |
20 |
Correct |
0 ms |
204 KB |
Output is correct |
21 |
Correct |
0 ms |
204 KB |
Output is correct |
22 |
Correct |
1 ms |
308 KB |
Output is correct |
23 |
Correct |
1346 ms |
76128 KB |
Output is correct |
24 |
Correct |
0 ms |
204 KB |
Output is correct |
25 |
Correct |
4 ms |
716 KB |
Output is correct |
26 |
Correct |
6 ms |
1100 KB |
Output is correct |
27 |
Correct |
8 ms |
1356 KB |
Output is correct |
28 |
Correct |
419 ms |
30556 KB |
Output is correct |
29 |
Correct |
718 ms |
45652 KB |
Output is correct |
30 |
Correct |
1002 ms |
61136 KB |
Output is correct |
31 |
Correct |
1361 ms |
76064 KB |
Output is correct |
32 |
Correct |
0 ms |
204 KB |
Output is correct |
33 |
Correct |
0 ms |
204 KB |
Output is correct |
34 |
Correct |
0 ms |
312 KB |
Output is correct |
35 |
Correct |
1 ms |
204 KB |
Output is correct |
36 |
Correct |
0 ms |
304 KB |
Output is correct |
37 |
Correct |
0 ms |
204 KB |
Output is correct |
38 |
Correct |
1 ms |
204 KB |
Output is correct |
39 |
Correct |
0 ms |
204 KB |
Output is correct |
40 |
Correct |
0 ms |
204 KB |
Output is correct |
41 |
Correct |
0 ms |
204 KB |
Output is correct |
42 |
Correct |
1 ms |
204 KB |
Output is correct |
43 |
Correct |
5 ms |
820 KB |
Output is correct |
44 |
Correct |
7 ms |
1100 KB |
Output is correct |
45 |
Correct |
446 ms |
38572 KB |
Output is correct |
46 |
Correct |
776 ms |
56472 KB |
Output is correct |
47 |
Correct |
784 ms |
56344 KB |
Output is correct |
48 |
Correct |
1 ms |
204 KB |
Output is correct |
49 |
Correct |
0 ms |
204 KB |
Output is correct |
50 |
Correct |
0 ms |
204 KB |
Output is correct |
51 |
Correct |
0 ms |
308 KB |
Output is correct |
52 |
Correct |
0 ms |
204 KB |
Output is correct |
53 |
Correct |
1 ms |
204 KB |
Output is correct |
54 |
Correct |
0 ms |
204 KB |
Output is correct |
55 |
Correct |
1372 ms |
76052 KB |
Output is correct |
56 |
Correct |
1 ms |
204 KB |
Output is correct |
57 |
Correct |
6 ms |
972 KB |
Output is correct |
58 |
Correct |
18 ms |
2520 KB |
Output is correct |
59 |
Correct |
21 ms |
3036 KB |
Output is correct |
60 |
Correct |
549 ms |
37956 KB |
Output is correct |
61 |
Correct |
847 ms |
52512 KB |
Output is correct |
62 |
Correct |
1050 ms |
63236 KB |
Output is correct |
63 |
Correct |
1331 ms |
76148 KB |
Output is correct |
64 |
Correct |
0 ms |
204 KB |
Output is correct |
65 |
Correct |
1 ms |
204 KB |
Output is correct |
66 |
Correct |
1 ms |
204 KB |
Output is correct |
67 |
Correct |
1180 ms |
76172 KB |
Output is correct |
68 |
Correct |
1173 ms |
76132 KB |
Output is correct |
69 |
Correct |
1215 ms |
75772 KB |
Output is correct |
70 |
Correct |
7 ms |
1356 KB |
Output is correct |
71 |
Correct |
16 ms |
2508 KB |
Output is correct |
72 |
Correct |
510 ms |
38496 KB |
Output is correct |
73 |
Correct |
814 ms |
58496 KB |
Output is correct |
74 |
Correct |
1123 ms |
77268 KB |
Output is correct |
75 |
Correct |
1089 ms |
76624 KB |
Output is correct |
76 |
Correct |
1126 ms |
76220 KB |
Output is correct |
77 |
Correct |
9 ms |
1612 KB |
Output is correct |
78 |
Correct |
17 ms |
2716 KB |
Output is correct |
79 |
Correct |
465 ms |
38284 KB |
Output is correct |
80 |
Correct |
820 ms |
58104 KB |
Output is correct |
81 |
Correct |
1138 ms |
76940 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
501 ms |
37232 KB |
Output is correct |
10 |
Correct |
24 ms |
4044 KB |
Output is correct |
11 |
Correct |
147 ms |
20120 KB |
Output is correct |
12 |
Correct |
35 ms |
5868 KB |
Output is correct |
13 |
Correct |
68 ms |
12084 KB |
Output is correct |
14 |
Correct |
2 ms |
460 KB |
Output is correct |
15 |
Correct |
4 ms |
716 KB |
Output is correct |
16 |
Correct |
520 ms |
37196 KB |
Output is correct |
17 |
Correct |
0 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
204 KB |
Output is correct |
19 |
Correct |
1 ms |
204 KB |
Output is correct |
20 |
Correct |
967 ms |
77840 KB |
Output is correct |
21 |
Correct |
973 ms |
77396 KB |
Output is correct |
22 |
Correct |
960 ms |
77428 KB |
Output is correct |
23 |
Correct |
711 ms |
65604 KB |
Output is correct |
24 |
Correct |
254 ms |
20616 KB |
Output is correct |
25 |
Correct |
549 ms |
54328 KB |
Output is correct |
26 |
Correct |
830 ms |
54984 KB |
Output is correct |
27 |
Correct |
1142 ms |
76184 KB |
Output is correct |
28 |
Correct |
1113 ms |
76004 KB |
Output is correct |
29 |
Correct |
833 ms |
76060 KB |
Output is correct |
30 |
Correct |
837 ms |
76060 KB |
Output is correct |
31 |
Correct |
0 ms |
204 KB |
Output is correct |
32 |
Correct |
46 ms |
5904 KB |
Output is correct |
33 |
Correct |
139 ms |
10956 KB |
Output is correct |
34 |
Correct |
927 ms |
78024 KB |
Output is correct |
35 |
Correct |
19 ms |
3020 KB |
Output is correct |
36 |
Correct |
121 ms |
14112 KB |
Output is correct |
37 |
Correct |
309 ms |
28212 KB |
Output is correct |
38 |
Correct |
330 ms |
31880 KB |
Output is correct |
39 |
Correct |
499 ms |
43336 KB |
Output is correct |
40 |
Correct |
665 ms |
56212 KB |
Output is correct |
41 |
Correct |
851 ms |
67104 KB |
Output is correct |
42 |
Correct |
1034 ms |
78864 KB |
Output is correct |
43 |
Correct |
0 ms |
204 KB |
Output is correct |
44 |
Correct |
0 ms |
204 KB |
Output is correct |
45 |
Correct |
1 ms |
300 KB |
Output is correct |
46 |
Correct |
0 ms |
308 KB |
Output is correct |
47 |
Correct |
0 ms |
204 KB |
Output is correct |
48 |
Correct |
0 ms |
204 KB |
Output is correct |
49 |
Correct |
0 ms |
204 KB |
Output is correct |
50 |
Correct |
0 ms |
204 KB |
Output is correct |
51 |
Correct |
1 ms |
204 KB |
Output is correct |
52 |
Correct |
0 ms |
204 KB |
Output is correct |
53 |
Correct |
1 ms |
204 KB |
Output is correct |
54 |
Correct |
4 ms |
844 KB |
Output is correct |
55 |
Correct |
5 ms |
1100 KB |
Output is correct |
56 |
Correct |
443 ms |
38620 KB |
Output is correct |
57 |
Correct |
714 ms |
56464 KB |
Output is correct |
58 |
Correct |
706 ms |
56412 KB |
Output is correct |
59 |
Correct |
0 ms |
204 KB |
Output is correct |
60 |
Correct |
0 ms |
204 KB |
Output is correct |
61 |
Correct |
0 ms |
204 KB |
Output is correct |
62 |
Correct |
1128 ms |
76040 KB |
Output is correct |
63 |
Correct |
1132 ms |
76228 KB |
Output is correct |
64 |
Correct |
1106 ms |
75788 KB |
Output is correct |
65 |
Correct |
7 ms |
1356 KB |
Output is correct |
66 |
Correct |
15 ms |
2480 KB |
Output is correct |
67 |
Correct |
441 ms |
38568 KB |
Output is correct |
68 |
Correct |
737 ms |
58400 KB |
Output is correct |
69 |
Correct |
1064 ms |
77336 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
501 ms |
37232 KB |
Output is correct |
10 |
Correct |
24 ms |
4044 KB |
Output is correct |
11 |
Correct |
147 ms |
20120 KB |
Output is correct |
12 |
Correct |
35 ms |
5868 KB |
Output is correct |
13 |
Correct |
68 ms |
12084 KB |
Output is correct |
14 |
Correct |
2 ms |
460 KB |
Output is correct |
15 |
Correct |
4 ms |
716 KB |
Output is correct |
16 |
Correct |
520 ms |
37196 KB |
Output is correct |
17 |
Correct |
890 ms |
74856 KB |
Output is correct |
18 |
Correct |
966 ms |
77288 KB |
Output is correct |
19 |
Correct |
956 ms |
77480 KB |
Output is correct |
20 |
Correct |
1002 ms |
75412 KB |
Output is correct |
21 |
Correct |
836 ms |
67204 KB |
Output is correct |
22 |
Correct |
1 ms |
204 KB |
Output is correct |
23 |
Correct |
109 ms |
12212 KB |
Output is correct |
24 |
Correct |
43 ms |
5844 KB |
Output is correct |
25 |
Correct |
198 ms |
19776 KB |
Output is correct |
26 |
Correct |
375 ms |
33572 KB |
Output is correct |
27 |
Correct |
454 ms |
39300 KB |
Output is correct |
28 |
Correct |
630 ms |
49256 KB |
Output is correct |
29 |
Correct |
737 ms |
59740 KB |
Output is correct |
30 |
Correct |
924 ms |
68700 KB |
Output is correct |
31 |
Correct |
1094 ms |
78700 KB |
Output is correct |
32 |
Correct |
1095 ms |
76824 KB |
Output is correct |
33 |
Correct |
1087 ms |
76144 KB |
Output is correct |
34 |
Correct |
10 ms |
1612 KB |
Output is correct |
35 |
Correct |
17 ms |
2752 KB |
Output is correct |
36 |
Correct |
470 ms |
38520 KB |
Output is correct |
37 |
Correct |
763 ms |
58168 KB |
Output is correct |
38 |
Correct |
1103 ms |
76968 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
501 ms |
37232 KB |
Output is correct |
10 |
Correct |
24 ms |
4044 KB |
Output is correct |
11 |
Correct |
147 ms |
20120 KB |
Output is correct |
12 |
Correct |
35 ms |
5868 KB |
Output is correct |
13 |
Correct |
68 ms |
12084 KB |
Output is correct |
14 |
Correct |
2 ms |
460 KB |
Output is correct |
15 |
Correct |
4 ms |
716 KB |
Output is correct |
16 |
Correct |
520 ms |
37196 KB |
Output is correct |
17 |
Correct |
0 ms |
204 KB |
Output is correct |
18 |
Correct |
0 ms |
312 KB |
Output is correct |
19 |
Correct |
0 ms |
204 KB |
Output is correct |
20 |
Correct |
0 ms |
204 KB |
Output is correct |
21 |
Correct |
0 ms |
204 KB |
Output is correct |
22 |
Correct |
1 ms |
308 KB |
Output is correct |
23 |
Correct |
1346 ms |
76128 KB |
Output is correct |
24 |
Correct |
0 ms |
204 KB |
Output is correct |
25 |
Correct |
4 ms |
716 KB |
Output is correct |
26 |
Correct |
6 ms |
1100 KB |
Output is correct |
27 |
Correct |
8 ms |
1356 KB |
Output is correct |
28 |
Correct |
419 ms |
30556 KB |
Output is correct |
29 |
Correct |
718 ms |
45652 KB |
Output is correct |
30 |
Correct |
1002 ms |
61136 KB |
Output is correct |
31 |
Correct |
1361 ms |
76064 KB |
Output is correct |
32 |
Correct |
0 ms |
204 KB |
Output is correct |
33 |
Correct |
0 ms |
204 KB |
Output is correct |
34 |
Correct |
0 ms |
312 KB |
Output is correct |
35 |
Correct |
1 ms |
204 KB |
Output is correct |
36 |
Correct |
0 ms |
304 KB |
Output is correct |
37 |
Correct |
0 ms |
204 KB |
Output is correct |
38 |
Correct |
1 ms |
204 KB |
Output is correct |
39 |
Correct |
0 ms |
204 KB |
Output is correct |
40 |
Correct |
0 ms |
204 KB |
Output is correct |
41 |
Correct |
0 ms |
204 KB |
Output is correct |
42 |
Correct |
1 ms |
204 KB |
Output is correct |
43 |
Correct |
5 ms |
820 KB |
Output is correct |
44 |
Correct |
7 ms |
1100 KB |
Output is correct |
45 |
Correct |
446 ms |
38572 KB |
Output is correct |
46 |
Correct |
776 ms |
56472 KB |
Output is correct |
47 |
Correct |
784 ms |
56344 KB |
Output is correct |
48 |
Correct |
1 ms |
204 KB |
Output is correct |
49 |
Correct |
0 ms |
204 KB |
Output is correct |
50 |
Correct |
0 ms |
204 KB |
Output is correct |
51 |
Correct |
0 ms |
308 KB |
Output is correct |
52 |
Correct |
0 ms |
204 KB |
Output is correct |
53 |
Correct |
1 ms |
204 KB |
Output is correct |
54 |
Correct |
0 ms |
204 KB |
Output is correct |
55 |
Correct |
1372 ms |
76052 KB |
Output is correct |
56 |
Correct |
1 ms |
204 KB |
Output is correct |
57 |
Correct |
6 ms |
972 KB |
Output is correct |
58 |
Correct |
18 ms |
2520 KB |
Output is correct |
59 |
Correct |
21 ms |
3036 KB |
Output is correct |
60 |
Correct |
549 ms |
37956 KB |
Output is correct |
61 |
Correct |
847 ms |
52512 KB |
Output is correct |
62 |
Correct |
1050 ms |
63236 KB |
Output is correct |
63 |
Correct |
1331 ms |
76148 KB |
Output is correct |
64 |
Correct |
0 ms |
204 KB |
Output is correct |
65 |
Correct |
1 ms |
204 KB |
Output is correct |
66 |
Correct |
1 ms |
204 KB |
Output is correct |
67 |
Correct |
1180 ms |
76172 KB |
Output is correct |
68 |
Correct |
1173 ms |
76132 KB |
Output is correct |
69 |
Correct |
1215 ms |
75772 KB |
Output is correct |
70 |
Correct |
7 ms |
1356 KB |
Output is correct |
71 |
Correct |
16 ms |
2508 KB |
Output is correct |
72 |
Correct |
510 ms |
38496 KB |
Output is correct |
73 |
Correct |
814 ms |
58496 KB |
Output is correct |
74 |
Correct |
1123 ms |
77268 KB |
Output is correct |
75 |
Correct |
1089 ms |
76624 KB |
Output is correct |
76 |
Correct |
1126 ms |
76220 KB |
Output is correct |
77 |
Correct |
9 ms |
1612 KB |
Output is correct |
78 |
Correct |
17 ms |
2716 KB |
Output is correct |
79 |
Correct |
465 ms |
38284 KB |
Output is correct |
80 |
Correct |
820 ms |
58104 KB |
Output is correct |
81 |
Correct |
1138 ms |
76940 KB |
Output is correct |
82 |
Correct |
0 ms |
204 KB |
Output is correct |
83 |
Correct |
1 ms |
204 KB |
Output is correct |
84 |
Correct |
1 ms |
204 KB |
Output is correct |
85 |
Correct |
967 ms |
77840 KB |
Output is correct |
86 |
Correct |
973 ms |
77396 KB |
Output is correct |
87 |
Correct |
960 ms |
77428 KB |
Output is correct |
88 |
Correct |
711 ms |
65604 KB |
Output is correct |
89 |
Correct |
254 ms |
20616 KB |
Output is correct |
90 |
Correct |
549 ms |
54328 KB |
Output is correct |
91 |
Correct |
830 ms |
54984 KB |
Output is correct |
92 |
Correct |
1142 ms |
76184 KB |
Output is correct |
93 |
Correct |
1113 ms |
76004 KB |
Output is correct |
94 |
Correct |
833 ms |
76060 KB |
Output is correct |
95 |
Correct |
837 ms |
76060 KB |
Output is correct |
96 |
Correct |
0 ms |
204 KB |
Output is correct |
97 |
Correct |
46 ms |
5904 KB |
Output is correct |
98 |
Correct |
139 ms |
10956 KB |
Output is correct |
99 |
Correct |
927 ms |
78024 KB |
Output is correct |
100 |
Correct |
19 ms |
3020 KB |
Output is correct |
101 |
Correct |
121 ms |
14112 KB |
Output is correct |
102 |
Correct |
309 ms |
28212 KB |
Output is correct |
103 |
Correct |
330 ms |
31880 KB |
Output is correct |
104 |
Correct |
499 ms |
43336 KB |
Output is correct |
105 |
Correct |
665 ms |
56212 KB |
Output is correct |
106 |
Correct |
851 ms |
67104 KB |
Output is correct |
107 |
Correct |
1034 ms |
78864 KB |
Output is correct |
108 |
Correct |
0 ms |
204 KB |
Output is correct |
109 |
Correct |
0 ms |
204 KB |
Output is correct |
110 |
Correct |
1 ms |
300 KB |
Output is correct |
111 |
Correct |
0 ms |
308 KB |
Output is correct |
112 |
Correct |
0 ms |
204 KB |
Output is correct |
113 |
Correct |
0 ms |
204 KB |
Output is correct |
114 |
Correct |
0 ms |
204 KB |
Output is correct |
115 |
Correct |
0 ms |
204 KB |
Output is correct |
116 |
Correct |
1 ms |
204 KB |
Output is correct |
117 |
Correct |
0 ms |
204 KB |
Output is correct |
118 |
Correct |
1 ms |
204 KB |
Output is correct |
119 |
Correct |
4 ms |
844 KB |
Output is correct |
120 |
Correct |
5 ms |
1100 KB |
Output is correct |
121 |
Correct |
443 ms |
38620 KB |
Output is correct |
122 |
Correct |
714 ms |
56464 KB |
Output is correct |
123 |
Correct |
706 ms |
56412 KB |
Output is correct |
124 |
Correct |
0 ms |
204 KB |
Output is correct |
125 |
Correct |
0 ms |
204 KB |
Output is correct |
126 |
Correct |
0 ms |
204 KB |
Output is correct |
127 |
Correct |
1128 ms |
76040 KB |
Output is correct |
128 |
Correct |
1132 ms |
76228 KB |
Output is correct |
129 |
Correct |
1106 ms |
75788 KB |
Output is correct |
130 |
Correct |
7 ms |
1356 KB |
Output is correct |
131 |
Correct |
15 ms |
2480 KB |
Output is correct |
132 |
Correct |
441 ms |
38568 KB |
Output is correct |
133 |
Correct |
737 ms |
58400 KB |
Output is correct |
134 |
Correct |
1064 ms |
77336 KB |
Output is correct |
135 |
Correct |
890 ms |
74856 KB |
Output is correct |
136 |
Correct |
966 ms |
77288 KB |
Output is correct |
137 |
Correct |
956 ms |
77480 KB |
Output is correct |
138 |
Correct |
1002 ms |
75412 KB |
Output is correct |
139 |
Correct |
836 ms |
67204 KB |
Output is correct |
140 |
Correct |
1 ms |
204 KB |
Output is correct |
141 |
Correct |
109 ms |
12212 KB |
Output is correct |
142 |
Correct |
43 ms |
5844 KB |
Output is correct |
143 |
Correct |
198 ms |
19776 KB |
Output is correct |
144 |
Correct |
375 ms |
33572 KB |
Output is correct |
145 |
Correct |
454 ms |
39300 KB |
Output is correct |
146 |
Correct |
630 ms |
49256 KB |
Output is correct |
147 |
Correct |
737 ms |
59740 KB |
Output is correct |
148 |
Correct |
924 ms |
68700 KB |
Output is correct |
149 |
Correct |
1094 ms |
78700 KB |
Output is correct |
150 |
Correct |
1095 ms |
76824 KB |
Output is correct |
151 |
Correct |
1087 ms |
76144 KB |
Output is correct |
152 |
Correct |
10 ms |
1612 KB |
Output is correct |
153 |
Correct |
17 ms |
2752 KB |
Output is correct |
154 |
Correct |
470 ms |
38520 KB |
Output is correct |
155 |
Correct |
763 ms |
58168 KB |
Output is correct |
156 |
Correct |
1103 ms |
76968 KB |
Output is correct |
157 |
Correct |
1 ms |
204 KB |
Output is correct |
158 |
Correct |
0 ms |
204 KB |
Output is correct |
159 |
Correct |
0 ms |
204 KB |
Output is correct |
160 |
Correct |
0 ms |
204 KB |
Output is correct |
161 |
Correct |
1406 ms |
76692 KB |
Output is correct |
162 |
Correct |
951 ms |
77912 KB |
Output is correct |
163 |
Correct |
1093 ms |
80884 KB |
Output is correct |
164 |
Correct |
1094 ms |
80924 KB |
Output is correct |
165 |
Correct |
1266 ms |
78572 KB |
Output is correct |
166 |
Correct |
1323 ms |
77236 KB |
Output is correct |
167 |
Correct |
208 ms |
18424 KB |
Output is correct |
168 |
Correct |
91 ms |
8548 KB |
Output is correct |
169 |
Correct |
288 ms |
22552 KB |
Output is correct |
170 |
Correct |
602 ms |
42160 KB |
Output is correct |
171 |
Correct |
874 ms |
55572 KB |
Output is correct |
172 |
Correct |
571 ms |
39216 KB |
Output is correct |
173 |
Correct |
687 ms |
46768 KB |
Output is correct |
174 |
Correct |
868 ms |
55732 KB |
Output is correct |
175 |
Correct |
1027 ms |
62400 KB |
Output is correct |
176 |
Correct |
1180 ms |
70324 KB |
Output is correct |
177 |
Correct |
1335 ms |
77964 KB |
Output is correct |