#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
using namespace std;
using lint = long long;
using vint = vector<int>;
using pii = pair<int,int>;
const int MAX_N=500010;
const int MAX_Q=1500010;
struct Obj
{
int v,p,i;
};
int in,n,q;
int esz[MAX_N];
vint edge[MAX_N];
vint nxt[MAX_N];
vint ec[MAX_N];
map<pii,pii> mp;
int cidx=0;
int cnt[MAX_N<<1];
int col[MAX_N<<1];
lint sum[MAX_Q],sump[MAX_Q];
int rnxt(int v,int i)
{
if(i==esz[v] || ec[v][i]==1)return i;
return nxt[v][i]=rnxt(v,nxt[v][i]);
}
int getmin(int x,int y)
{
vector<Obj> vx={{x,y,rnxt(x,0)}},vy={{y,x,rnxt(y,0)}};
while(1)
{
while(!vx.empty())
{
auto p=vx.back();
vx.pop_back();
if(p.i==esz[p.v])continue;
int v=edge[p.v][p.i];
p.i=rnxt(p.v,nxt[p.v][p.i]);
vx.push_back(p);
if(v==p.p)continue;
vx.push_back({v,p.v,rnxt(v,0)});
break;
}
if(vx.empty())return x;
while(!vy.empty())
{
auto p=vy.back();
vy.pop_back();
if(p.i==esz[p.v])continue;
int v=edge[p.v][p.i];
p.i=rnxt(p.v,nxt[p.v][p.i]);
vy.push_back(p);
if(v==p.p)continue;
vy.push_back({v,p.v,rnxt(v,0)});
break;
}
if(vy.empty())return y;
}
return x;
}
void colorall(int v,int p,int c)
{
cnt[col[v]]--;
col[v]=c;
cnt[col[v]]++;
for(int i=rnxt(v,0);i<esz[v];i=rnxt(v,nxt[v][i]))
if(edge[v][i]!=p)
colorall(edge[v][i],v,c);
}
int main()
{
ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
cin >> in >> n >> q;
for(int i=0;i<n;i++)
{
col[i+1]=i;
cnt[i]=1;
}
cidx=n;
lint lasta=0,change=0;
for(int i=1;i<=q;i++)
{
int o;
lint x,y,t;
cin >> o;
if(o==1)
{
cin >> x >> y;
if(in)x^=lasta,y^=lasta;
if(x>y)swap(x,y);
change=(lint)cnt[col[x]]*cnt[col[y]];
if(cnt[col[x]]<cnt[col[y]])
colorall(x,y,col[y]);
else
colorall(y,x,col[x]);
int j=esz[x]++,l=esz[y]++;
edge[x].push_back(y);
nxt[x].push_back(j+1);
ec[x].push_back(1);
edge[y].push_back(x);
nxt[y].push_back(l+1);
ec[y].push_back(1);
mp[{x,y}]={j,l};
}
if(o==2)
{
cin >> x >> y;
if(in)x^=lasta,y^=lasta;
if(x>y)swap(x,y);
pii idx=mp[{x,y}];
ec[x][idx.first]=0;
ec[y][idx.second]=0;
if(getmin(x,y)==x)
colorall(x,y,cidx++);
else
colorall(y,x,cidx++);
change=-(lint)cnt[col[x]]*cnt[col[y]];
}
if(o==3)change=0;
sum[i]=sum[i-1]+change;
sump[i]=sump[i-1]+max(0LL,change);
if(o==3)
{
cin >> t;
if(in)t^=lasta;
int j=max(0LL,i-t);
lasta=sum[j]+sump[i]-sump[j];
cout << lasta << '\n';
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
41308 KB |
Output is correct |
2 |
Correct |
6 ms |
41516 KB |
Output is correct |
3 |
Correct |
6 ms |
41308 KB |
Output is correct |
4 |
Correct |
6 ms |
41308 KB |
Output is correct |
5 |
Correct |
7 ms |
41308 KB |
Output is correct |
6 |
Correct |
6 ms |
41428 KB |
Output is correct |
7 |
Correct |
7 ms |
41304 KB |
Output is correct |
8 |
Correct |
6 ms |
41308 KB |
Output is correct |
9 |
Correct |
6 ms |
41304 KB |
Output is correct |
10 |
Correct |
6 ms |
41308 KB |
Output is correct |
11 |
Correct |
6 ms |
41308 KB |
Output is correct |
12 |
Correct |
6 ms |
41492 KB |
Output is correct |
13 |
Correct |
7 ms |
41516 KB |
Output is correct |
14 |
Correct |
6 ms |
41304 KB |
Output is correct |
15 |
Correct |
6 ms |
41332 KB |
Output is correct |
16 |
Correct |
6 ms |
41308 KB |
Output is correct |
17 |
Correct |
6 ms |
41448 KB |
Output is correct |
18 |
Correct |
6 ms |
41308 KB |
Output is correct |
19 |
Correct |
6 ms |
41308 KB |
Output is correct |
20 |
Correct |
6 ms |
41308 KB |
Output is correct |
21 |
Correct |
6 ms |
41308 KB |
Output is correct |
22 |
Correct |
6 ms |
41308 KB |
Output is correct |
23 |
Correct |
6 ms |
41308 KB |
Output is correct |
24 |
Correct |
6 ms |
41308 KB |
Output is correct |
25 |
Correct |
6 ms |
41308 KB |
Output is correct |
26 |
Correct |
6 ms |
41308 KB |
Output is correct |
27 |
Correct |
6 ms |
41308 KB |
Output is correct |
28 |
Correct |
6 ms |
41308 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
41308 KB |
Output is correct |
2 |
Correct |
7 ms |
41308 KB |
Output is correct |
3 |
Correct |
6 ms |
41304 KB |
Output is correct |
4 |
Correct |
6 ms |
41308 KB |
Output is correct |
5 |
Correct |
6 ms |
41308 KB |
Output is correct |
6 |
Correct |
6 ms |
41416 KB |
Output is correct |
7 |
Correct |
6 ms |
41308 KB |
Output is correct |
8 |
Correct |
6 ms |
41308 KB |
Output is correct |
9 |
Correct |
6 ms |
41304 KB |
Output is correct |
10 |
Correct |
6 ms |
41308 KB |
Output is correct |
11 |
Correct |
6 ms |
41308 KB |
Output is correct |
12 |
Correct |
6 ms |
41452 KB |
Output is correct |
13 |
Correct |
6 ms |
41308 KB |
Output is correct |
14 |
Correct |
6 ms |
41456 KB |
Output is correct |
15 |
Correct |
7 ms |
41308 KB |
Output is correct |
16 |
Correct |
6 ms |
41504 KB |
Output is correct |
17 |
Correct |
6 ms |
41308 KB |
Output is correct |
18 |
Correct |
6 ms |
41308 KB |
Output is correct |
19 |
Correct |
6 ms |
41308 KB |
Output is correct |
20 |
Correct |
6 ms |
41320 KB |
Output is correct |
21 |
Correct |
6 ms |
41320 KB |
Output is correct |
22 |
Correct |
6 ms |
41320 KB |
Output is correct |
23 |
Correct |
6 ms |
41320 KB |
Output is correct |
24 |
Correct |
6 ms |
41416 KB |
Output is correct |
25 |
Correct |
6 ms |
41320 KB |
Output is correct |
26 |
Correct |
6 ms |
41320 KB |
Output is correct |
27 |
Correct |
6 ms |
41320 KB |
Output is correct |
28 |
Correct |
6 ms |
41416 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
41308 KB |
Output is correct |
2 |
Correct |
6 ms |
41516 KB |
Output is correct |
3 |
Correct |
6 ms |
41308 KB |
Output is correct |
4 |
Correct |
6 ms |
41308 KB |
Output is correct |
5 |
Correct |
7 ms |
41308 KB |
Output is correct |
6 |
Correct |
6 ms |
41428 KB |
Output is correct |
7 |
Correct |
7 ms |
41304 KB |
Output is correct |
8 |
Correct |
6 ms |
41308 KB |
Output is correct |
9 |
Correct |
6 ms |
41304 KB |
Output is correct |
10 |
Correct |
6 ms |
41308 KB |
Output is correct |
11 |
Correct |
6 ms |
41308 KB |
Output is correct |
12 |
Correct |
6 ms |
41492 KB |
Output is correct |
13 |
Correct |
7 ms |
41516 KB |
Output is correct |
14 |
Correct |
6 ms |
41304 KB |
Output is correct |
15 |
Correct |
6 ms |
41332 KB |
Output is correct |
16 |
Correct |
6 ms |
41308 KB |
Output is correct |
17 |
Correct |
6 ms |
41448 KB |
Output is correct |
18 |
Correct |
6 ms |
41308 KB |
Output is correct |
19 |
Correct |
6 ms |
41308 KB |
Output is correct |
20 |
Correct |
6 ms |
41308 KB |
Output is correct |
21 |
Correct |
6 ms |
41308 KB |
Output is correct |
22 |
Correct |
6 ms |
41308 KB |
Output is correct |
23 |
Correct |
6 ms |
41308 KB |
Output is correct |
24 |
Correct |
6 ms |
41308 KB |
Output is correct |
25 |
Correct |
6 ms |
41308 KB |
Output is correct |
26 |
Correct |
6 ms |
41308 KB |
Output is correct |
27 |
Correct |
6 ms |
41308 KB |
Output is correct |
28 |
Correct |
6 ms |
41308 KB |
Output is correct |
29 |
Correct |
8 ms |
41784 KB |
Output is correct |
30 |
Correct |
8 ms |
41832 KB |
Output is correct |
31 |
Correct |
8 ms |
41820 KB |
Output is correct |
32 |
Correct |
8 ms |
41820 KB |
Output is correct |
33 |
Correct |
8 ms |
41820 KB |
Output is correct |
34 |
Correct |
9 ms |
41800 KB |
Output is correct |
35 |
Correct |
8 ms |
41820 KB |
Output is correct |
36 |
Correct |
8 ms |
41960 KB |
Output is correct |
37 |
Correct |
9 ms |
41952 KB |
Output is correct |
38 |
Correct |
8 ms |
42052 KB |
Output is correct |
39 |
Correct |
7 ms |
41820 KB |
Output is correct |
40 |
Correct |
8 ms |
41820 KB |
Output is correct |
41 |
Correct |
8 ms |
41820 KB |
Output is correct |
42 |
Correct |
8 ms |
42024 KB |
Output is correct |
43 |
Correct |
8 ms |
41820 KB |
Output is correct |
44 |
Correct |
8 ms |
41820 KB |
Output is correct |
45 |
Correct |
9 ms |
41820 KB |
Output is correct |
46 |
Correct |
9 ms |
41820 KB |
Output is correct |
47 |
Correct |
9 ms |
41960 KB |
Output is correct |
48 |
Correct |
8 ms |
41816 KB |
Output is correct |
49 |
Correct |
9 ms |
41964 KB |
Output is correct |
50 |
Correct |
7 ms |
41400 KB |
Output is correct |
51 |
Correct |
7 ms |
41564 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
41308 KB |
Output is correct |
2 |
Correct |
7 ms |
41308 KB |
Output is correct |
3 |
Correct |
6 ms |
41304 KB |
Output is correct |
4 |
Correct |
6 ms |
41308 KB |
Output is correct |
5 |
Correct |
6 ms |
41308 KB |
Output is correct |
6 |
Correct |
6 ms |
41416 KB |
Output is correct |
7 |
Correct |
6 ms |
41308 KB |
Output is correct |
8 |
Correct |
6 ms |
41308 KB |
Output is correct |
9 |
Correct |
6 ms |
41304 KB |
Output is correct |
10 |
Correct |
6 ms |
41308 KB |
Output is correct |
11 |
Correct |
6 ms |
41308 KB |
Output is correct |
12 |
Correct |
6 ms |
41452 KB |
Output is correct |
13 |
Correct |
6 ms |
41308 KB |
Output is correct |
14 |
Correct |
6 ms |
41456 KB |
Output is correct |
15 |
Correct |
7 ms |
41308 KB |
Output is correct |
16 |
Correct |
6 ms |
41504 KB |
Output is correct |
17 |
Correct |
6 ms |
41308 KB |
Output is correct |
18 |
Correct |
6 ms |
41308 KB |
Output is correct |
19 |
Correct |
6 ms |
41308 KB |
Output is correct |
20 |
Correct |
6 ms |
41320 KB |
Output is correct |
21 |
Correct |
6 ms |
41320 KB |
Output is correct |
22 |
Correct |
6 ms |
41320 KB |
Output is correct |
23 |
Correct |
6 ms |
41320 KB |
Output is correct |
24 |
Correct |
6 ms |
41416 KB |
Output is correct |
25 |
Correct |
6 ms |
41320 KB |
Output is correct |
26 |
Correct |
6 ms |
41320 KB |
Output is correct |
27 |
Correct |
6 ms |
41320 KB |
Output is correct |
28 |
Correct |
6 ms |
41416 KB |
Output is correct |
29 |
Correct |
8 ms |
42012 KB |
Output is correct |
30 |
Correct |
8 ms |
41948 KB |
Output is correct |
31 |
Correct |
10 ms |
41820 KB |
Output is correct |
32 |
Correct |
12 ms |
41928 KB |
Output is correct |
33 |
Correct |
8 ms |
41820 KB |
Output is correct |
34 |
Correct |
8 ms |
41800 KB |
Output is correct |
35 |
Correct |
11 ms |
41816 KB |
Output is correct |
36 |
Correct |
8 ms |
41820 KB |
Output is correct |
37 |
Correct |
8 ms |
41820 KB |
Output is correct |
38 |
Correct |
10 ms |
42044 KB |
Output is correct |
39 |
Correct |
9 ms |
41816 KB |
Output is correct |
40 |
Correct |
9 ms |
41820 KB |
Output is correct |
41 |
Correct |
8 ms |
41820 KB |
Output is correct |
42 |
Correct |
8 ms |
41820 KB |
Output is correct |
43 |
Correct |
11 ms |
41816 KB |
Output is correct |
44 |
Correct |
8 ms |
41820 KB |
Output is correct |
45 |
Correct |
9 ms |
41820 KB |
Output is correct |
46 |
Correct |
12 ms |
41816 KB |
Output is correct |
47 |
Correct |
9 ms |
41820 KB |
Output is correct |
48 |
Correct |
9 ms |
41816 KB |
Output is correct |
49 |
Correct |
11 ms |
41816 KB |
Output is correct |
50 |
Correct |
10 ms |
41564 KB |
Output is correct |
51 |
Correct |
7 ms |
41404 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
41308 KB |
Output is correct |
2 |
Correct |
6 ms |
41516 KB |
Output is correct |
3 |
Correct |
6 ms |
41308 KB |
Output is correct |
4 |
Correct |
6 ms |
41308 KB |
Output is correct |
5 |
Correct |
7 ms |
41308 KB |
Output is correct |
6 |
Correct |
6 ms |
41428 KB |
Output is correct |
7 |
Correct |
7 ms |
41304 KB |
Output is correct |
8 |
Correct |
6 ms |
41308 KB |
Output is correct |
9 |
Correct |
6 ms |
41304 KB |
Output is correct |
10 |
Correct |
6 ms |
41308 KB |
Output is correct |
11 |
Correct |
6 ms |
41308 KB |
Output is correct |
12 |
Correct |
6 ms |
41492 KB |
Output is correct |
13 |
Correct |
7 ms |
41516 KB |
Output is correct |
14 |
Correct |
6 ms |
41304 KB |
Output is correct |
15 |
Correct |
6 ms |
41332 KB |
Output is correct |
16 |
Correct |
6 ms |
41308 KB |
Output is correct |
17 |
Correct |
6 ms |
41448 KB |
Output is correct |
18 |
Correct |
6 ms |
41308 KB |
Output is correct |
19 |
Correct |
6 ms |
41308 KB |
Output is correct |
20 |
Correct |
6 ms |
41308 KB |
Output is correct |
21 |
Correct |
6 ms |
41308 KB |
Output is correct |
22 |
Correct |
6 ms |
41308 KB |
Output is correct |
23 |
Correct |
6 ms |
41308 KB |
Output is correct |
24 |
Correct |
6 ms |
41308 KB |
Output is correct |
25 |
Correct |
6 ms |
41308 KB |
Output is correct |
26 |
Correct |
6 ms |
41308 KB |
Output is correct |
27 |
Correct |
6 ms |
41308 KB |
Output is correct |
28 |
Correct |
6 ms |
41308 KB |
Output is correct |
29 |
Correct |
8 ms |
41784 KB |
Output is correct |
30 |
Correct |
8 ms |
41832 KB |
Output is correct |
31 |
Correct |
8 ms |
41820 KB |
Output is correct |
32 |
Correct |
8 ms |
41820 KB |
Output is correct |
33 |
Correct |
8 ms |
41820 KB |
Output is correct |
34 |
Correct |
9 ms |
41800 KB |
Output is correct |
35 |
Correct |
8 ms |
41820 KB |
Output is correct |
36 |
Correct |
8 ms |
41960 KB |
Output is correct |
37 |
Correct |
9 ms |
41952 KB |
Output is correct |
38 |
Correct |
8 ms |
42052 KB |
Output is correct |
39 |
Correct |
7 ms |
41820 KB |
Output is correct |
40 |
Correct |
8 ms |
41820 KB |
Output is correct |
41 |
Correct |
8 ms |
41820 KB |
Output is correct |
42 |
Correct |
8 ms |
42024 KB |
Output is correct |
43 |
Correct |
8 ms |
41820 KB |
Output is correct |
44 |
Correct |
8 ms |
41820 KB |
Output is correct |
45 |
Correct |
9 ms |
41820 KB |
Output is correct |
46 |
Correct |
9 ms |
41820 KB |
Output is correct |
47 |
Correct |
9 ms |
41960 KB |
Output is correct |
48 |
Correct |
8 ms |
41816 KB |
Output is correct |
49 |
Correct |
9 ms |
41964 KB |
Output is correct |
50 |
Correct |
7 ms |
41400 KB |
Output is correct |
51 |
Correct |
7 ms |
41564 KB |
Output is correct |
52 |
Correct |
176 ms |
68572 KB |
Output is correct |
53 |
Correct |
175 ms |
68688 KB |
Output is correct |
54 |
Correct |
235 ms |
67924 KB |
Output is correct |
55 |
Correct |
232 ms |
67924 KB |
Output is correct |
56 |
Correct |
353 ms |
68556 KB |
Output is correct |
57 |
Correct |
273 ms |
68284 KB |
Output is correct |
58 |
Correct |
213 ms |
68684 KB |
Output is correct |
59 |
Correct |
284 ms |
68700 KB |
Output is correct |
60 |
Correct |
258 ms |
67408 KB |
Output is correct |
61 |
Correct |
194 ms |
69440 KB |
Output is correct |
62 |
Correct |
198 ms |
68328 KB |
Output is correct |
63 |
Correct |
231 ms |
68368 KB |
Output is correct |
64 |
Correct |
158 ms |
70144 KB |
Output is correct |
65 |
Correct |
194 ms |
69648 KB |
Output is correct |
66 |
Correct |
200 ms |
70480 KB |
Output is correct |
67 |
Correct |
176 ms |
68616 KB |
Output is correct |
68 |
Correct |
293 ms |
68692 KB |
Output is correct |
69 |
Correct |
214 ms |
68796 KB |
Output is correct |
70 |
Correct |
353 ms |
68704 KB |
Output is correct |
71 |
Correct |
268 ms |
68436 KB |
Output is correct |
72 |
Correct |
228 ms |
68372 KB |
Output is correct |
73 |
Correct |
51 ms |
53076 KB |
Output is correct |
74 |
Correct |
51 ms |
51420 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
41308 KB |
Output is correct |
2 |
Correct |
7 ms |
41308 KB |
Output is correct |
3 |
Correct |
6 ms |
41304 KB |
Output is correct |
4 |
Correct |
6 ms |
41308 KB |
Output is correct |
5 |
Correct |
6 ms |
41308 KB |
Output is correct |
6 |
Correct |
6 ms |
41416 KB |
Output is correct |
7 |
Correct |
6 ms |
41308 KB |
Output is correct |
8 |
Correct |
6 ms |
41308 KB |
Output is correct |
9 |
Correct |
6 ms |
41304 KB |
Output is correct |
10 |
Correct |
6 ms |
41308 KB |
Output is correct |
11 |
Correct |
6 ms |
41308 KB |
Output is correct |
12 |
Correct |
6 ms |
41452 KB |
Output is correct |
13 |
Correct |
6 ms |
41308 KB |
Output is correct |
14 |
Correct |
6 ms |
41456 KB |
Output is correct |
15 |
Correct |
7 ms |
41308 KB |
Output is correct |
16 |
Correct |
6 ms |
41504 KB |
Output is correct |
17 |
Correct |
6 ms |
41308 KB |
Output is correct |
18 |
Correct |
6 ms |
41308 KB |
Output is correct |
19 |
Correct |
6 ms |
41308 KB |
Output is correct |
20 |
Correct |
6 ms |
41320 KB |
Output is correct |
21 |
Correct |
6 ms |
41320 KB |
Output is correct |
22 |
Correct |
6 ms |
41320 KB |
Output is correct |
23 |
Correct |
6 ms |
41320 KB |
Output is correct |
24 |
Correct |
6 ms |
41416 KB |
Output is correct |
25 |
Correct |
6 ms |
41320 KB |
Output is correct |
26 |
Correct |
6 ms |
41320 KB |
Output is correct |
27 |
Correct |
6 ms |
41320 KB |
Output is correct |
28 |
Correct |
6 ms |
41416 KB |
Output is correct |
29 |
Correct |
8 ms |
42012 KB |
Output is correct |
30 |
Correct |
8 ms |
41948 KB |
Output is correct |
31 |
Correct |
10 ms |
41820 KB |
Output is correct |
32 |
Correct |
12 ms |
41928 KB |
Output is correct |
33 |
Correct |
8 ms |
41820 KB |
Output is correct |
34 |
Correct |
8 ms |
41800 KB |
Output is correct |
35 |
Correct |
11 ms |
41816 KB |
Output is correct |
36 |
Correct |
8 ms |
41820 KB |
Output is correct |
37 |
Correct |
8 ms |
41820 KB |
Output is correct |
38 |
Correct |
10 ms |
42044 KB |
Output is correct |
39 |
Correct |
9 ms |
41816 KB |
Output is correct |
40 |
Correct |
9 ms |
41820 KB |
Output is correct |
41 |
Correct |
8 ms |
41820 KB |
Output is correct |
42 |
Correct |
8 ms |
41820 KB |
Output is correct |
43 |
Correct |
11 ms |
41816 KB |
Output is correct |
44 |
Correct |
8 ms |
41820 KB |
Output is correct |
45 |
Correct |
9 ms |
41820 KB |
Output is correct |
46 |
Correct |
12 ms |
41816 KB |
Output is correct |
47 |
Correct |
9 ms |
41820 KB |
Output is correct |
48 |
Correct |
9 ms |
41816 KB |
Output is correct |
49 |
Correct |
11 ms |
41816 KB |
Output is correct |
50 |
Correct |
10 ms |
41564 KB |
Output is correct |
51 |
Correct |
7 ms |
41404 KB |
Output is correct |
52 |
Correct |
180 ms |
70988 KB |
Output is correct |
53 |
Correct |
213 ms |
71028 KB |
Output is correct |
54 |
Correct |
261 ms |
68544 KB |
Output is correct |
55 |
Correct |
204 ms |
70980 KB |
Output is correct |
56 |
Correct |
296 ms |
70228 KB |
Output is correct |
57 |
Correct |
240 ms |
68436 KB |
Output is correct |
58 |
Correct |
225 ms |
70992 KB |
Output is correct |
59 |
Correct |
296 ms |
70484 KB |
Output is correct |
60 |
Correct |
256 ms |
68692 KB |
Output is correct |
61 |
Correct |
200 ms |
73792 KB |
Output is correct |
62 |
Correct |
235 ms |
72256 KB |
Output is correct |
63 |
Correct |
211 ms |
72676 KB |
Output is correct |
64 |
Correct |
187 ms |
72728 KB |
Output is correct |
65 |
Correct |
199 ms |
72440 KB |
Output is correct |
66 |
Correct |
217 ms |
72292 KB |
Output is correct |
67 |
Correct |
185 ms |
70316 KB |
Output is correct |
68 |
Correct |
355 ms |
69076 KB |
Output is correct |
69 |
Correct |
238 ms |
71120 KB |
Output is correct |
70 |
Correct |
270 ms |
70592 KB |
Output is correct |
71 |
Correct |
204 ms |
68688 KB |
Output is correct |
72 |
Correct |
219 ms |
68784 KB |
Output is correct |
73 |
Correct |
50 ms |
53332 KB |
Output is correct |
74 |
Correct |
47 ms |
51280 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
41308 KB |
Output is correct |
2 |
Correct |
7 ms |
41308 KB |
Output is correct |
3 |
Correct |
6 ms |
41304 KB |
Output is correct |
4 |
Correct |
6 ms |
41308 KB |
Output is correct |
5 |
Correct |
6 ms |
41308 KB |
Output is correct |
6 |
Correct |
6 ms |
41416 KB |
Output is correct |
7 |
Correct |
6 ms |
41308 KB |
Output is correct |
8 |
Correct |
6 ms |
41308 KB |
Output is correct |
9 |
Correct |
6 ms |
41304 KB |
Output is correct |
10 |
Correct |
6 ms |
41308 KB |
Output is correct |
11 |
Correct |
6 ms |
41308 KB |
Output is correct |
12 |
Correct |
6 ms |
41452 KB |
Output is correct |
13 |
Correct |
6 ms |
41308 KB |
Output is correct |
14 |
Correct |
6 ms |
41456 KB |
Output is correct |
15 |
Correct |
7 ms |
41308 KB |
Output is correct |
16 |
Correct |
6 ms |
41504 KB |
Output is correct |
17 |
Correct |
6 ms |
41308 KB |
Output is correct |
18 |
Correct |
6 ms |
41308 KB |
Output is correct |
19 |
Correct |
6 ms |
41308 KB |
Output is correct |
20 |
Correct |
6 ms |
41320 KB |
Output is correct |
21 |
Correct |
6 ms |
41320 KB |
Output is correct |
22 |
Correct |
6 ms |
41320 KB |
Output is correct |
23 |
Correct |
6 ms |
41320 KB |
Output is correct |
24 |
Correct |
6 ms |
41416 KB |
Output is correct |
25 |
Correct |
6 ms |
41320 KB |
Output is correct |
26 |
Correct |
6 ms |
41320 KB |
Output is correct |
27 |
Correct |
6 ms |
41320 KB |
Output is correct |
28 |
Correct |
6 ms |
41416 KB |
Output is correct |
29 |
Correct |
8 ms |
42012 KB |
Output is correct |
30 |
Correct |
8 ms |
41948 KB |
Output is correct |
31 |
Correct |
10 ms |
41820 KB |
Output is correct |
32 |
Correct |
12 ms |
41928 KB |
Output is correct |
33 |
Correct |
8 ms |
41820 KB |
Output is correct |
34 |
Correct |
8 ms |
41800 KB |
Output is correct |
35 |
Correct |
11 ms |
41816 KB |
Output is correct |
36 |
Correct |
8 ms |
41820 KB |
Output is correct |
37 |
Correct |
8 ms |
41820 KB |
Output is correct |
38 |
Correct |
10 ms |
42044 KB |
Output is correct |
39 |
Correct |
9 ms |
41816 KB |
Output is correct |
40 |
Correct |
9 ms |
41820 KB |
Output is correct |
41 |
Correct |
8 ms |
41820 KB |
Output is correct |
42 |
Correct |
8 ms |
41820 KB |
Output is correct |
43 |
Correct |
11 ms |
41816 KB |
Output is correct |
44 |
Correct |
8 ms |
41820 KB |
Output is correct |
45 |
Correct |
9 ms |
41820 KB |
Output is correct |
46 |
Correct |
12 ms |
41816 KB |
Output is correct |
47 |
Correct |
9 ms |
41820 KB |
Output is correct |
48 |
Correct |
9 ms |
41816 KB |
Output is correct |
49 |
Correct |
11 ms |
41816 KB |
Output is correct |
50 |
Correct |
10 ms |
41564 KB |
Output is correct |
51 |
Correct |
7 ms |
41404 KB |
Output is correct |
52 |
Correct |
180 ms |
70988 KB |
Output is correct |
53 |
Correct |
213 ms |
71028 KB |
Output is correct |
54 |
Correct |
261 ms |
68544 KB |
Output is correct |
55 |
Correct |
204 ms |
70980 KB |
Output is correct |
56 |
Correct |
296 ms |
70228 KB |
Output is correct |
57 |
Correct |
240 ms |
68436 KB |
Output is correct |
58 |
Correct |
225 ms |
70992 KB |
Output is correct |
59 |
Correct |
296 ms |
70484 KB |
Output is correct |
60 |
Correct |
256 ms |
68692 KB |
Output is correct |
61 |
Correct |
200 ms |
73792 KB |
Output is correct |
62 |
Correct |
235 ms |
72256 KB |
Output is correct |
63 |
Correct |
211 ms |
72676 KB |
Output is correct |
64 |
Correct |
187 ms |
72728 KB |
Output is correct |
65 |
Correct |
199 ms |
72440 KB |
Output is correct |
66 |
Correct |
217 ms |
72292 KB |
Output is correct |
67 |
Correct |
185 ms |
70316 KB |
Output is correct |
68 |
Correct |
355 ms |
69076 KB |
Output is correct |
69 |
Correct |
238 ms |
71120 KB |
Output is correct |
70 |
Correct |
270 ms |
70592 KB |
Output is correct |
71 |
Correct |
204 ms |
68688 KB |
Output is correct |
72 |
Correct |
219 ms |
68784 KB |
Output is correct |
73 |
Correct |
50 ms |
53332 KB |
Output is correct |
74 |
Correct |
47 ms |
51280 KB |
Output is correct |
75 |
Correct |
1365 ms |
185820 KB |
Output is correct |
76 |
Correct |
1362 ms |
182780 KB |
Output is correct |
77 |
Correct |
1876 ms |
170540 KB |
Output is correct |
78 |
Correct |
1602 ms |
185680 KB |
Output is correct |
79 |
Correct |
2793 ms |
180416 KB |
Output is correct |
80 |
Correct |
1962 ms |
172096 KB |
Output is correct |
81 |
Correct |
1415 ms |
185508 KB |
Output is correct |
82 |
Correct |
2268 ms |
183004 KB |
Output is correct |
83 |
Correct |
1986 ms |
173552 KB |
Output is correct |
84 |
Correct |
1326 ms |
189268 KB |
Output is correct |
85 |
Correct |
2071 ms |
188328 KB |
Output is correct |
86 |
Correct |
1932 ms |
180248 KB |
Output is correct |
87 |
Correct |
1442 ms |
198176 KB |
Output is correct |
88 |
Correct |
1373 ms |
190112 KB |
Output is correct |
89 |
Correct |
1490 ms |
189732 KB |
Output is correct |
90 |
Correct |
1110 ms |
190120 KB |
Output is correct |
91 |
Correct |
1279 ms |
190696 KB |
Output is correct |
92 |
Correct |
1636 ms |
189312 KB |
Output is correct |
93 |
Correct |
1341 ms |
182668 KB |
Output is correct |
94 |
Correct |
2765 ms |
182588 KB |
Output is correct |
95 |
Correct |
1638 ms |
184216 KB |
Output is correct |
96 |
Correct |
3053 ms |
184804 KB |
Output is correct |
97 |
Correct |
1961 ms |
173332 KB |
Output is correct |
98 |
Correct |
1944 ms |
172924 KB |
Output is correct |
99 |
Correct |
246 ms |
95760 KB |
Output is correct |
100 |
Correct |
219 ms |
84048 KB |
Output is correct |
101 |
Correct |
7 ms |
41304 KB |
Output is correct |