#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define pll pair <ll,ll>
#define fi first
#define se second
#define sz(a) (ll((a).size()))
const ll MAXN = 1e5;
pll pnt[MAXN + 100];
map <ll,vector <ll> > mp_row,mp_col,mp_sum,mp_dif;
ll n;
vector <ll> real[MAXN+100][4];
vector <pll> g[MAXN*10+100];
vector <ll> all;
map <ll,ll> row_st,row_en,col_st,col_en,sum_st,sum_en,dif_st,dif_en;
ll dir[MAXN*10+100];
ll dist[MAXN*10+100];
const ll INF = 1e18;
ll iright(ll x){
if (x==-1)return 0;
return n+1+x*2;
}
ll ileft(ll x){
if (x==-1)return 0;
return n+1+x*2+1;
}
ll f(ll st, ll en, ll val, bool Ox, bool large){
if (Ox){
if (large){
auto sus = lower_bound(all.begin()+st,all.begin()+en,val,[&](ll x, ll y){return pnt[x].fi < y;});
if (sus != all.begin()+en)return sus-all.begin();
else return -1;
}
else{
auto sus = upper_bound(all.begin()+st,all.begin()+en,val,[&](ll x, ll y){return x < pnt[y].fi;});
if (sus != all.begin()+st)return sus-all.begin()-1;
else return -1;
}
}
else{
if (large){
auto sus = lower_bound(all.begin()+st,all.begin()+en,val,[&](ll x, ll y){return pnt[x].se < y;});
if (sus != all.begin()+en)return sus-all.begin();
else return -1;
}
else{
auto sus = upper_bound(all.begin()+st,all.begin()+en,val,[&](ll x, ll y){return x < pnt[y].se;});
if (sus != all.begin()+st)return sus-all.begin()-1;
else return -1;
}
}
}
ll dijkstra(ll sussy){
priority_queue <pll,vector <pll>, greater <pll> > q;
for (ll i = 1;i <= n*10+10;i++)dist[i]=INF;
{
auto add = [&](ll v,ll dir_v,ll dist_v){
if (dist_v >= dist[v])return;
dir[v] = dir_v;
dist[v] = dist_v;
q.push({dist_v,v});
};
add(1,sussy,0);
}
dist[0] = -1;
while (!q.empty()){
ll u = q.top().se;
ll val = q.top().fi;
q.pop();
if (val != dist[u])continue;
// if (u <= n)//cout<<u<<' '<<dist[u]<<' '<<dir[u]<<endl;
// else{
//// cout<<u<<' '<<all[(u-(n+1))/2]<<' '<<dist[u]<<' '<<dir[u]<<endl;
// }
auto add = [&](ll v,ll dir_v,ll dist_v){
if (dist_v >= dist[v])return;
// cout<<"EDGE "<<u<<' '<<v<<' '<<dist_v<<endl;
dir[v] = dir_v;
dist[v] = dist_v;
q.push({dist_v,v});
};
if (u <= n){
if (u == 1)dist[u] = 1;
auto d1 = [&](ll x,ll y){return max(abs(pnt[x].fi-pnt[y].fi),abs(pnt[x].se-pnt[y].se));};
ll pivot;
if (dir[u] == 0){
pivot = f(row_st[pnt[u].se],row_en[pnt[u].se],pnt[u].fi - dist[u],1,0);
if (pivot != -1)add(ileft(pivot),3,d1(all[pivot],u));
pivot = f(dif_st[pnt[u].fi-pnt[u].se],dif_en[pnt[u].fi-pnt[u].se],pnt[u].fi - (dist[u]+1)/2,1,0);
if (pivot != -1)add(ileft(pivot),1,d1(all[pivot],u) * 2);
pivot = f(sum_st[pnt[u].fi+pnt[u].se],sum_en[pnt[u].fi+pnt[u].se],pnt[u].fi - (dist[u]+1)/2,1,0);
if (pivot != -1)add(ileft(pivot),2,d1(all[pivot],u) * 2);
}
else if (dir[u] == 1){
pivot = f(col_st[pnt[u].fi],col_en[pnt[u].fi],pnt[u].se + dist[u],0,1);
if (pivot != -1)add(iright(pivot),2,d1(all[pivot],u));
pivot = f(dif_st[pnt[u].fi-pnt[u].se],dif_en[pnt[u].fi-pnt[u].se],pnt[u].fi + (dist[u]+1)/2,1,1);
if (pivot != -1)add(iright(pivot),0,d1(all[pivot],u) * 2);
pivot = f(sum_st[pnt[u].fi+pnt[u].se],sum_en[pnt[u].fi+pnt[u].se],pnt[u].fi - (dist[u]+1)/2,1,0);
if (pivot != -1)add(ileft(pivot),3,d1(all[pivot],u) * 2);
}
else if (dir[u] == 2){
pivot = f(col_st[pnt[u].fi],col_en[pnt[u].fi],pnt[u].se - dist[u],0,0);
if (pivot != -1)add(ileft(pivot),1,d1(all[pivot],u));
pivot = f(dif_st[pnt[u].fi-pnt[u].se],dif_en[pnt[u].fi-pnt[u].se],pnt[u].fi - (dist[u]+1)/2,1,0);
if (pivot != -1)add(ileft(pivot),3,d1(all[pivot],u) * 2);
pivot = f(sum_st[pnt[u].fi+pnt[u].se],sum_en[pnt[u].fi+pnt[u].se],pnt[u].fi + (dist[u]+1)/2,1,1);
if (pivot != -1)add(iright(pivot),0,d1(all[pivot],u) * 2);
}
else{
pivot = f(row_st[pnt[u].se],row_en[pnt[u].se],pnt[u].fi + dist[u],1,1);
if (pivot != -1)add(iright(pivot),0,d1(all[pivot],u));
pivot = f(dif_st[pnt[u].fi-pnt[u].se],dif_en[pnt[u].fi-pnt[u].se],pnt[u].fi + (dist[u]+1)/2,1,1);
if (pivot != -1)add(iright(pivot),2,d1(all[pivot],u) * 2);
pivot = f(sum_st[pnt[u].fi+pnt[u].se],sum_en[pnt[u].fi+pnt[u].se],pnt[u].fi + (dist[u]+1)/2,1,1);
if (pivot != -1)add(iright(pivot),1,d1(all[pivot],u) * 2);
}
if (u == 1)dist[u] = 0;
}
else{
for (auto tmp:g[u]){
ll v = tmp.fi;
ll w = tmp.se;
add(v,dir[u],dist[u]+w);
}
}
}
ll res = 0;
for (ll i = 1;i <= n;i++)res += dist[i] != INF;
return res;
}
int main(){
ios_base::sync_with_stdio(0);cin.tie(nullptr);cout.tie(nullptr);
cin>>n;
for (ll i = 1;i <= n;i ++)cin>>pnt[i].fi>>pnt[i].se;
for (ll i = 1;i <= n;i ++){
mp_col[pnt[i].fi].push_back(i);
mp_row[pnt[i].se].push_back(i);
mp_sum[pnt[i].fi+pnt[i].se].push_back(i);
mp_dif[pnt[i].fi-pnt[i].se].push_back(i);
}
for (auto &x:mp_col){
sort(x.se.begin(),x.se.end(),[&](ll &xx,ll &y){return pnt[xx].se < pnt[y].se;});
}
for (auto &x:mp_row){
sort(x.se.begin(),x.se.end(),[&](ll &xx,ll &y){return pnt[xx].fi < pnt[y].fi;});
}
for (auto &x:mp_sum){
sort(x.se.begin(),x.se.end(),[&](ll &xx,ll &y){return pnt[xx].fi < pnt[y].fi;});
}
for (auto &x:mp_dif){
sort(x.se.begin(),x.se.end(),[&](ll &xx,ll &y){return pnt[xx].fi < pnt[y].fi;});
}
auto f1 = [&](map <ll,vector <ll> > &mp,map<ll,ll> &st, map <ll,ll> &en,ll w){
auto d1 = [&](ll x,ll y){return max(abs(pnt[x].fi-pnt[y].fi),abs(pnt[x].se-pnt[y].se));};
for (auto x:mp){
st[x.fi] = sz(all);
auto &tmp = x.se;
for (ll j = 0;j < sz(tmp);j ++){
if (j + 1 < sz(tmp))g[iright(sz(all))].push_back({iright(sz(all)+1),w * d1(tmp[j],tmp[j+1])});
if (j - 1 >= 0)g[ileft(sz(all))].push_back({ileft(sz(all) - 1),w * d1(tmp[j],tmp[j-1])});
g[iright(sz(all))].push_back({tmp[j],0});
g[ileft(sz(all))].push_back({tmp[j],0});
all.push_back(tmp[j]);
}
en[x.fi] = sz(all);
}
};
f1(mp_col,col_st,col_en,1);
f1(mp_row,row_st,row_en,1);
f1(mp_sum,sum_st,sum_en,2);
f1(mp_dif,dif_st,dif_en,2);
// for (auto x:all){
// cout<<x<<' ';
// }
// cout<<'\n';
// cout<<dijkstra(3)<<'\n';
cout<<max({dijkstra(0),dijkstra(1),dijkstra(2),dijkstra(3)});
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
37212 KB |
Output is correct |
2 |
Correct |
10 ms |
37208 KB |
Output is correct |
3 |
Correct |
10 ms |
37212 KB |
Output is correct |
4 |
Correct |
10 ms |
37208 KB |
Output is correct |
5 |
Correct |
11 ms |
37212 KB |
Output is correct |
6 |
Correct |
10 ms |
37212 KB |
Output is correct |
7 |
Correct |
11 ms |
37212 KB |
Output is correct |
8 |
Correct |
10 ms |
37212 KB |
Output is correct |
9 |
Correct |
11 ms |
37320 KB |
Output is correct |
10 |
Correct |
11 ms |
37212 KB |
Output is correct |
11 |
Correct |
11 ms |
37212 KB |
Output is correct |
12 |
Correct |
10 ms |
37212 KB |
Output is correct |
13 |
Correct |
11 ms |
37212 KB |
Output is correct |
14 |
Correct |
10 ms |
37212 KB |
Output is correct |
15 |
Correct |
11 ms |
37208 KB |
Output is correct |
16 |
Correct |
11 ms |
37208 KB |
Output is correct |
17 |
Correct |
10 ms |
37212 KB |
Output is correct |
18 |
Correct |
11 ms |
37208 KB |
Output is correct |
19 |
Correct |
11 ms |
37212 KB |
Output is correct |
20 |
Correct |
11 ms |
37208 KB |
Output is correct |
21 |
Correct |
10 ms |
37348 KB |
Output is correct |
22 |
Correct |
10 ms |
37212 KB |
Output is correct |
23 |
Correct |
10 ms |
37212 KB |
Output is correct |
24 |
Correct |
11 ms |
37212 KB |
Output is correct |
25 |
Correct |
11 ms |
37212 KB |
Output is correct |
26 |
Correct |
10 ms |
37212 KB |
Output is correct |
27 |
Correct |
11 ms |
37352 KB |
Output is correct |
28 |
Correct |
9 ms |
37212 KB |
Output is correct |
29 |
Correct |
10 ms |
37208 KB |
Output is correct |
30 |
Correct |
10 ms |
37212 KB |
Output is correct |
31 |
Correct |
10 ms |
37212 KB |
Output is correct |
32 |
Correct |
10 ms |
37212 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
37212 KB |
Output is correct |
2 |
Correct |
10 ms |
37208 KB |
Output is correct |
3 |
Correct |
10 ms |
37212 KB |
Output is correct |
4 |
Correct |
10 ms |
37208 KB |
Output is correct |
5 |
Correct |
11 ms |
37212 KB |
Output is correct |
6 |
Correct |
10 ms |
37212 KB |
Output is correct |
7 |
Correct |
11 ms |
37212 KB |
Output is correct |
8 |
Correct |
10 ms |
37212 KB |
Output is correct |
9 |
Correct |
11 ms |
37320 KB |
Output is correct |
10 |
Correct |
11 ms |
37212 KB |
Output is correct |
11 |
Correct |
11 ms |
37212 KB |
Output is correct |
12 |
Correct |
10 ms |
37212 KB |
Output is correct |
13 |
Correct |
11 ms |
37212 KB |
Output is correct |
14 |
Correct |
10 ms |
37212 KB |
Output is correct |
15 |
Correct |
11 ms |
37208 KB |
Output is correct |
16 |
Correct |
11 ms |
37208 KB |
Output is correct |
17 |
Correct |
10 ms |
37212 KB |
Output is correct |
18 |
Correct |
11 ms |
37208 KB |
Output is correct |
19 |
Correct |
11 ms |
37212 KB |
Output is correct |
20 |
Correct |
11 ms |
37208 KB |
Output is correct |
21 |
Correct |
10 ms |
37348 KB |
Output is correct |
22 |
Correct |
10 ms |
37212 KB |
Output is correct |
23 |
Correct |
10 ms |
37212 KB |
Output is correct |
24 |
Correct |
11 ms |
37212 KB |
Output is correct |
25 |
Correct |
11 ms |
37212 KB |
Output is correct |
26 |
Correct |
10 ms |
37212 KB |
Output is correct |
27 |
Correct |
11 ms |
37352 KB |
Output is correct |
28 |
Correct |
9 ms |
37212 KB |
Output is correct |
29 |
Correct |
10 ms |
37208 KB |
Output is correct |
30 |
Correct |
10 ms |
37212 KB |
Output is correct |
31 |
Correct |
10 ms |
37212 KB |
Output is correct |
32 |
Correct |
10 ms |
37212 KB |
Output is correct |
33 |
Correct |
11 ms |
37212 KB |
Output is correct |
34 |
Correct |
11 ms |
37212 KB |
Output is correct |
35 |
Correct |
11 ms |
37212 KB |
Output is correct |
36 |
Correct |
10 ms |
37208 KB |
Output is correct |
37 |
Correct |
10 ms |
37212 KB |
Output is correct |
38 |
Correct |
11 ms |
37208 KB |
Output is correct |
39 |
Correct |
11 ms |
37420 KB |
Output is correct |
40 |
Correct |
11 ms |
37212 KB |
Output is correct |
41 |
Correct |
10 ms |
37212 KB |
Output is correct |
42 |
Correct |
10 ms |
37212 KB |
Output is correct |
43 |
Correct |
10 ms |
37344 KB |
Output is correct |
44 |
Correct |
10 ms |
37212 KB |
Output is correct |
45 |
Correct |
10 ms |
37360 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
37468 KB |
Output is correct |
2 |
Correct |
10 ms |
37468 KB |
Output is correct |
3 |
Correct |
11 ms |
37464 KB |
Output is correct |
4 |
Correct |
12 ms |
37468 KB |
Output is correct |
5 |
Correct |
13 ms |
37468 KB |
Output is correct |
6 |
Correct |
11 ms |
37720 KB |
Output is correct |
7 |
Correct |
12 ms |
37468 KB |
Output is correct |
8 |
Correct |
11 ms |
37468 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
37212 KB |
Output is correct |
2 |
Correct |
10 ms |
37208 KB |
Output is correct |
3 |
Correct |
10 ms |
37212 KB |
Output is correct |
4 |
Correct |
10 ms |
37208 KB |
Output is correct |
5 |
Correct |
11 ms |
37212 KB |
Output is correct |
6 |
Correct |
10 ms |
37212 KB |
Output is correct |
7 |
Correct |
11 ms |
37212 KB |
Output is correct |
8 |
Correct |
10 ms |
37212 KB |
Output is correct |
9 |
Correct |
11 ms |
37320 KB |
Output is correct |
10 |
Correct |
11 ms |
37212 KB |
Output is correct |
11 |
Correct |
11 ms |
37212 KB |
Output is correct |
12 |
Correct |
10 ms |
37212 KB |
Output is correct |
13 |
Correct |
11 ms |
37212 KB |
Output is correct |
14 |
Correct |
10 ms |
37212 KB |
Output is correct |
15 |
Correct |
11 ms |
37208 KB |
Output is correct |
16 |
Correct |
11 ms |
37208 KB |
Output is correct |
17 |
Correct |
10 ms |
37212 KB |
Output is correct |
18 |
Correct |
11 ms |
37208 KB |
Output is correct |
19 |
Correct |
11 ms |
37212 KB |
Output is correct |
20 |
Correct |
11 ms |
37208 KB |
Output is correct |
21 |
Correct |
10 ms |
37348 KB |
Output is correct |
22 |
Correct |
10 ms |
37212 KB |
Output is correct |
23 |
Correct |
10 ms |
37212 KB |
Output is correct |
24 |
Correct |
11 ms |
37212 KB |
Output is correct |
25 |
Correct |
11 ms |
37212 KB |
Output is correct |
26 |
Correct |
10 ms |
37212 KB |
Output is correct |
27 |
Correct |
11 ms |
37352 KB |
Output is correct |
28 |
Correct |
9 ms |
37212 KB |
Output is correct |
29 |
Correct |
10 ms |
37208 KB |
Output is correct |
30 |
Correct |
10 ms |
37212 KB |
Output is correct |
31 |
Correct |
10 ms |
37212 KB |
Output is correct |
32 |
Correct |
10 ms |
37212 KB |
Output is correct |
33 |
Correct |
11 ms |
37212 KB |
Output is correct |
34 |
Correct |
11 ms |
37212 KB |
Output is correct |
35 |
Correct |
11 ms |
37212 KB |
Output is correct |
36 |
Correct |
10 ms |
37208 KB |
Output is correct |
37 |
Correct |
10 ms |
37212 KB |
Output is correct |
38 |
Correct |
11 ms |
37208 KB |
Output is correct |
39 |
Correct |
11 ms |
37420 KB |
Output is correct |
40 |
Correct |
11 ms |
37212 KB |
Output is correct |
41 |
Correct |
10 ms |
37212 KB |
Output is correct |
42 |
Correct |
10 ms |
37212 KB |
Output is correct |
43 |
Correct |
10 ms |
37344 KB |
Output is correct |
44 |
Correct |
10 ms |
37212 KB |
Output is correct |
45 |
Correct |
10 ms |
37360 KB |
Output is correct |
46 |
Correct |
11 ms |
37468 KB |
Output is correct |
47 |
Correct |
10 ms |
37468 KB |
Output is correct |
48 |
Correct |
11 ms |
37464 KB |
Output is correct |
49 |
Correct |
12 ms |
37468 KB |
Output is correct |
50 |
Correct |
13 ms |
37468 KB |
Output is correct |
51 |
Correct |
11 ms |
37720 KB |
Output is correct |
52 |
Correct |
12 ms |
37468 KB |
Output is correct |
53 |
Correct |
11 ms |
37468 KB |
Output is correct |
54 |
Correct |
10 ms |
37720 KB |
Output is correct |
55 |
Correct |
11 ms |
37464 KB |
Output is correct |
56 |
Correct |
10 ms |
37536 KB |
Output is correct |
57 |
Correct |
11 ms |
37468 KB |
Output is correct |
58 |
Correct |
11 ms |
37468 KB |
Output is correct |
59 |
Correct |
10 ms |
37524 KB |
Output is correct |
60 |
Correct |
10 ms |
37468 KB |
Output is correct |
61 |
Correct |
10 ms |
37516 KB |
Output is correct |
62 |
Correct |
10 ms |
37468 KB |
Output is correct |
63 |
Correct |
11 ms |
37340 KB |
Output is correct |
64 |
Correct |
11 ms |
37340 KB |
Output is correct |
65 |
Correct |
12 ms |
37464 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
37212 KB |
Output is correct |
2 |
Correct |
10 ms |
37208 KB |
Output is correct |
3 |
Correct |
10 ms |
37212 KB |
Output is correct |
4 |
Correct |
10 ms |
37208 KB |
Output is correct |
5 |
Correct |
11 ms |
37212 KB |
Output is correct |
6 |
Correct |
10 ms |
37212 KB |
Output is correct |
7 |
Correct |
11 ms |
37212 KB |
Output is correct |
8 |
Correct |
10 ms |
37212 KB |
Output is correct |
9 |
Correct |
11 ms |
37320 KB |
Output is correct |
10 |
Correct |
11 ms |
37212 KB |
Output is correct |
11 |
Correct |
11 ms |
37212 KB |
Output is correct |
12 |
Correct |
10 ms |
37212 KB |
Output is correct |
13 |
Correct |
11 ms |
37212 KB |
Output is correct |
14 |
Correct |
10 ms |
37212 KB |
Output is correct |
15 |
Correct |
11 ms |
37208 KB |
Output is correct |
16 |
Correct |
11 ms |
37208 KB |
Output is correct |
17 |
Correct |
10 ms |
37212 KB |
Output is correct |
18 |
Correct |
11 ms |
37208 KB |
Output is correct |
19 |
Correct |
11 ms |
37212 KB |
Output is correct |
20 |
Correct |
11 ms |
37208 KB |
Output is correct |
21 |
Correct |
10 ms |
37348 KB |
Output is correct |
22 |
Correct |
10 ms |
37212 KB |
Output is correct |
23 |
Correct |
10 ms |
37212 KB |
Output is correct |
24 |
Correct |
11 ms |
37212 KB |
Output is correct |
25 |
Correct |
11 ms |
37212 KB |
Output is correct |
26 |
Correct |
10 ms |
37212 KB |
Output is correct |
27 |
Correct |
11 ms |
37352 KB |
Output is correct |
28 |
Correct |
9 ms |
37212 KB |
Output is correct |
29 |
Correct |
10 ms |
37208 KB |
Output is correct |
30 |
Correct |
10 ms |
37212 KB |
Output is correct |
31 |
Correct |
10 ms |
37212 KB |
Output is correct |
32 |
Correct |
10 ms |
37212 KB |
Output is correct |
33 |
Correct |
11 ms |
37212 KB |
Output is correct |
34 |
Correct |
11 ms |
37212 KB |
Output is correct |
35 |
Correct |
11 ms |
37212 KB |
Output is correct |
36 |
Correct |
10 ms |
37208 KB |
Output is correct |
37 |
Correct |
10 ms |
37212 KB |
Output is correct |
38 |
Correct |
11 ms |
37208 KB |
Output is correct |
39 |
Correct |
11 ms |
37420 KB |
Output is correct |
40 |
Correct |
11 ms |
37212 KB |
Output is correct |
41 |
Correct |
10 ms |
37212 KB |
Output is correct |
42 |
Correct |
10 ms |
37212 KB |
Output is correct |
43 |
Correct |
10 ms |
37344 KB |
Output is correct |
44 |
Correct |
10 ms |
37212 KB |
Output is correct |
45 |
Correct |
10 ms |
37360 KB |
Output is correct |
46 |
Correct |
11 ms |
37468 KB |
Output is correct |
47 |
Correct |
10 ms |
37468 KB |
Output is correct |
48 |
Correct |
11 ms |
37464 KB |
Output is correct |
49 |
Correct |
12 ms |
37468 KB |
Output is correct |
50 |
Correct |
13 ms |
37468 KB |
Output is correct |
51 |
Correct |
11 ms |
37720 KB |
Output is correct |
52 |
Correct |
12 ms |
37468 KB |
Output is correct |
53 |
Correct |
11 ms |
37468 KB |
Output is correct |
54 |
Correct |
10 ms |
37720 KB |
Output is correct |
55 |
Correct |
11 ms |
37464 KB |
Output is correct |
56 |
Correct |
10 ms |
37536 KB |
Output is correct |
57 |
Correct |
11 ms |
37468 KB |
Output is correct |
58 |
Correct |
11 ms |
37468 KB |
Output is correct |
59 |
Correct |
10 ms |
37524 KB |
Output is correct |
60 |
Correct |
10 ms |
37468 KB |
Output is correct |
61 |
Correct |
10 ms |
37516 KB |
Output is correct |
62 |
Correct |
10 ms |
37468 KB |
Output is correct |
63 |
Correct |
11 ms |
37340 KB |
Output is correct |
64 |
Correct |
11 ms |
37340 KB |
Output is correct |
65 |
Correct |
12 ms |
37464 KB |
Output is correct |
66 |
Correct |
19 ms |
42844 KB |
Output is correct |
67 |
Correct |
21 ms |
42844 KB |
Output is correct |
68 |
Correct |
22 ms |
43088 KB |
Output is correct |
69 |
Correct |
23 ms |
41136 KB |
Output is correct |
70 |
Correct |
18 ms |
41308 KB |
Output is correct |
71 |
Correct |
16 ms |
41304 KB |
Output is correct |
72 |
Correct |
19 ms |
42556 KB |
Output is correct |
73 |
Correct |
20 ms |
43100 KB |
Output is correct |
74 |
Correct |
20 ms |
42784 KB |
Output is correct |
75 |
Correct |
22 ms |
42584 KB |
Output is correct |
76 |
Correct |
20 ms |
42844 KB |
Output is correct |
77 |
Correct |
20 ms |
42588 KB |
Output is correct |
78 |
Correct |
21 ms |
42836 KB |
Output is correct |
79 |
Correct |
21 ms |
42840 KB |
Output is correct |
80 |
Correct |
20 ms |
43260 KB |
Output is correct |
81 |
Correct |
21 ms |
42844 KB |
Output is correct |
82 |
Correct |
21 ms |
42584 KB |
Output is correct |
83 |
Correct |
22 ms |
42584 KB |
Output is correct |
84 |
Correct |
17 ms |
41820 KB |
Output is correct |
85 |
Correct |
15 ms |
41052 KB |
Output is correct |
86 |
Correct |
14 ms |
40900 KB |
Output is correct |
87 |
Correct |
15 ms |
41352 KB |
Output is correct |
88 |
Correct |
21 ms |
42724 KB |
Output is correct |
89 |
Correct |
21 ms |
42588 KB |
Output is correct |
90 |
Correct |
21 ms |
42584 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
37212 KB |
Output is correct |
2 |
Correct |
10 ms |
37208 KB |
Output is correct |
3 |
Correct |
10 ms |
37212 KB |
Output is correct |
4 |
Correct |
10 ms |
37208 KB |
Output is correct |
5 |
Correct |
11 ms |
37212 KB |
Output is correct |
6 |
Correct |
10 ms |
37212 KB |
Output is correct |
7 |
Correct |
11 ms |
37212 KB |
Output is correct |
8 |
Correct |
10 ms |
37212 KB |
Output is correct |
9 |
Correct |
11 ms |
37320 KB |
Output is correct |
10 |
Correct |
11 ms |
37212 KB |
Output is correct |
11 |
Correct |
11 ms |
37212 KB |
Output is correct |
12 |
Correct |
10 ms |
37212 KB |
Output is correct |
13 |
Correct |
11 ms |
37212 KB |
Output is correct |
14 |
Correct |
10 ms |
37212 KB |
Output is correct |
15 |
Correct |
11 ms |
37208 KB |
Output is correct |
16 |
Correct |
11 ms |
37208 KB |
Output is correct |
17 |
Correct |
10 ms |
37212 KB |
Output is correct |
18 |
Correct |
11 ms |
37208 KB |
Output is correct |
19 |
Correct |
11 ms |
37212 KB |
Output is correct |
20 |
Correct |
11 ms |
37208 KB |
Output is correct |
21 |
Correct |
10 ms |
37348 KB |
Output is correct |
22 |
Correct |
10 ms |
37212 KB |
Output is correct |
23 |
Correct |
10 ms |
37212 KB |
Output is correct |
24 |
Correct |
11 ms |
37212 KB |
Output is correct |
25 |
Correct |
11 ms |
37212 KB |
Output is correct |
26 |
Correct |
10 ms |
37212 KB |
Output is correct |
27 |
Correct |
11 ms |
37352 KB |
Output is correct |
28 |
Correct |
9 ms |
37212 KB |
Output is correct |
29 |
Correct |
10 ms |
37208 KB |
Output is correct |
30 |
Correct |
10 ms |
37212 KB |
Output is correct |
31 |
Correct |
10 ms |
37212 KB |
Output is correct |
32 |
Correct |
10 ms |
37212 KB |
Output is correct |
33 |
Correct |
11 ms |
37212 KB |
Output is correct |
34 |
Correct |
11 ms |
37212 KB |
Output is correct |
35 |
Correct |
11 ms |
37212 KB |
Output is correct |
36 |
Correct |
10 ms |
37208 KB |
Output is correct |
37 |
Correct |
10 ms |
37212 KB |
Output is correct |
38 |
Correct |
11 ms |
37208 KB |
Output is correct |
39 |
Correct |
11 ms |
37420 KB |
Output is correct |
40 |
Correct |
11 ms |
37212 KB |
Output is correct |
41 |
Correct |
10 ms |
37212 KB |
Output is correct |
42 |
Correct |
10 ms |
37212 KB |
Output is correct |
43 |
Correct |
10 ms |
37344 KB |
Output is correct |
44 |
Correct |
10 ms |
37212 KB |
Output is correct |
45 |
Correct |
10 ms |
37360 KB |
Output is correct |
46 |
Correct |
11 ms |
37468 KB |
Output is correct |
47 |
Correct |
10 ms |
37468 KB |
Output is correct |
48 |
Correct |
11 ms |
37464 KB |
Output is correct |
49 |
Correct |
12 ms |
37468 KB |
Output is correct |
50 |
Correct |
13 ms |
37468 KB |
Output is correct |
51 |
Correct |
11 ms |
37720 KB |
Output is correct |
52 |
Correct |
12 ms |
37468 KB |
Output is correct |
53 |
Correct |
11 ms |
37468 KB |
Output is correct |
54 |
Correct |
10 ms |
37720 KB |
Output is correct |
55 |
Correct |
11 ms |
37464 KB |
Output is correct |
56 |
Correct |
10 ms |
37536 KB |
Output is correct |
57 |
Correct |
11 ms |
37468 KB |
Output is correct |
58 |
Correct |
11 ms |
37468 KB |
Output is correct |
59 |
Correct |
10 ms |
37524 KB |
Output is correct |
60 |
Correct |
10 ms |
37468 KB |
Output is correct |
61 |
Correct |
10 ms |
37516 KB |
Output is correct |
62 |
Correct |
10 ms |
37468 KB |
Output is correct |
63 |
Correct |
11 ms |
37340 KB |
Output is correct |
64 |
Correct |
11 ms |
37340 KB |
Output is correct |
65 |
Correct |
12 ms |
37464 KB |
Output is correct |
66 |
Correct |
580 ms |
137340 KB |
Output is correct |
67 |
Correct |
697 ms |
159064 KB |
Output is correct |
68 |
Correct |
765 ms |
168376 KB |
Output is correct |
69 |
Correct |
597 ms |
152756 KB |
Output is correct |
70 |
Correct |
818 ms |
154348 KB |
Output is correct |
71 |
Correct |
817 ms |
175444 KB |
Output is correct |
72 |
Correct |
751 ms |
171764 KB |
Output is correct |
73 |
Correct |
704 ms |
155172 KB |
Output is correct |
74 |
Correct |
791 ms |
172628 KB |
Output is correct |
75 |
Correct |
803 ms |
171184 KB |
Output is correct |
76 |
Correct |
704 ms |
155252 KB |
Output is correct |
77 |
Correct |
776 ms |
173116 KB |
Output is correct |
78 |
Correct |
813 ms |
154160 KB |
Output is correct |
79 |
Correct |
797 ms |
154080 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
37212 KB |
Output is correct |
2 |
Correct |
10 ms |
37208 KB |
Output is correct |
3 |
Correct |
10 ms |
37212 KB |
Output is correct |
4 |
Correct |
10 ms |
37208 KB |
Output is correct |
5 |
Correct |
11 ms |
37212 KB |
Output is correct |
6 |
Correct |
10 ms |
37212 KB |
Output is correct |
7 |
Correct |
11 ms |
37212 KB |
Output is correct |
8 |
Correct |
10 ms |
37212 KB |
Output is correct |
9 |
Correct |
11 ms |
37320 KB |
Output is correct |
10 |
Correct |
11 ms |
37212 KB |
Output is correct |
11 |
Correct |
11 ms |
37212 KB |
Output is correct |
12 |
Correct |
10 ms |
37212 KB |
Output is correct |
13 |
Correct |
11 ms |
37212 KB |
Output is correct |
14 |
Correct |
10 ms |
37212 KB |
Output is correct |
15 |
Correct |
11 ms |
37208 KB |
Output is correct |
16 |
Correct |
11 ms |
37208 KB |
Output is correct |
17 |
Correct |
10 ms |
37212 KB |
Output is correct |
18 |
Correct |
11 ms |
37208 KB |
Output is correct |
19 |
Correct |
11 ms |
37212 KB |
Output is correct |
20 |
Correct |
11 ms |
37208 KB |
Output is correct |
21 |
Correct |
10 ms |
37348 KB |
Output is correct |
22 |
Correct |
10 ms |
37212 KB |
Output is correct |
23 |
Correct |
10 ms |
37212 KB |
Output is correct |
24 |
Correct |
11 ms |
37212 KB |
Output is correct |
25 |
Correct |
11 ms |
37212 KB |
Output is correct |
26 |
Correct |
10 ms |
37212 KB |
Output is correct |
27 |
Correct |
11 ms |
37352 KB |
Output is correct |
28 |
Correct |
9 ms |
37212 KB |
Output is correct |
29 |
Correct |
10 ms |
37208 KB |
Output is correct |
30 |
Correct |
10 ms |
37212 KB |
Output is correct |
31 |
Correct |
10 ms |
37212 KB |
Output is correct |
32 |
Correct |
10 ms |
37212 KB |
Output is correct |
33 |
Correct |
11 ms |
37212 KB |
Output is correct |
34 |
Correct |
11 ms |
37212 KB |
Output is correct |
35 |
Correct |
11 ms |
37212 KB |
Output is correct |
36 |
Correct |
10 ms |
37208 KB |
Output is correct |
37 |
Correct |
10 ms |
37212 KB |
Output is correct |
38 |
Correct |
11 ms |
37208 KB |
Output is correct |
39 |
Correct |
11 ms |
37420 KB |
Output is correct |
40 |
Correct |
11 ms |
37212 KB |
Output is correct |
41 |
Correct |
10 ms |
37212 KB |
Output is correct |
42 |
Correct |
10 ms |
37212 KB |
Output is correct |
43 |
Correct |
10 ms |
37344 KB |
Output is correct |
44 |
Correct |
10 ms |
37212 KB |
Output is correct |
45 |
Correct |
10 ms |
37360 KB |
Output is correct |
46 |
Correct |
11 ms |
37468 KB |
Output is correct |
47 |
Correct |
10 ms |
37468 KB |
Output is correct |
48 |
Correct |
11 ms |
37464 KB |
Output is correct |
49 |
Correct |
12 ms |
37468 KB |
Output is correct |
50 |
Correct |
13 ms |
37468 KB |
Output is correct |
51 |
Correct |
11 ms |
37720 KB |
Output is correct |
52 |
Correct |
12 ms |
37468 KB |
Output is correct |
53 |
Correct |
11 ms |
37468 KB |
Output is correct |
54 |
Correct |
10 ms |
37720 KB |
Output is correct |
55 |
Correct |
11 ms |
37464 KB |
Output is correct |
56 |
Correct |
10 ms |
37536 KB |
Output is correct |
57 |
Correct |
11 ms |
37468 KB |
Output is correct |
58 |
Correct |
11 ms |
37468 KB |
Output is correct |
59 |
Correct |
10 ms |
37524 KB |
Output is correct |
60 |
Correct |
10 ms |
37468 KB |
Output is correct |
61 |
Correct |
10 ms |
37516 KB |
Output is correct |
62 |
Correct |
10 ms |
37468 KB |
Output is correct |
63 |
Correct |
11 ms |
37340 KB |
Output is correct |
64 |
Correct |
11 ms |
37340 KB |
Output is correct |
65 |
Correct |
12 ms |
37464 KB |
Output is correct |
66 |
Correct |
19 ms |
42844 KB |
Output is correct |
67 |
Correct |
21 ms |
42844 KB |
Output is correct |
68 |
Correct |
22 ms |
43088 KB |
Output is correct |
69 |
Correct |
23 ms |
41136 KB |
Output is correct |
70 |
Correct |
18 ms |
41308 KB |
Output is correct |
71 |
Correct |
16 ms |
41304 KB |
Output is correct |
72 |
Correct |
19 ms |
42556 KB |
Output is correct |
73 |
Correct |
20 ms |
43100 KB |
Output is correct |
74 |
Correct |
20 ms |
42784 KB |
Output is correct |
75 |
Correct |
22 ms |
42584 KB |
Output is correct |
76 |
Correct |
20 ms |
42844 KB |
Output is correct |
77 |
Correct |
20 ms |
42588 KB |
Output is correct |
78 |
Correct |
21 ms |
42836 KB |
Output is correct |
79 |
Correct |
21 ms |
42840 KB |
Output is correct |
80 |
Correct |
20 ms |
43260 KB |
Output is correct |
81 |
Correct |
21 ms |
42844 KB |
Output is correct |
82 |
Correct |
21 ms |
42584 KB |
Output is correct |
83 |
Correct |
22 ms |
42584 KB |
Output is correct |
84 |
Correct |
17 ms |
41820 KB |
Output is correct |
85 |
Correct |
15 ms |
41052 KB |
Output is correct |
86 |
Correct |
14 ms |
40900 KB |
Output is correct |
87 |
Correct |
15 ms |
41352 KB |
Output is correct |
88 |
Correct |
21 ms |
42724 KB |
Output is correct |
89 |
Correct |
21 ms |
42588 KB |
Output is correct |
90 |
Correct |
21 ms |
42584 KB |
Output is correct |
91 |
Correct |
580 ms |
137340 KB |
Output is correct |
92 |
Correct |
697 ms |
159064 KB |
Output is correct |
93 |
Correct |
765 ms |
168376 KB |
Output is correct |
94 |
Correct |
597 ms |
152756 KB |
Output is correct |
95 |
Correct |
818 ms |
154348 KB |
Output is correct |
96 |
Correct |
817 ms |
175444 KB |
Output is correct |
97 |
Correct |
751 ms |
171764 KB |
Output is correct |
98 |
Correct |
704 ms |
155172 KB |
Output is correct |
99 |
Correct |
791 ms |
172628 KB |
Output is correct |
100 |
Correct |
803 ms |
171184 KB |
Output is correct |
101 |
Correct |
704 ms |
155252 KB |
Output is correct |
102 |
Correct |
776 ms |
173116 KB |
Output is correct |
103 |
Correct |
813 ms |
154160 KB |
Output is correct |
104 |
Correct |
797 ms |
154080 KB |
Output is correct |
105 |
Correct |
397 ms |
88224 KB |
Output is correct |
106 |
Correct |
548 ms |
96708 KB |
Output is correct |
107 |
Correct |
888 ms |
97848 KB |
Output is correct |
108 |
Correct |
779 ms |
98688 KB |
Output is correct |
109 |
Correct |
281 ms |
107944 KB |
Output is correct |
110 |
Correct |
686 ms |
148404 KB |
Output is correct |
111 |
Correct |
863 ms |
168420 KB |
Output is correct |
112 |
Correct |
745 ms |
167552 KB |
Output is correct |
113 |
Correct |
726 ms |
167484 KB |
Output is correct |
114 |
Correct |
1025 ms |
123204 KB |
Output is correct |
115 |
Correct |
662 ms |
154980 KB |
Output is correct |
116 |
Correct |
713 ms |
168128 KB |
Output is correct |
117 |
Correct |
724 ms |
166836 KB |
Output is correct |
118 |
Correct |
829 ms |
144824 KB |
Output is correct |
119 |
Correct |
725 ms |
155060 KB |
Output is correct |
120 |
Correct |
699 ms |
167556 KB |
Output is correct |
121 |
Correct |
767 ms |
169664 KB |
Output is correct |
122 |
Correct |
805 ms |
167608 KB |
Output is correct |
123 |
Correct |
642 ms |
150180 KB |
Output is correct |
124 |
Correct |
665 ms |
152736 KB |
Output is correct |
125 |
Correct |
264 ms |
124300 KB |
Output is correct |
126 |
Correct |
150 ms |
101644 KB |
Output is correct |
127 |
Correct |
158 ms |
98236 KB |
Output is correct |
128 |
Correct |
138 ms |
96948 KB |
Output is correct |
129 |
Correct |
193 ms |
107988 KB |
Output is correct |