# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
292870 |
2020-09-07T14:27:25 Z |
최은수(#5797) |
ROI16_sending (ROI16_sending) |
C++17 |
|
432 ms |
86248 KB |
#include<iostream>
#include<vector>
#include<map>
#include<algorithm>
#define ep emplace
#define eb emplace_back
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
typedef pair<int,int>pi;
typedef pair<ll,ll>pl;
const int inf=1e8+7;
const ll INF=1e18;
const int mx=400010;
int dep[mx];
int spa[mx][20];
inline int kpa(int x,int k)
{
for(;k>0;k^=k&-k)
x=spa[x][__builtin_ctz(k)];
return x;
}
inline int lca(int x,int y)
{
if(dep[x]>dep[y])
x=kpa(x,dep[x]-dep[y]);
else
y=kpa(y,dep[y]-dep[x]);
if(x==y)
return x;
for(int i=18;i-->0;)
if(spa[x][i]!=spa[y][i])
x=spa[x][i],y=spa[y][i];
return spa[x][0];
}
vector<int>adj[mx];
int inord[mx],outord[mx];
int ordct;
void dfs(int x,int p)
{
inord[x]=++ordct;
dep[x]=dep[spa[x][0]=p]+1;
for(int i=0;i<17;i++)
spa[x][i+1]=spa[spa[x][i]][i];
for(int&t:adj[x])
dfs(t,x);
outord[x]=ordct;
return;
}
map<int,vector<int> >mp[mx];
vector<int>vv[mx];
pi qry[mx];
int lc[mx];
int ansv=0,ansi=1,ansj=2;
pi mn1[mx],mn2[mx];
inline void upd(int x,pi v)
{
if(v<mn1[x])
mn2[x]=mn1[x],mn1[x]=v;
else if(v<mn2[x])
mn2[x]=v;
return;
}
void dfs2(int x)
{
mn1[x]=pi(inf,0);
mn2[x]=pi(inf,0);
for(int&t:vv[x])
upd(x,pi(dep[lc[t]],t));
for(int&t:adj[x])
dfs2(t),upd(x,mn1[t]),upd(x,mn2[t]);
if(dep[x]-mn2[x].fi>ansv)
ansv=dep[x]-mn2[x].fi,ansi=mn1[x].se,ansj=mn2[x].se;
return;
}
vector<pi>adj2[mx];
bool chk[mx];
int siz[mx];
void cdfs0(int x,int p)
{
siz[x]=1;
for(pi&t:adj2[x])
if(t.fi!=p)
cdfs0(t.fi,x),siz[x]+=siz[t.fi];
return;
}
int cdis[mx][20];
void cdfs(int x,int p,int d,int cd,vector<int>&v,bool push=0)
{
if(push)
v.eb(x);
cdis[x][cd]=d;
siz[x]=1;
for(pi&t:adj2[x])
if(!chk[t.fi]&&t.fi!=p)
cdfs(t.fi,x,d+t.se,cd,v,push),siz[x]+=siz[t.fi];
return;
}
int cent(int x,int p,int sz)
{
int ms=-1,mi=-1;
for(pi&t:adj2[x])
if(!chk[t.fi]&&t.fi!=p&&siz[t.fi]>ms)
ms=siz[t.fi],mi=t.fi;
if(ms<=sz)
return x;
return cent(mi,x,sz);
}
int cpa[mx],cdep[mx];
void dnc(int x,bool push=0)
{
chk[x]=1;
if(push)
vv[x].eb(x);
for(pi&t:adj2[x])
{
if(chk[t.fi])
continue;
cdfs(t.fi,x,t.se,cdep[x],vv[x],push);
int nc=cent(t.fi,x,siz[t.fi]/2);
cpa[nc]=x;
cdep[nc]=cdep[x]+1;
dnc(nc,push);
}
return;
}
vector<int>vert[mx];
pi mxv[mx];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n,k;
cin>>n>>k;
for(int i=1;i++<n;)
{
int p;
cin>>p;
adj[p].eb(i);
}
dfs(1,0);
for(int i=0;i++<k;)
{
cin>>qry[i].fi>>qry[i].se;
const int&l=lc[i]=lca(qry[i].fi,qry[i].se);
if(qry[i].fi!=l&&qry[i].se!=l)
{
int l1=kpa(qry[i].fi,dep[qry[i].fi]-dep[l]-1);
int l2=kpa(qry[i].se,dep[qry[i].se]-dep[l]-1);
if(l1>l2)
swap(l1,l2),swap(qry[i].fi,qry[i].se);
mp[l1][l2].eb(i);
}
if(qry[i].fi!=l)
vv[qry[i].fi].eb(i);
if(qry[i].se!=l)
vv[qry[i].se].eb(i);
}
dfs2(1);
for(int i=0;i++<n;)
adj[i].clear(),vv[i].clear();
auto cmp=[&](const int&x,const int&y)->bool{return inord[x]<inord[y];};
for(int i=0;i++<n;)
{
const int rt=spa[i][0];
for(const auto&tv:mp[i])
{
if((int)tv.se.size()<2)
continue;
const vector<int>&v=tv.se;
vector<int>v1,v2;
for(const int&t:v)
v1.eb(qry[t].fi),v2.eb(qry[t].se);
{
sort(all(v1),cmp);
int cn=v1.size();
for(int i=1;i<cn;i++)
v1.eb(lca(v1[i-1],v1[i]));
sort(all(v1),cmp);
v1.erase(unique(all(v1)),v1.end());
vector<int>stk;
for(int&t:v1)
{
while(!stk.empty()&&outord[stk.back()]<inord[t])
stk.pop_back();
if(!stk.empty())
{
int u=stk.back();
int w=dep[t]-dep[u];
adj2[t].eb(u,w);
adj2[u].eb(t,w);
}
stk.eb(t);
}
}
{
sort(all(v2),cmp);
int cn=v2.size();
for(int i=1;i<cn;i++)
v2.eb(lca(v2[i-1],v2[i]));
sort(all(v2),cmp);
v2.erase(unique(all(v2)),v2.end());
vector<int>stk;
for(int&t:v2)
{
while(!stk.empty()&&outord[stk.back()]<inord[t])
stk.pop_back();
if(!stk.empty())
{
int u=stk.back();
int w=dep[t]-dep[u];
adj2[t].eb(u,w);
adj2[u].eb(t,w);
}
stk.eb(t);
}
}
{
cdfs0(v1[0],0);
int cc=cent(v1[0],0,siz[v1[0]]/2);
cdep[cc]=cpa[cc]=0;
dnc(cc,1);
}
{
cdfs0(v2[0],0);
int cc=cent(v2[0],0,siz[v2[0]]/2);
cdep[cc]=cpa[cc]=0;
dnc(cc,0);
}
for(int&t:v2)
mxv[t].fi=-inf;
for(const int&t:v)
vert[qry[t].fi].eb(t);
for(int&u0:v1)
{
int cd1=cdep[u0];
for(int&vvv:vv[u0])
{
for(int&vv0:vert[vvv])
{
int u1=qry[vv0].fi;
int u2=qry[vv0].se;
int cur=u2;
while(cur>0)
{
int part=dep[u1]+dep[u2]-2*dep[rt]-cdis[u1][cd1]-cdis[u2][cdep[cur]];
if((part+mxv[cur].fi)/2>ansv)
ansv=(part+mxv[cur].fi)/2,ansi=vv0,ansj=mxv[cur].se;
mxv[cur]=max(mxv[cur],pi(part,vv0));
cur=cpa[cur];
}
}
}
for(int&vvv:vv[u0])
for(int&vv0:vert[vvv])
for(int cur=qry[vv0].se;cur>0;cur=cpa[cur])
mxv[cur].fi=-inf;
}
for(int&t:v1)
adj2[t].clear(),vv[t].clear(),vert[t].clear(),chk[t]=0;
for(int&t:v2)
adj2[t].clear(),chk[t]=0;
}
}
cout<<ansv<<endl;
cout<<ansi<<' '<<ansj<<endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
56696 KB |
Output is correct |
2 |
Correct |
41 ms |
56808 KB |
Output is correct |
3 |
Correct |
41 ms |
56732 KB |
Output is correct |
4 |
Correct |
44 ms |
56704 KB |
Output is correct |
5 |
Correct |
42 ms |
56696 KB |
Output is correct |
6 |
Correct |
40 ms |
56832 KB |
Output is correct |
7 |
Correct |
40 ms |
56792 KB |
Output is correct |
8 |
Correct |
42 ms |
56696 KB |
Output is correct |
9 |
Correct |
41 ms |
56832 KB |
Output is correct |
10 |
Correct |
41 ms |
56824 KB |
Output is correct |
11 |
Correct |
39 ms |
56832 KB |
Output is correct |
12 |
Correct |
43 ms |
56804 KB |
Output is correct |
13 |
Correct |
45 ms |
56824 KB |
Output is correct |
14 |
Correct |
41 ms |
56824 KB |
Output is correct |
15 |
Correct |
41 ms |
56832 KB |
Output is correct |
16 |
Correct |
43 ms |
56824 KB |
Output is correct |
17 |
Correct |
43 ms |
56744 KB |
Output is correct |
18 |
Correct |
42 ms |
56832 KB |
Output is correct |
19 |
Correct |
41 ms |
56832 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
56696 KB |
Output is correct |
2 |
Correct |
41 ms |
56808 KB |
Output is correct |
3 |
Correct |
41 ms |
56732 KB |
Output is correct |
4 |
Correct |
44 ms |
56704 KB |
Output is correct |
5 |
Correct |
42 ms |
56696 KB |
Output is correct |
6 |
Correct |
40 ms |
56832 KB |
Output is correct |
7 |
Correct |
40 ms |
56792 KB |
Output is correct |
8 |
Correct |
42 ms |
56696 KB |
Output is correct |
9 |
Correct |
41 ms |
56832 KB |
Output is correct |
10 |
Correct |
41 ms |
56824 KB |
Output is correct |
11 |
Correct |
39 ms |
56832 KB |
Output is correct |
12 |
Correct |
43 ms |
56804 KB |
Output is correct |
13 |
Correct |
45 ms |
56824 KB |
Output is correct |
14 |
Correct |
41 ms |
56824 KB |
Output is correct |
15 |
Correct |
41 ms |
56832 KB |
Output is correct |
16 |
Correct |
43 ms |
56824 KB |
Output is correct |
17 |
Correct |
43 ms |
56744 KB |
Output is correct |
18 |
Correct |
42 ms |
56832 KB |
Output is correct |
19 |
Correct |
41 ms |
56832 KB |
Output is correct |
20 |
Correct |
44 ms |
57848 KB |
Output is correct |
21 |
Correct |
45 ms |
57848 KB |
Output is correct |
22 |
Correct |
44 ms |
57576 KB |
Output is correct |
23 |
Correct |
48 ms |
57976 KB |
Output is correct |
24 |
Correct |
41 ms |
57720 KB |
Output is correct |
25 |
Correct |
41 ms |
57336 KB |
Output is correct |
26 |
Correct |
40 ms |
57464 KB |
Output is correct |
27 |
Correct |
42 ms |
57848 KB |
Output is correct |
28 |
Correct |
45 ms |
57928 KB |
Output is correct |
29 |
Correct |
44 ms |
57464 KB |
Output is correct |
30 |
Correct |
42 ms |
57464 KB |
Output is correct |
31 |
Correct |
42 ms |
57548 KB |
Output is correct |
32 |
Correct |
43 ms |
57592 KB |
Output is correct |
33 |
Correct |
43 ms |
57592 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
56696 KB |
Output is correct |
2 |
Correct |
41 ms |
56808 KB |
Output is correct |
3 |
Correct |
41 ms |
56732 KB |
Output is correct |
4 |
Correct |
44 ms |
56704 KB |
Output is correct |
5 |
Correct |
42 ms |
56696 KB |
Output is correct |
6 |
Correct |
40 ms |
56832 KB |
Output is correct |
7 |
Correct |
40 ms |
56792 KB |
Output is correct |
8 |
Correct |
42 ms |
56696 KB |
Output is correct |
9 |
Correct |
41 ms |
56832 KB |
Output is correct |
10 |
Correct |
41 ms |
56824 KB |
Output is correct |
11 |
Correct |
39 ms |
56832 KB |
Output is correct |
12 |
Correct |
43 ms |
56804 KB |
Output is correct |
13 |
Correct |
45 ms |
56824 KB |
Output is correct |
14 |
Correct |
41 ms |
56824 KB |
Output is correct |
15 |
Correct |
41 ms |
56832 KB |
Output is correct |
16 |
Correct |
43 ms |
56824 KB |
Output is correct |
17 |
Correct |
43 ms |
56744 KB |
Output is correct |
18 |
Correct |
42 ms |
56832 KB |
Output is correct |
19 |
Correct |
41 ms |
56832 KB |
Output is correct |
20 |
Correct |
44 ms |
57848 KB |
Output is correct |
21 |
Correct |
45 ms |
57848 KB |
Output is correct |
22 |
Correct |
44 ms |
57576 KB |
Output is correct |
23 |
Correct |
48 ms |
57976 KB |
Output is correct |
24 |
Correct |
41 ms |
57720 KB |
Output is correct |
25 |
Correct |
41 ms |
57336 KB |
Output is correct |
26 |
Correct |
40 ms |
57464 KB |
Output is correct |
27 |
Correct |
42 ms |
57848 KB |
Output is correct |
28 |
Correct |
45 ms |
57928 KB |
Output is correct |
29 |
Correct |
44 ms |
57464 KB |
Output is correct |
30 |
Correct |
42 ms |
57464 KB |
Output is correct |
31 |
Correct |
42 ms |
57548 KB |
Output is correct |
32 |
Correct |
43 ms |
57592 KB |
Output is correct |
33 |
Correct |
43 ms |
57592 KB |
Output is correct |
34 |
Correct |
115 ms |
76204 KB |
Output is correct |
35 |
Correct |
120 ms |
76920 KB |
Output is correct |
36 |
Correct |
80 ms |
75128 KB |
Output is correct |
37 |
Correct |
88 ms |
78200 KB |
Output is correct |
38 |
Correct |
82 ms |
71548 KB |
Output is correct |
39 |
Correct |
61 ms |
67976 KB |
Output is correct |
40 |
Correct |
80 ms |
75132 KB |
Output is correct |
41 |
Correct |
69 ms |
74616 KB |
Output is correct |
42 |
Correct |
81 ms |
76332 KB |
Output is correct |
43 |
Correct |
86 ms |
74368 KB |
Output is correct |
44 |
Correct |
87 ms |
74336 KB |
Output is correct |
45 |
Correct |
90 ms |
74488 KB |
Output is correct |
46 |
Correct |
90 ms |
74436 KB |
Output is correct |
47 |
Correct |
91 ms |
73464 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
56696 KB |
Output is correct |
2 |
Correct |
41 ms |
56808 KB |
Output is correct |
3 |
Correct |
41 ms |
56732 KB |
Output is correct |
4 |
Correct |
44 ms |
56704 KB |
Output is correct |
5 |
Correct |
42 ms |
56696 KB |
Output is correct |
6 |
Correct |
40 ms |
56832 KB |
Output is correct |
7 |
Correct |
40 ms |
56792 KB |
Output is correct |
8 |
Correct |
42 ms |
56696 KB |
Output is correct |
9 |
Correct |
41 ms |
56832 KB |
Output is correct |
10 |
Correct |
41 ms |
56824 KB |
Output is correct |
11 |
Correct |
39 ms |
56832 KB |
Output is correct |
12 |
Correct |
43 ms |
56804 KB |
Output is correct |
13 |
Correct |
45 ms |
56824 KB |
Output is correct |
14 |
Correct |
41 ms |
56824 KB |
Output is correct |
15 |
Correct |
41 ms |
56832 KB |
Output is correct |
16 |
Correct |
43 ms |
56824 KB |
Output is correct |
17 |
Correct |
43 ms |
56744 KB |
Output is correct |
18 |
Correct |
42 ms |
56832 KB |
Output is correct |
19 |
Correct |
41 ms |
56832 KB |
Output is correct |
20 |
Correct |
44 ms |
57848 KB |
Output is correct |
21 |
Correct |
45 ms |
57848 KB |
Output is correct |
22 |
Correct |
44 ms |
57576 KB |
Output is correct |
23 |
Correct |
48 ms |
57976 KB |
Output is correct |
24 |
Correct |
41 ms |
57720 KB |
Output is correct |
25 |
Correct |
41 ms |
57336 KB |
Output is correct |
26 |
Correct |
40 ms |
57464 KB |
Output is correct |
27 |
Correct |
42 ms |
57848 KB |
Output is correct |
28 |
Correct |
45 ms |
57928 KB |
Output is correct |
29 |
Correct |
44 ms |
57464 KB |
Output is correct |
30 |
Correct |
42 ms |
57464 KB |
Output is correct |
31 |
Correct |
42 ms |
57548 KB |
Output is correct |
32 |
Correct |
43 ms |
57592 KB |
Output is correct |
33 |
Correct |
43 ms |
57592 KB |
Output is correct |
34 |
Correct |
115 ms |
76204 KB |
Output is correct |
35 |
Correct |
120 ms |
76920 KB |
Output is correct |
36 |
Correct |
80 ms |
75128 KB |
Output is correct |
37 |
Correct |
88 ms |
78200 KB |
Output is correct |
38 |
Correct |
82 ms |
71548 KB |
Output is correct |
39 |
Correct |
61 ms |
67976 KB |
Output is correct |
40 |
Correct |
80 ms |
75132 KB |
Output is correct |
41 |
Correct |
69 ms |
74616 KB |
Output is correct |
42 |
Correct |
81 ms |
76332 KB |
Output is correct |
43 |
Correct |
86 ms |
74368 KB |
Output is correct |
44 |
Correct |
87 ms |
74336 KB |
Output is correct |
45 |
Correct |
90 ms |
74488 KB |
Output is correct |
46 |
Correct |
90 ms |
74436 KB |
Output is correct |
47 |
Correct |
91 ms |
73464 KB |
Output is correct |
48 |
Correct |
144 ms |
79864 KB |
Output is correct |
49 |
Correct |
152 ms |
80348 KB |
Output is correct |
50 |
Correct |
86 ms |
75384 KB |
Output is correct |
51 |
Correct |
107 ms |
82888 KB |
Output is correct |
52 |
Correct |
87 ms |
73980 KB |
Output is correct |
53 |
Correct |
66 ms |
68596 KB |
Output is correct |
54 |
Correct |
84 ms |
75384 KB |
Output is correct |
55 |
Correct |
83 ms |
78648 KB |
Output is correct |
56 |
Correct |
109 ms |
80120 KB |
Output is correct |
57 |
Correct |
90 ms |
74484 KB |
Output is correct |
58 |
Correct |
92 ms |
74488 KB |
Output is correct |
59 |
Correct |
100 ms |
74488 KB |
Output is correct |
60 |
Correct |
100 ms |
75384 KB |
Output is correct |
61 |
Correct |
93 ms |
75512 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
296 ms |
85716 KB |
Output is correct |
2 |
Correct |
432 ms |
86136 KB |
Output is correct |
3 |
Incorrect |
426 ms |
86248 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
145 ms |
70772 KB |
Output is correct |
2 |
Correct |
146 ms |
70908 KB |
Output is correct |
3 |
Correct |
136 ms |
76940 KB |
Output is correct |
4 |
Correct |
139 ms |
74660 KB |
Output is correct |
5 |
Correct |
125 ms |
73060 KB |
Output is correct |
6 |
Correct |
83 ms |
69496 KB |
Output is correct |
7 |
Correct |
151 ms |
76920 KB |
Output is correct |
8 |
Correct |
92 ms |
69748 KB |
Output is correct |
9 |
Correct |
108 ms |
70648 KB |
Output is correct |
10 |
Correct |
91 ms |
76100 KB |
Output is correct |
11 |
Correct |
90 ms |
76280 KB |
Output is correct |
12 |
Correct |
83 ms |
76156 KB |
Output is correct |
13 |
Correct |
129 ms |
76924 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
56696 KB |
Output is correct |
2 |
Correct |
41 ms |
56808 KB |
Output is correct |
3 |
Correct |
41 ms |
56732 KB |
Output is correct |
4 |
Correct |
44 ms |
56704 KB |
Output is correct |
5 |
Correct |
42 ms |
56696 KB |
Output is correct |
6 |
Correct |
40 ms |
56832 KB |
Output is correct |
7 |
Correct |
40 ms |
56792 KB |
Output is correct |
8 |
Correct |
42 ms |
56696 KB |
Output is correct |
9 |
Correct |
41 ms |
56832 KB |
Output is correct |
10 |
Correct |
41 ms |
56824 KB |
Output is correct |
11 |
Correct |
39 ms |
56832 KB |
Output is correct |
12 |
Correct |
43 ms |
56804 KB |
Output is correct |
13 |
Correct |
45 ms |
56824 KB |
Output is correct |
14 |
Correct |
41 ms |
56824 KB |
Output is correct |
15 |
Correct |
41 ms |
56832 KB |
Output is correct |
16 |
Correct |
43 ms |
56824 KB |
Output is correct |
17 |
Correct |
43 ms |
56744 KB |
Output is correct |
18 |
Correct |
42 ms |
56832 KB |
Output is correct |
19 |
Correct |
41 ms |
56832 KB |
Output is correct |
20 |
Correct |
44 ms |
57848 KB |
Output is correct |
21 |
Correct |
45 ms |
57848 KB |
Output is correct |
22 |
Correct |
44 ms |
57576 KB |
Output is correct |
23 |
Correct |
48 ms |
57976 KB |
Output is correct |
24 |
Correct |
41 ms |
57720 KB |
Output is correct |
25 |
Correct |
41 ms |
57336 KB |
Output is correct |
26 |
Correct |
40 ms |
57464 KB |
Output is correct |
27 |
Correct |
42 ms |
57848 KB |
Output is correct |
28 |
Correct |
45 ms |
57928 KB |
Output is correct |
29 |
Correct |
44 ms |
57464 KB |
Output is correct |
30 |
Correct |
42 ms |
57464 KB |
Output is correct |
31 |
Correct |
42 ms |
57548 KB |
Output is correct |
32 |
Correct |
43 ms |
57592 KB |
Output is correct |
33 |
Correct |
43 ms |
57592 KB |
Output is correct |
34 |
Correct |
115 ms |
76204 KB |
Output is correct |
35 |
Correct |
120 ms |
76920 KB |
Output is correct |
36 |
Correct |
80 ms |
75128 KB |
Output is correct |
37 |
Correct |
88 ms |
78200 KB |
Output is correct |
38 |
Correct |
82 ms |
71548 KB |
Output is correct |
39 |
Correct |
61 ms |
67976 KB |
Output is correct |
40 |
Correct |
80 ms |
75132 KB |
Output is correct |
41 |
Correct |
69 ms |
74616 KB |
Output is correct |
42 |
Correct |
81 ms |
76332 KB |
Output is correct |
43 |
Correct |
86 ms |
74368 KB |
Output is correct |
44 |
Correct |
87 ms |
74336 KB |
Output is correct |
45 |
Correct |
90 ms |
74488 KB |
Output is correct |
46 |
Correct |
90 ms |
74436 KB |
Output is correct |
47 |
Correct |
91 ms |
73464 KB |
Output is correct |
48 |
Correct |
144 ms |
79864 KB |
Output is correct |
49 |
Correct |
152 ms |
80348 KB |
Output is correct |
50 |
Correct |
86 ms |
75384 KB |
Output is correct |
51 |
Correct |
107 ms |
82888 KB |
Output is correct |
52 |
Correct |
87 ms |
73980 KB |
Output is correct |
53 |
Correct |
66 ms |
68596 KB |
Output is correct |
54 |
Correct |
84 ms |
75384 KB |
Output is correct |
55 |
Correct |
83 ms |
78648 KB |
Output is correct |
56 |
Correct |
109 ms |
80120 KB |
Output is correct |
57 |
Correct |
90 ms |
74484 KB |
Output is correct |
58 |
Correct |
92 ms |
74488 KB |
Output is correct |
59 |
Correct |
100 ms |
74488 KB |
Output is correct |
60 |
Correct |
100 ms |
75384 KB |
Output is correct |
61 |
Correct |
93 ms |
75512 KB |
Output is correct |
62 |
Correct |
296 ms |
85716 KB |
Output is correct |
63 |
Correct |
432 ms |
86136 KB |
Output is correct |
64 |
Incorrect |
426 ms |
86248 KB |
Output isn't correct |
65 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
56696 KB |
Output is correct |
2 |
Correct |
41 ms |
56808 KB |
Output is correct |
3 |
Correct |
41 ms |
56732 KB |
Output is correct |
4 |
Correct |
44 ms |
56704 KB |
Output is correct |
5 |
Correct |
42 ms |
56696 KB |
Output is correct |
6 |
Correct |
40 ms |
56832 KB |
Output is correct |
7 |
Correct |
40 ms |
56792 KB |
Output is correct |
8 |
Correct |
42 ms |
56696 KB |
Output is correct |
9 |
Correct |
41 ms |
56832 KB |
Output is correct |
10 |
Correct |
41 ms |
56824 KB |
Output is correct |
11 |
Correct |
39 ms |
56832 KB |
Output is correct |
12 |
Correct |
43 ms |
56804 KB |
Output is correct |
13 |
Correct |
45 ms |
56824 KB |
Output is correct |
14 |
Correct |
41 ms |
56824 KB |
Output is correct |
15 |
Correct |
41 ms |
56832 KB |
Output is correct |
16 |
Correct |
43 ms |
56824 KB |
Output is correct |
17 |
Correct |
43 ms |
56744 KB |
Output is correct |
18 |
Correct |
42 ms |
56832 KB |
Output is correct |
19 |
Correct |
41 ms |
56832 KB |
Output is correct |
20 |
Correct |
44 ms |
57848 KB |
Output is correct |
21 |
Correct |
45 ms |
57848 KB |
Output is correct |
22 |
Correct |
44 ms |
57576 KB |
Output is correct |
23 |
Correct |
48 ms |
57976 KB |
Output is correct |
24 |
Correct |
41 ms |
57720 KB |
Output is correct |
25 |
Correct |
41 ms |
57336 KB |
Output is correct |
26 |
Correct |
40 ms |
57464 KB |
Output is correct |
27 |
Correct |
42 ms |
57848 KB |
Output is correct |
28 |
Correct |
45 ms |
57928 KB |
Output is correct |
29 |
Correct |
44 ms |
57464 KB |
Output is correct |
30 |
Correct |
42 ms |
57464 KB |
Output is correct |
31 |
Correct |
42 ms |
57548 KB |
Output is correct |
32 |
Correct |
43 ms |
57592 KB |
Output is correct |
33 |
Correct |
43 ms |
57592 KB |
Output is correct |
34 |
Correct |
115 ms |
76204 KB |
Output is correct |
35 |
Correct |
120 ms |
76920 KB |
Output is correct |
36 |
Correct |
80 ms |
75128 KB |
Output is correct |
37 |
Correct |
88 ms |
78200 KB |
Output is correct |
38 |
Correct |
82 ms |
71548 KB |
Output is correct |
39 |
Correct |
61 ms |
67976 KB |
Output is correct |
40 |
Correct |
80 ms |
75132 KB |
Output is correct |
41 |
Correct |
69 ms |
74616 KB |
Output is correct |
42 |
Correct |
81 ms |
76332 KB |
Output is correct |
43 |
Correct |
86 ms |
74368 KB |
Output is correct |
44 |
Correct |
87 ms |
74336 KB |
Output is correct |
45 |
Correct |
90 ms |
74488 KB |
Output is correct |
46 |
Correct |
90 ms |
74436 KB |
Output is correct |
47 |
Correct |
91 ms |
73464 KB |
Output is correct |
48 |
Correct |
144 ms |
79864 KB |
Output is correct |
49 |
Correct |
152 ms |
80348 KB |
Output is correct |
50 |
Correct |
86 ms |
75384 KB |
Output is correct |
51 |
Correct |
107 ms |
82888 KB |
Output is correct |
52 |
Correct |
87 ms |
73980 KB |
Output is correct |
53 |
Correct |
66 ms |
68596 KB |
Output is correct |
54 |
Correct |
84 ms |
75384 KB |
Output is correct |
55 |
Correct |
83 ms |
78648 KB |
Output is correct |
56 |
Correct |
109 ms |
80120 KB |
Output is correct |
57 |
Correct |
90 ms |
74484 KB |
Output is correct |
58 |
Correct |
92 ms |
74488 KB |
Output is correct |
59 |
Correct |
100 ms |
74488 KB |
Output is correct |
60 |
Correct |
100 ms |
75384 KB |
Output is correct |
61 |
Correct |
93 ms |
75512 KB |
Output is correct |
62 |
Correct |
296 ms |
85716 KB |
Output is correct |
63 |
Correct |
432 ms |
86136 KB |
Output is correct |
64 |
Incorrect |
426 ms |
86248 KB |
Output isn't correct |
65 |
Halted |
0 ms |
0 KB |
- |