# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
283028 |
2020-08-25T08:51:25 Z |
문홍윤(#5763) |
Iqea (innopolis2018_final_C) |
C++17 |
|
1383 ms |
167664 KB |
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#define eb emplace_back
#define mp make_pair
#define F first
#define S second
#define svec(x) sort(x.begin(), x.end())
#define press(x) x.erase(unique(x.begin(), x.end()), x.end())
using namespace std;
typedef pair<int, int> pii;
const int inf=1e9;
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
typedef cc_hash_table<int, int, hash<int> > ht;
int n, rex, rey;
ht mx[100010], my[100010];
pii p[100010];
vector<int> lx[100010], ly[100010];
bool cmp(pii a, pii b){return mp(a.S, a.F)<mp(b.S, b.F);}
inline void make_tree(){
sort(p+1, p+n+1);
for(int i=1; i<=n; i++){
if(p[i].F!=p[i-1].F||p[i].S!=p[i-1].S+1)rex++;
mx[p[i].F][p[i].S]=rex;
}
sort(p+1, p+n+1, cmp);
for(int i=1; i<=n; i++){
if(p[i].S!=p[i-1].S||p[i].F!=p[i-1].F+1)rey++;
my[p[i].F][p[i].S]=rey;
}
for(int i=1; i<=n; i++){
if(mx[p[i].F+1][p[i].S]){
lx[mx[p[i].F][p[i].S]].eb(mx[p[i].F+1][p[i].S]);
lx[mx[p[i].F+1][p[i].S]].eb(mx[p[i].F][p[i].S]);
}
if(my[p[i].F][p[i].S+1]){
ly[my[p[i].F][p[i].S]].eb(my[p[i].F][p[i].S+1]);
ly[my[p[i].F][p[i].S+1]].eb(my[p[i].F][p[i].S]);
}
}
for(int i=1; i<=rex; i++){
svec(lx[i]);
press(lx[i]);
}
for(int i=1; i<=rey; i++){
svec(ly[i]);
press(ly[i]);
}
}
int sz[100010];
bool ch[100010];
void dfs_x(int num, int par){
sz[num]=1;
for(auto i:lx[num]){
if(i==par||ch[i])continue;
dfs_x(i, num);
sz[num]+=sz[i];
}
}
int get_cen_x(int num, int siz){
int ov=0;
for(auto i:lx[num]){
if(ch[i])continue;
if(sz[i]>siz/2){
ov=i;
break;
}
}
if(!ov)return num;
sz[num]=siz-sz[ov];
sz[ov]=siz;
return get_cen_x(ov, siz);
}
void dfs_y(int num, int par){
sz[num]=1;
for(auto i:ly[num]){
if(i==par||ch[i])continue;
dfs_y(i, num);
sz[num]+=sz[i];
}
}
int get_cen_y(int num, int siz){
int ov=0;
for(auto i:ly[num]){
if(ch[i])continue;
if(sz[i]>siz/2){
ov=i;
break;
}
}
if(!ov)return num;
sz[num]=siz-sz[ov];
sz[ov]=siz;
return get_cen_y(ov, siz);
}
int cpar_x[100010], cpar_y[100010];
int d_x[100010][20], d_y[100010][20];
void make_cen_x(int num, int par){
dfs_x(num, par);
int cen=get_cen_x(num, sz[num]);
cpar_x[cen]=par;
ch[cen]=true;
for(auto i:lx[cen]){
if(ch[i])continue;
make_cen_x(i, cen);
}
}
void make_cen_y(int num, int par){
dfs_y(num, par);
int cen=get_cen_y(num, sz[num]);
cpar_y[cen]=par;
ch[cen]=true;
for(auto i:ly[cen]){
if(ch[i])continue;
make_cen_y(i, cen);
}
}
int dep_x[100010], dep_y[100010];
int sp_x[100010][20], sp_y[100010][20];
void dfs2_x(int num, int par){
dep_x[num]=dep_x[par]+1;
sp_x[num][0]=par;
for(auto i:lx[num]){
if(i==par)continue;
dfs2_x(i, num);
}
}
void dfs2_y(int num, int par){
dep_y[num]=dep_y[par]+1;
sp_y[num][0]=par;
for(auto i:ly[num]){
if(i==par)continue;
dfs2_y(i, num);
}
}
inline int lca_x(int x, int y){
if(dep_x[x]>dep_x[y])swap(x, y);
for(int i=19; i>=0; i--){
if(dep_x[y]-dep_x[x]>=(1<<i))y=sp_x[y][i];
}
if(x==y)return x;
for(int i=19; i>=0; i--){
if(sp_x[x][i]!=sp_x[y][i]){
x=sp_x[x][i];
y=sp_x[y][i];
}
}
return sp_x[x][0];
}
inline int lca_y(int x, int y){
if(dep_y[x]>dep_y[y])swap(x, y);
for(int i=19; i>=0; i--){
if(dep_y[y]-dep_y[x]>=(1<<i))y=sp_y[y][i];
}
if(x==y)return x;
for(int i=19; i>=0; i--){
if(sp_y[x][i]!=sp_y[y][i]){
x=sp_y[x][i];
y=sp_y[y][i];
}
}
return sp_y[x][0];
}
inline int getd_x(int x, int y){return dep_x[x]+dep_x[y]-2*dep_x[lca_x(x, y)];}
inline int getd_y(int x, int y){return dep_y[x]+dep_y[y]-2*dep_y[lca_y(x, y)];}
inline void get_cend_x(){
for(int i=1; i<=rex; i++){
int nw=cpar_x[i];
for(int j=1; nw; j++, nw=cpar_x[nw])d_x[i][j]=getd_x(i, nw);
}
}
inline void get_cend_y(){
for(int i=1; i<=rey; i++){
int nw=cpar_y[i];
for(int j=1; nw; j++, nw=cpar_y[nw])d_y[i][j]=getd_y(i, nw);
}
}
ht arr[100010];
inline void upd(int x, int y){
int nx=mx[x][y], ny=my[x][y];
int tx=nx, ty=ny;
for(int i=0; tx; i++, tx=cpar_x[tx]){
ty=ny;
for(int j=0; ty; j++, ty=cpar_y[ty]){
int tmp=d_x[nx][i]+d_y[ny][j]+1;
if(!arr[tx][ty])arr[tx][ty]=inf;
arr[tx][ty]=min(tmp, arr[tx][ty]);
}
}
}
inline int query(int x, int y){
int nx=mx[x][y], ny=my[x][y], ret=inf;
int tx=nx, ty=ny;
for(int i=0; tx; i++, tx=cpar_x[tx]){
ty=ny;
for(int j=0; ty; j++, ty=cpar_y[ty]){
if(!arr[tx][ty])continue;
int tmp=d_x[nx][i]+d_y[ny][j];
ret=min(ret, arr[tx][ty]+tmp-1);
}
}
return ret==inf?-1:ret;
}
int main(){
scanf("%d", &n);
for(int i=1; i<=n; i++)scanf("%d %d", &p[i].F, &p[i].S);
make_tree();
make_cen_x(1, 0);
memset(ch, 0, sizeof ch);
make_cen_y(1, 0);
dfs2_x(1, 0);
dfs2_y(1, 0);
for(int j=1; j<20; j++){
for(int i=1; i<=rex; i++)sp_x[i][j]=sp_x[sp_x[i][j-1]][j-1];
for(int i=1; i<=rey; i++)sp_y[i][j]=sp_y[sp_y[i][j-1]][j-1];
}
get_cend_x();
get_cend_y();
int q;
scanf("%d", &q);
for(int i=1; i<=q; i++){
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if(a==1)upd(b, c);
else printf("%d\n", query(b, c));
}
}
Compilation message
C.cpp: In function 'int main()':
C.cpp:219:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
219 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
C.cpp:220:33: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
220 | for(int i=1; i<=n; i++)scanf("%d %d", &p[i].F, &p[i].S);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
C.cpp:234:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
234 | scanf("%d", &q);
| ~~~~~^~~~~~~~~~
C.cpp:237:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
237 | scanf("%d %d %d", &a, &b, &c);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
66 ms |
59128 KB |
Output is correct |
2 |
Correct |
67 ms |
59232 KB |
Output is correct |
3 |
Correct |
68 ms |
59256 KB |
Output is correct |
4 |
Correct |
90 ms |
60384 KB |
Output is correct |
5 |
Correct |
81 ms |
60280 KB |
Output is correct |
6 |
Correct |
96 ms |
60536 KB |
Output is correct |
7 |
Correct |
92 ms |
62480 KB |
Output is correct |
8 |
Correct |
92 ms |
62584 KB |
Output is correct |
9 |
Correct |
93 ms |
62584 KB |
Output is correct |
10 |
Correct |
89 ms |
62328 KB |
Output is correct |
11 |
Correct |
89 ms |
62584 KB |
Output is correct |
12 |
Correct |
95 ms |
62712 KB |
Output is correct |
13 |
Correct |
117 ms |
62712 KB |
Output is correct |
14 |
Correct |
91 ms |
62584 KB |
Output is correct |
15 |
Correct |
92 ms |
62712 KB |
Output is correct |
16 |
Correct |
92 ms |
62456 KB |
Output is correct |
17 |
Correct |
89 ms |
62200 KB |
Output is correct |
18 |
Correct |
93 ms |
62460 KB |
Output is correct |
19 |
Correct |
88 ms |
62200 KB |
Output is correct |
20 |
Correct |
97 ms |
62740 KB |
Output is correct |
21 |
Correct |
94 ms |
62584 KB |
Output is correct |
22 |
Correct |
97 ms |
63096 KB |
Output is correct |
23 |
Correct |
93 ms |
62968 KB |
Output is correct |
24 |
Correct |
94 ms |
63224 KB |
Output is correct |
25 |
Correct |
81 ms |
61560 KB |
Output is correct |
26 |
Correct |
85 ms |
62328 KB |
Output is correct |
27 |
Correct |
80 ms |
61944 KB |
Output is correct |
28 |
Correct |
94 ms |
63224 KB |
Output is correct |
29 |
Correct |
94 ms |
63308 KB |
Output is correct |
30 |
Correct |
93 ms |
63444 KB |
Output is correct |
31 |
Correct |
94 ms |
63224 KB |
Output is correct |
32 |
Correct |
98 ms |
63480 KB |
Output is correct |
33 |
Correct |
95 ms |
63352 KB |
Output is correct |
34 |
Correct |
94 ms |
63224 KB |
Output is correct |
35 |
Correct |
103 ms |
63608 KB |
Output is correct |
36 |
Correct |
80 ms |
61304 KB |
Output is correct |
37 |
Correct |
99 ms |
63352 KB |
Output is correct |
38 |
Correct |
94 ms |
63352 KB |
Output is correct |
39 |
Correct |
96 ms |
63480 KB |
Output is correct |
40 |
Correct |
100 ms |
63608 KB |
Output is correct |
41 |
Correct |
99 ms |
62968 KB |
Output is correct |
42 |
Correct |
91 ms |
62840 KB |
Output is correct |
43 |
Correct |
80 ms |
61308 KB |
Output is correct |
44 |
Correct |
112 ms |
63096 KB |
Output is correct |
45 |
Correct |
94 ms |
63096 KB |
Output is correct |
46 |
Correct |
83 ms |
61688 KB |
Output is correct |
47 |
Correct |
87 ms |
61816 KB |
Output is correct |
48 |
Correct |
85 ms |
61368 KB |
Output is correct |
49 |
Correct |
85 ms |
61048 KB |
Output is correct |
50 |
Correct |
83 ms |
61080 KB |
Output is correct |
51 |
Correct |
81 ms |
60664 KB |
Output is correct |
52 |
Correct |
88 ms |
61944 KB |
Output is correct |
53 |
Correct |
86 ms |
61816 KB |
Output is correct |
54 |
Correct |
89 ms |
61816 KB |
Output is correct |
55 |
Correct |
86 ms |
61944 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
66 ms |
59128 KB |
Output is correct |
2 |
Correct |
67 ms |
59232 KB |
Output is correct |
3 |
Correct |
68 ms |
59256 KB |
Output is correct |
4 |
Correct |
90 ms |
60384 KB |
Output is correct |
5 |
Correct |
81 ms |
60280 KB |
Output is correct |
6 |
Correct |
96 ms |
60536 KB |
Output is correct |
7 |
Correct |
92 ms |
62480 KB |
Output is correct |
8 |
Correct |
92 ms |
62584 KB |
Output is correct |
9 |
Correct |
93 ms |
62584 KB |
Output is correct |
10 |
Correct |
89 ms |
62328 KB |
Output is correct |
11 |
Correct |
89 ms |
62584 KB |
Output is correct |
12 |
Correct |
95 ms |
62712 KB |
Output is correct |
13 |
Correct |
117 ms |
62712 KB |
Output is correct |
14 |
Correct |
91 ms |
62584 KB |
Output is correct |
15 |
Correct |
92 ms |
62712 KB |
Output is correct |
16 |
Correct |
92 ms |
62456 KB |
Output is correct |
17 |
Correct |
89 ms |
62200 KB |
Output is correct |
18 |
Correct |
93 ms |
62460 KB |
Output is correct |
19 |
Correct |
88 ms |
62200 KB |
Output is correct |
20 |
Correct |
97 ms |
62740 KB |
Output is correct |
21 |
Correct |
94 ms |
62584 KB |
Output is correct |
22 |
Correct |
97 ms |
63096 KB |
Output is correct |
23 |
Correct |
93 ms |
62968 KB |
Output is correct |
24 |
Correct |
94 ms |
63224 KB |
Output is correct |
25 |
Correct |
81 ms |
61560 KB |
Output is correct |
26 |
Correct |
85 ms |
62328 KB |
Output is correct |
27 |
Correct |
80 ms |
61944 KB |
Output is correct |
28 |
Correct |
94 ms |
63224 KB |
Output is correct |
29 |
Correct |
94 ms |
63308 KB |
Output is correct |
30 |
Correct |
93 ms |
63444 KB |
Output is correct |
31 |
Correct |
94 ms |
63224 KB |
Output is correct |
32 |
Correct |
98 ms |
63480 KB |
Output is correct |
33 |
Correct |
95 ms |
63352 KB |
Output is correct |
34 |
Correct |
94 ms |
63224 KB |
Output is correct |
35 |
Correct |
103 ms |
63608 KB |
Output is correct |
36 |
Correct |
80 ms |
61304 KB |
Output is correct |
37 |
Correct |
99 ms |
63352 KB |
Output is correct |
38 |
Correct |
94 ms |
63352 KB |
Output is correct |
39 |
Correct |
96 ms |
63480 KB |
Output is correct |
40 |
Correct |
100 ms |
63608 KB |
Output is correct |
41 |
Correct |
99 ms |
62968 KB |
Output is correct |
42 |
Correct |
91 ms |
62840 KB |
Output is correct |
43 |
Correct |
80 ms |
61308 KB |
Output is correct |
44 |
Correct |
112 ms |
63096 KB |
Output is correct |
45 |
Correct |
94 ms |
63096 KB |
Output is correct |
46 |
Correct |
83 ms |
61688 KB |
Output is correct |
47 |
Correct |
87 ms |
61816 KB |
Output is correct |
48 |
Correct |
85 ms |
61368 KB |
Output is correct |
49 |
Correct |
85 ms |
61048 KB |
Output is correct |
50 |
Correct |
83 ms |
61080 KB |
Output is correct |
51 |
Correct |
81 ms |
60664 KB |
Output is correct |
52 |
Correct |
88 ms |
61944 KB |
Output is correct |
53 |
Correct |
86 ms |
61816 KB |
Output is correct |
54 |
Correct |
89 ms |
61816 KB |
Output is correct |
55 |
Correct |
86 ms |
61944 KB |
Output is correct |
56 |
Correct |
146 ms |
60792 KB |
Output is correct |
57 |
Correct |
149 ms |
60920 KB |
Output is correct |
58 |
Correct |
151 ms |
60944 KB |
Output is correct |
59 |
Correct |
203 ms |
63352 KB |
Output is correct |
60 |
Correct |
225 ms |
63480 KB |
Output is correct |
61 |
Correct |
264 ms |
63608 KB |
Output is correct |
62 |
Correct |
201 ms |
63352 KB |
Output is correct |
63 |
Correct |
213 ms |
63480 KB |
Output is correct |
64 |
Correct |
214 ms |
63608 KB |
Output is correct |
65 |
Correct |
218 ms |
63660 KB |
Output is correct |
66 |
Correct |
218 ms |
63736 KB |
Output is correct |
67 |
Correct |
211 ms |
63636 KB |
Output is correct |
68 |
Correct |
219 ms |
63480 KB |
Output is correct |
69 |
Correct |
202 ms |
62968 KB |
Output is correct |
70 |
Correct |
208 ms |
63472 KB |
Output is correct |
71 |
Correct |
197 ms |
63096 KB |
Output is correct |
72 |
Correct |
221 ms |
63480 KB |
Output is correct |
73 |
Correct |
207 ms |
63480 KB |
Output is correct |
74 |
Correct |
164 ms |
62404 KB |
Output is correct |
75 |
Correct |
169 ms |
63224 KB |
Output is correct |
76 |
Correct |
133 ms |
62584 KB |
Output is correct |
77 |
Correct |
266 ms |
64252 KB |
Output is correct |
78 |
Correct |
265 ms |
64248 KB |
Output is correct |
79 |
Correct |
164 ms |
61944 KB |
Output is correct |
80 |
Correct |
246 ms |
64376 KB |
Output is correct |
81 |
Correct |
255 ms |
64380 KB |
Output is correct |
82 |
Correct |
270 ms |
63992 KB |
Output is correct |
83 |
Correct |
251 ms |
63956 KB |
Output is correct |
84 |
Correct |
164 ms |
62200 KB |
Output is correct |
85 |
Correct |
240 ms |
64120 KB |
Output is correct |
86 |
Correct |
244 ms |
63992 KB |
Output is correct |
87 |
Correct |
137 ms |
62456 KB |
Output is correct |
88 |
Correct |
198 ms |
62572 KB |
Output is correct |
89 |
Correct |
184 ms |
62072 KB |
Output is correct |
90 |
Correct |
181 ms |
61944 KB |
Output is correct |
91 |
Correct |
172 ms |
61560 KB |
Output is correct |
92 |
Correct |
163 ms |
61048 KB |
Output is correct |
93 |
Correct |
193 ms |
62712 KB |
Output is correct |
94 |
Correct |
197 ms |
62584 KB |
Output is correct |
95 |
Correct |
207 ms |
62712 KB |
Output is correct |
96 |
Correct |
202 ms |
62712 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
456 ms |
115736 KB |
Output is correct |
2 |
Correct |
478 ms |
103160 KB |
Output is correct |
3 |
Correct |
1217 ms |
164772 KB |
Output is correct |
4 |
Correct |
1252 ms |
167664 KB |
Output is correct |
5 |
Correct |
1189 ms |
159208 KB |
Output is correct |
6 |
Correct |
1279 ms |
158604 KB |
Output is correct |
7 |
Correct |
465 ms |
89976 KB |
Output is correct |
8 |
Correct |
384 ms |
104420 KB |
Output is correct |
9 |
Correct |
412 ms |
108516 KB |
Output is correct |
10 |
Correct |
535 ms |
89440 KB |
Output is correct |
11 |
Correct |
471 ms |
104932 KB |
Output is correct |
12 |
Correct |
416 ms |
108436 KB |
Output is correct |
13 |
Correct |
407 ms |
108516 KB |
Output is correct |
14 |
Correct |
417 ms |
108644 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1034 ms |
139500 KB |
Output is correct |
2 |
Correct |
1077 ms |
140784 KB |
Output is correct |
3 |
Correct |
1132 ms |
140272 KB |
Output is correct |
4 |
Correct |
1128 ms |
142436 KB |
Output is correct |
5 |
Correct |
1117 ms |
141284 KB |
Output is correct |
6 |
Correct |
1128 ms |
142028 KB |
Output is correct |
7 |
Correct |
1074 ms |
140400 KB |
Output is correct |
8 |
Correct |
1085 ms |
140020 KB |
Output is correct |
9 |
Correct |
1077 ms |
142052 KB |
Output is correct |
10 |
Correct |
1212 ms |
154968 KB |
Output is correct |
11 |
Correct |
1186 ms |
152020 KB |
Output is correct |
12 |
Correct |
1284 ms |
156140 KB |
Output is correct |
13 |
Correct |
551 ms |
108276 KB |
Output is correct |
14 |
Correct |
605 ms |
132288 KB |
Output is correct |
15 |
Correct |
406 ms |
108772 KB |
Output is correct |
16 |
Correct |
1133 ms |
155500 KB |
Output is correct |
17 |
Correct |
1139 ms |
155248 KB |
Output is correct |
18 |
Correct |
1134 ms |
157948 KB |
Output is correct |
19 |
Correct |
1162 ms |
157980 KB |
Output is correct |
20 |
Correct |
1281 ms |
163556 KB |
Output is correct |
21 |
Correct |
1383 ms |
163300 KB |
Output is correct |
22 |
Correct |
1299 ms |
155368 KB |
Output is correct |
23 |
Correct |
1313 ms |
166372 KB |
Output is correct |
24 |
Correct |
450 ms |
99960 KB |
Output is correct |
25 |
Correct |
1212 ms |
162456 KB |
Output is correct |
26 |
Correct |
1184 ms |
162436 KB |
Output is correct |
27 |
Correct |
1222 ms |
165492 KB |
Output is correct |
28 |
Correct |
1272 ms |
164976 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
66 ms |
59128 KB |
Output is correct |
2 |
Correct |
67 ms |
59232 KB |
Output is correct |
3 |
Correct |
68 ms |
59256 KB |
Output is correct |
4 |
Correct |
90 ms |
60384 KB |
Output is correct |
5 |
Correct |
81 ms |
60280 KB |
Output is correct |
6 |
Correct |
96 ms |
60536 KB |
Output is correct |
7 |
Correct |
92 ms |
62480 KB |
Output is correct |
8 |
Correct |
92 ms |
62584 KB |
Output is correct |
9 |
Correct |
93 ms |
62584 KB |
Output is correct |
10 |
Correct |
89 ms |
62328 KB |
Output is correct |
11 |
Correct |
89 ms |
62584 KB |
Output is correct |
12 |
Correct |
95 ms |
62712 KB |
Output is correct |
13 |
Correct |
117 ms |
62712 KB |
Output is correct |
14 |
Correct |
91 ms |
62584 KB |
Output is correct |
15 |
Correct |
92 ms |
62712 KB |
Output is correct |
16 |
Correct |
92 ms |
62456 KB |
Output is correct |
17 |
Correct |
89 ms |
62200 KB |
Output is correct |
18 |
Correct |
93 ms |
62460 KB |
Output is correct |
19 |
Correct |
88 ms |
62200 KB |
Output is correct |
20 |
Correct |
97 ms |
62740 KB |
Output is correct |
21 |
Correct |
94 ms |
62584 KB |
Output is correct |
22 |
Correct |
97 ms |
63096 KB |
Output is correct |
23 |
Correct |
93 ms |
62968 KB |
Output is correct |
24 |
Correct |
94 ms |
63224 KB |
Output is correct |
25 |
Correct |
81 ms |
61560 KB |
Output is correct |
26 |
Correct |
85 ms |
62328 KB |
Output is correct |
27 |
Correct |
80 ms |
61944 KB |
Output is correct |
28 |
Correct |
94 ms |
63224 KB |
Output is correct |
29 |
Correct |
94 ms |
63308 KB |
Output is correct |
30 |
Correct |
93 ms |
63444 KB |
Output is correct |
31 |
Correct |
94 ms |
63224 KB |
Output is correct |
32 |
Correct |
98 ms |
63480 KB |
Output is correct |
33 |
Correct |
95 ms |
63352 KB |
Output is correct |
34 |
Correct |
94 ms |
63224 KB |
Output is correct |
35 |
Correct |
103 ms |
63608 KB |
Output is correct |
36 |
Correct |
80 ms |
61304 KB |
Output is correct |
37 |
Correct |
99 ms |
63352 KB |
Output is correct |
38 |
Correct |
94 ms |
63352 KB |
Output is correct |
39 |
Correct |
96 ms |
63480 KB |
Output is correct |
40 |
Correct |
100 ms |
63608 KB |
Output is correct |
41 |
Correct |
99 ms |
62968 KB |
Output is correct |
42 |
Correct |
91 ms |
62840 KB |
Output is correct |
43 |
Correct |
80 ms |
61308 KB |
Output is correct |
44 |
Correct |
112 ms |
63096 KB |
Output is correct |
45 |
Correct |
94 ms |
63096 KB |
Output is correct |
46 |
Correct |
83 ms |
61688 KB |
Output is correct |
47 |
Correct |
87 ms |
61816 KB |
Output is correct |
48 |
Correct |
85 ms |
61368 KB |
Output is correct |
49 |
Correct |
85 ms |
61048 KB |
Output is correct |
50 |
Correct |
83 ms |
61080 KB |
Output is correct |
51 |
Correct |
81 ms |
60664 KB |
Output is correct |
52 |
Correct |
88 ms |
61944 KB |
Output is correct |
53 |
Correct |
86 ms |
61816 KB |
Output is correct |
54 |
Correct |
89 ms |
61816 KB |
Output is correct |
55 |
Correct |
86 ms |
61944 KB |
Output is correct |
56 |
Correct |
146 ms |
60792 KB |
Output is correct |
57 |
Correct |
149 ms |
60920 KB |
Output is correct |
58 |
Correct |
151 ms |
60944 KB |
Output is correct |
59 |
Correct |
203 ms |
63352 KB |
Output is correct |
60 |
Correct |
225 ms |
63480 KB |
Output is correct |
61 |
Correct |
264 ms |
63608 KB |
Output is correct |
62 |
Correct |
201 ms |
63352 KB |
Output is correct |
63 |
Correct |
213 ms |
63480 KB |
Output is correct |
64 |
Correct |
214 ms |
63608 KB |
Output is correct |
65 |
Correct |
218 ms |
63660 KB |
Output is correct |
66 |
Correct |
218 ms |
63736 KB |
Output is correct |
67 |
Correct |
211 ms |
63636 KB |
Output is correct |
68 |
Correct |
219 ms |
63480 KB |
Output is correct |
69 |
Correct |
202 ms |
62968 KB |
Output is correct |
70 |
Correct |
208 ms |
63472 KB |
Output is correct |
71 |
Correct |
197 ms |
63096 KB |
Output is correct |
72 |
Correct |
221 ms |
63480 KB |
Output is correct |
73 |
Correct |
207 ms |
63480 KB |
Output is correct |
74 |
Correct |
164 ms |
62404 KB |
Output is correct |
75 |
Correct |
169 ms |
63224 KB |
Output is correct |
76 |
Correct |
133 ms |
62584 KB |
Output is correct |
77 |
Correct |
266 ms |
64252 KB |
Output is correct |
78 |
Correct |
265 ms |
64248 KB |
Output is correct |
79 |
Correct |
164 ms |
61944 KB |
Output is correct |
80 |
Correct |
246 ms |
64376 KB |
Output is correct |
81 |
Correct |
255 ms |
64380 KB |
Output is correct |
82 |
Correct |
270 ms |
63992 KB |
Output is correct |
83 |
Correct |
251 ms |
63956 KB |
Output is correct |
84 |
Correct |
164 ms |
62200 KB |
Output is correct |
85 |
Correct |
240 ms |
64120 KB |
Output is correct |
86 |
Correct |
244 ms |
63992 KB |
Output is correct |
87 |
Correct |
137 ms |
62456 KB |
Output is correct |
88 |
Correct |
198 ms |
62572 KB |
Output is correct |
89 |
Correct |
184 ms |
62072 KB |
Output is correct |
90 |
Correct |
181 ms |
61944 KB |
Output is correct |
91 |
Correct |
172 ms |
61560 KB |
Output is correct |
92 |
Correct |
163 ms |
61048 KB |
Output is correct |
93 |
Correct |
193 ms |
62712 KB |
Output is correct |
94 |
Correct |
197 ms |
62584 KB |
Output is correct |
95 |
Correct |
207 ms |
62712 KB |
Output is correct |
96 |
Correct |
202 ms |
62712 KB |
Output is correct |
97 |
Correct |
456 ms |
115736 KB |
Output is correct |
98 |
Correct |
478 ms |
103160 KB |
Output is correct |
99 |
Correct |
1217 ms |
164772 KB |
Output is correct |
100 |
Correct |
1252 ms |
167664 KB |
Output is correct |
101 |
Correct |
1189 ms |
159208 KB |
Output is correct |
102 |
Correct |
1279 ms |
158604 KB |
Output is correct |
103 |
Correct |
465 ms |
89976 KB |
Output is correct |
104 |
Correct |
384 ms |
104420 KB |
Output is correct |
105 |
Correct |
412 ms |
108516 KB |
Output is correct |
106 |
Correct |
535 ms |
89440 KB |
Output is correct |
107 |
Correct |
471 ms |
104932 KB |
Output is correct |
108 |
Correct |
416 ms |
108436 KB |
Output is correct |
109 |
Correct |
407 ms |
108516 KB |
Output is correct |
110 |
Correct |
417 ms |
108644 KB |
Output is correct |
111 |
Correct |
1034 ms |
139500 KB |
Output is correct |
112 |
Correct |
1077 ms |
140784 KB |
Output is correct |
113 |
Correct |
1132 ms |
140272 KB |
Output is correct |
114 |
Correct |
1128 ms |
142436 KB |
Output is correct |
115 |
Correct |
1117 ms |
141284 KB |
Output is correct |
116 |
Correct |
1128 ms |
142028 KB |
Output is correct |
117 |
Correct |
1074 ms |
140400 KB |
Output is correct |
118 |
Correct |
1085 ms |
140020 KB |
Output is correct |
119 |
Correct |
1077 ms |
142052 KB |
Output is correct |
120 |
Correct |
1212 ms |
154968 KB |
Output is correct |
121 |
Correct |
1186 ms |
152020 KB |
Output is correct |
122 |
Correct |
1284 ms |
156140 KB |
Output is correct |
123 |
Correct |
551 ms |
108276 KB |
Output is correct |
124 |
Correct |
605 ms |
132288 KB |
Output is correct |
125 |
Correct |
406 ms |
108772 KB |
Output is correct |
126 |
Correct |
1133 ms |
155500 KB |
Output is correct |
127 |
Correct |
1139 ms |
155248 KB |
Output is correct |
128 |
Correct |
1134 ms |
157948 KB |
Output is correct |
129 |
Correct |
1162 ms |
157980 KB |
Output is correct |
130 |
Correct |
1281 ms |
163556 KB |
Output is correct |
131 |
Correct |
1383 ms |
163300 KB |
Output is correct |
132 |
Correct |
1299 ms |
155368 KB |
Output is correct |
133 |
Correct |
1313 ms |
166372 KB |
Output is correct |
134 |
Correct |
450 ms |
99960 KB |
Output is correct |
135 |
Correct |
1212 ms |
162456 KB |
Output is correct |
136 |
Correct |
1184 ms |
162436 KB |
Output is correct |
137 |
Correct |
1222 ms |
165492 KB |
Output is correct |
138 |
Correct |
1272 ms |
164976 KB |
Output is correct |
139 |
Correct |
322 ms |
72940 KB |
Output is correct |
140 |
Correct |
381 ms |
80376 KB |
Output is correct |
141 |
Correct |
370 ms |
79096 KB |
Output is correct |
142 |
Correct |
380 ms |
80804 KB |
Output is correct |
143 |
Correct |
1041 ms |
135716 KB |
Output is correct |
144 |
Correct |
1053 ms |
132328 KB |
Output is correct |
145 |
Correct |
1081 ms |
136936 KB |
Output is correct |
146 |
Correct |
938 ms |
126436 KB |
Output is correct |
147 |
Correct |
1106 ms |
141540 KB |
Output is correct |
148 |
Correct |
1095 ms |
139044 KB |
Output is correct |
149 |
Correct |
1095 ms |
149996 KB |
Output is correct |
150 |
Correct |
1066 ms |
145388 KB |
Output is correct |
151 |
Correct |
440 ms |
97848 KB |
Output is correct |
152 |
Correct |
1231 ms |
155236 KB |
Output is correct |
153 |
Correct |
1177 ms |
150244 KB |
Output is correct |
154 |
Correct |
433 ms |
108932 KB |
Output is correct |
155 |
Correct |
924 ms |
119276 KB |
Output is correct |
156 |
Correct |
811 ms |
108912 KB |
Output is correct |
157 |
Correct |
738 ms |
103132 KB |
Output is correct |
158 |
Correct |
640 ms |
97776 KB |
Output is correct |
159 |
Correct |
554 ms |
88696 KB |
Output is correct |
160 |
Correct |
860 ms |
125292 KB |
Output is correct |
161 |
Correct |
902 ms |
122092 KB |
Output is correct |
162 |
Correct |
878 ms |
124136 KB |
Output is correct |
163 |
Correct |
902 ms |
124060 KB |
Output is correct |