#include<iostream>
#include<algorithm>
#include<vector>
#include<unordered_set>
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;
unordered_set<int>::iterator it;
};
int in,n,q;
unordered_set<int> edge[MAX_N];
int cidx=0;
int cnt[MAX_N<<1];
int col[MAX_N<<1];
lint sum[MAX_Q],sump[MAX_Q];
int getmin(int x,int y)
{
vector<Obj> vx={{x,y,edge[x].begin()}},vy={{y,x,edge[y].begin()}};
while(1)
{
while(!vx.empty())
{
auto p=vx.back();
if(p.it==edge[p.v].end())
{
vx.pop_back();
continue;
}
int v=*p.it;
vx.back().it=next(p.it);
if(v==p.p)continue;
vx.push_back({v,p.v,edge[v].begin()});
break;
}
if(vx.empty())return x;
while(!vy.empty())
{
auto p=vy.back();
if(p.it==edge[p.v].end())
{
vy.pop_back();
continue;
}
int v=*p.it;
vy.back().it=next(p.it);
if(v==p.p)continue;
vy.push_back({v,p.v,edge[v].begin()});
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(auto v0 : edge[v])
if(v0!=p)
colorall(v0,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]);
edge[x].insert(y);
edge[y].insert(x);
}
if(o==2)
{
cin >> x >> y;
if(in)x^=lasta,y^=lasta;
edge[x].erase(y);
edge[y].erase(x);
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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
32092 KB |
Output is correct |
2 |
Correct |
6 ms |
32092 KB |
Output is correct |
3 |
Correct |
6 ms |
32092 KB |
Output is correct |
4 |
Correct |
6 ms |
32324 KB |
Output is correct |
5 |
Correct |
6 ms |
32344 KB |
Output is correct |
6 |
Correct |
6 ms |
32092 KB |
Output is correct |
7 |
Correct |
8 ms |
32092 KB |
Output is correct |
8 |
Correct |
6 ms |
32092 KB |
Output is correct |
9 |
Correct |
6 ms |
32088 KB |
Output is correct |
10 |
Correct |
6 ms |
32088 KB |
Output is correct |
11 |
Correct |
6 ms |
32092 KB |
Output is correct |
12 |
Correct |
7 ms |
32192 KB |
Output is correct |
13 |
Correct |
6 ms |
32092 KB |
Output is correct |
14 |
Correct |
6 ms |
32092 KB |
Output is correct |
15 |
Correct |
6 ms |
32092 KB |
Output is correct |
16 |
Correct |
6 ms |
32092 KB |
Output is correct |
17 |
Correct |
7 ms |
32092 KB |
Output is correct |
18 |
Correct |
6 ms |
32092 KB |
Output is correct |
19 |
Correct |
6 ms |
32088 KB |
Output is correct |
20 |
Correct |
6 ms |
32092 KB |
Output is correct |
21 |
Correct |
7 ms |
32092 KB |
Output is correct |
22 |
Correct |
6 ms |
32092 KB |
Output is correct |
23 |
Correct |
6 ms |
32092 KB |
Output is correct |
24 |
Correct |
6 ms |
32212 KB |
Output is correct |
25 |
Correct |
6 ms |
32092 KB |
Output is correct |
26 |
Correct |
6 ms |
32092 KB |
Output is correct |
27 |
Correct |
6 ms |
32208 KB |
Output is correct |
28 |
Correct |
6 ms |
32088 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
32092 KB |
Output is correct |
2 |
Correct |
6 ms |
32092 KB |
Output is correct |
3 |
Correct |
6 ms |
32092 KB |
Output is correct |
4 |
Correct |
6 ms |
32208 KB |
Output is correct |
5 |
Correct |
6 ms |
32092 KB |
Output is correct |
6 |
Correct |
5 ms |
32092 KB |
Output is correct |
7 |
Correct |
5 ms |
32092 KB |
Output is correct |
8 |
Correct |
7 ms |
32092 KB |
Output is correct |
9 |
Correct |
6 ms |
32184 KB |
Output is correct |
10 |
Correct |
6 ms |
32092 KB |
Output is correct |
11 |
Correct |
6 ms |
32092 KB |
Output is correct |
12 |
Correct |
6 ms |
32224 KB |
Output is correct |
13 |
Correct |
6 ms |
32192 KB |
Output is correct |
14 |
Correct |
6 ms |
32088 KB |
Output is correct |
15 |
Correct |
6 ms |
32188 KB |
Output is correct |
16 |
Correct |
6 ms |
32092 KB |
Output is correct |
17 |
Correct |
6 ms |
32344 KB |
Output is correct |
18 |
Correct |
6 ms |
32092 KB |
Output is correct |
19 |
Correct |
6 ms |
32216 KB |
Output is correct |
20 |
Correct |
6 ms |
32092 KB |
Output is correct |
21 |
Correct |
6 ms |
32088 KB |
Output is correct |
22 |
Correct |
6 ms |
32456 KB |
Output is correct |
23 |
Correct |
6 ms |
32092 KB |
Output is correct |
24 |
Correct |
6 ms |
32092 KB |
Output is correct |
25 |
Correct |
6 ms |
32092 KB |
Output is correct |
26 |
Correct |
6 ms |
32092 KB |
Output is correct |
27 |
Correct |
6 ms |
32092 KB |
Output is correct |
28 |
Correct |
6 ms |
32092 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
32092 KB |
Output is correct |
2 |
Correct |
6 ms |
32092 KB |
Output is correct |
3 |
Correct |
6 ms |
32092 KB |
Output is correct |
4 |
Correct |
6 ms |
32324 KB |
Output is correct |
5 |
Correct |
6 ms |
32344 KB |
Output is correct |
6 |
Correct |
6 ms |
32092 KB |
Output is correct |
7 |
Correct |
8 ms |
32092 KB |
Output is correct |
8 |
Correct |
6 ms |
32092 KB |
Output is correct |
9 |
Correct |
6 ms |
32088 KB |
Output is correct |
10 |
Correct |
6 ms |
32088 KB |
Output is correct |
11 |
Correct |
6 ms |
32092 KB |
Output is correct |
12 |
Correct |
7 ms |
32192 KB |
Output is correct |
13 |
Correct |
6 ms |
32092 KB |
Output is correct |
14 |
Correct |
6 ms |
32092 KB |
Output is correct |
15 |
Correct |
6 ms |
32092 KB |
Output is correct |
16 |
Correct |
6 ms |
32092 KB |
Output is correct |
17 |
Correct |
7 ms |
32092 KB |
Output is correct |
18 |
Correct |
6 ms |
32092 KB |
Output is correct |
19 |
Correct |
6 ms |
32088 KB |
Output is correct |
20 |
Correct |
6 ms |
32092 KB |
Output is correct |
21 |
Correct |
7 ms |
32092 KB |
Output is correct |
22 |
Correct |
6 ms |
32092 KB |
Output is correct |
23 |
Correct |
6 ms |
32092 KB |
Output is correct |
24 |
Correct |
6 ms |
32212 KB |
Output is correct |
25 |
Correct |
6 ms |
32092 KB |
Output is correct |
26 |
Correct |
6 ms |
32092 KB |
Output is correct |
27 |
Correct |
6 ms |
32208 KB |
Output is correct |
28 |
Correct |
6 ms |
32088 KB |
Output is correct |
29 |
Correct |
7 ms |
32856 KB |
Output is correct |
30 |
Correct |
8 ms |
32604 KB |
Output is correct |
31 |
Correct |
7 ms |
32604 KB |
Output is correct |
32 |
Correct |
8 ms |
32748 KB |
Output is correct |
33 |
Correct |
10 ms |
32604 KB |
Output is correct |
34 |
Correct |
8 ms |
32580 KB |
Output is correct |
35 |
Correct |
11 ms |
32736 KB |
Output is correct |
36 |
Correct |
8 ms |
32604 KB |
Output is correct |
37 |
Correct |
7 ms |
32604 KB |
Output is correct |
38 |
Correct |
7 ms |
32604 KB |
Output is correct |
39 |
Correct |
8 ms |
32600 KB |
Output is correct |
40 |
Correct |
8 ms |
32604 KB |
Output is correct |
41 |
Correct |
8 ms |
32724 KB |
Output is correct |
42 |
Correct |
8 ms |
32604 KB |
Output is correct |
43 |
Correct |
8 ms |
32604 KB |
Output is correct |
44 |
Correct |
9 ms |
32604 KB |
Output is correct |
45 |
Correct |
8 ms |
32600 KB |
Output is correct |
46 |
Correct |
8 ms |
32604 KB |
Output is correct |
47 |
Correct |
9 ms |
32604 KB |
Output is correct |
48 |
Correct |
8 ms |
32600 KB |
Output is correct |
49 |
Correct |
7 ms |
32604 KB |
Output is correct |
50 |
Correct |
9 ms |
32436 KB |
Output is correct |
51 |
Correct |
7 ms |
32348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
32092 KB |
Output is correct |
2 |
Correct |
6 ms |
32092 KB |
Output is correct |
3 |
Correct |
6 ms |
32092 KB |
Output is correct |
4 |
Correct |
6 ms |
32208 KB |
Output is correct |
5 |
Correct |
6 ms |
32092 KB |
Output is correct |
6 |
Correct |
5 ms |
32092 KB |
Output is correct |
7 |
Correct |
5 ms |
32092 KB |
Output is correct |
8 |
Correct |
7 ms |
32092 KB |
Output is correct |
9 |
Correct |
6 ms |
32184 KB |
Output is correct |
10 |
Correct |
6 ms |
32092 KB |
Output is correct |
11 |
Correct |
6 ms |
32092 KB |
Output is correct |
12 |
Correct |
6 ms |
32224 KB |
Output is correct |
13 |
Correct |
6 ms |
32192 KB |
Output is correct |
14 |
Correct |
6 ms |
32088 KB |
Output is correct |
15 |
Correct |
6 ms |
32188 KB |
Output is correct |
16 |
Correct |
6 ms |
32092 KB |
Output is correct |
17 |
Correct |
6 ms |
32344 KB |
Output is correct |
18 |
Correct |
6 ms |
32092 KB |
Output is correct |
19 |
Correct |
6 ms |
32216 KB |
Output is correct |
20 |
Correct |
6 ms |
32092 KB |
Output is correct |
21 |
Correct |
6 ms |
32088 KB |
Output is correct |
22 |
Correct |
6 ms |
32456 KB |
Output is correct |
23 |
Correct |
6 ms |
32092 KB |
Output is correct |
24 |
Correct |
6 ms |
32092 KB |
Output is correct |
25 |
Correct |
6 ms |
32092 KB |
Output is correct |
26 |
Correct |
6 ms |
32092 KB |
Output is correct |
27 |
Correct |
6 ms |
32092 KB |
Output is correct |
28 |
Correct |
6 ms |
32092 KB |
Output is correct |
29 |
Correct |
7 ms |
32604 KB |
Output is correct |
30 |
Correct |
7 ms |
32604 KB |
Output is correct |
31 |
Correct |
7 ms |
32604 KB |
Output is correct |
32 |
Correct |
10 ms |
32604 KB |
Output is correct |
33 |
Correct |
8 ms |
32604 KB |
Output is correct |
34 |
Correct |
7 ms |
32604 KB |
Output is correct |
35 |
Correct |
8 ms |
32600 KB |
Output is correct |
36 |
Correct |
8 ms |
32604 KB |
Output is correct |
37 |
Correct |
8 ms |
32476 KB |
Output is correct |
38 |
Correct |
8 ms |
32600 KB |
Output is correct |
39 |
Correct |
7 ms |
32604 KB |
Output is correct |
40 |
Correct |
7 ms |
32604 KB |
Output is correct |
41 |
Correct |
7 ms |
32716 KB |
Output is correct |
42 |
Correct |
9 ms |
32604 KB |
Output is correct |
43 |
Correct |
8 ms |
32604 KB |
Output is correct |
44 |
Correct |
7 ms |
32776 KB |
Output is correct |
45 |
Correct |
8 ms |
32604 KB |
Output is correct |
46 |
Correct |
7 ms |
32700 KB |
Output is correct |
47 |
Correct |
8 ms |
32604 KB |
Output is correct |
48 |
Correct |
8 ms |
32604 KB |
Output is correct |
49 |
Correct |
8 ms |
32604 KB |
Output is correct |
50 |
Correct |
7 ms |
32480 KB |
Output is correct |
51 |
Correct |
7 ms |
32348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
32092 KB |
Output is correct |
2 |
Correct |
6 ms |
32092 KB |
Output is correct |
3 |
Correct |
6 ms |
32092 KB |
Output is correct |
4 |
Correct |
6 ms |
32324 KB |
Output is correct |
5 |
Correct |
6 ms |
32344 KB |
Output is correct |
6 |
Correct |
6 ms |
32092 KB |
Output is correct |
7 |
Correct |
8 ms |
32092 KB |
Output is correct |
8 |
Correct |
6 ms |
32092 KB |
Output is correct |
9 |
Correct |
6 ms |
32088 KB |
Output is correct |
10 |
Correct |
6 ms |
32088 KB |
Output is correct |
11 |
Correct |
6 ms |
32092 KB |
Output is correct |
12 |
Correct |
7 ms |
32192 KB |
Output is correct |
13 |
Correct |
6 ms |
32092 KB |
Output is correct |
14 |
Correct |
6 ms |
32092 KB |
Output is correct |
15 |
Correct |
6 ms |
32092 KB |
Output is correct |
16 |
Correct |
6 ms |
32092 KB |
Output is correct |
17 |
Correct |
7 ms |
32092 KB |
Output is correct |
18 |
Correct |
6 ms |
32092 KB |
Output is correct |
19 |
Correct |
6 ms |
32088 KB |
Output is correct |
20 |
Correct |
6 ms |
32092 KB |
Output is correct |
21 |
Correct |
7 ms |
32092 KB |
Output is correct |
22 |
Correct |
6 ms |
32092 KB |
Output is correct |
23 |
Correct |
6 ms |
32092 KB |
Output is correct |
24 |
Correct |
6 ms |
32212 KB |
Output is correct |
25 |
Correct |
6 ms |
32092 KB |
Output is correct |
26 |
Correct |
6 ms |
32092 KB |
Output is correct |
27 |
Correct |
6 ms |
32208 KB |
Output is correct |
28 |
Correct |
6 ms |
32088 KB |
Output is correct |
29 |
Correct |
7 ms |
32856 KB |
Output is correct |
30 |
Correct |
8 ms |
32604 KB |
Output is correct |
31 |
Correct |
7 ms |
32604 KB |
Output is correct |
32 |
Correct |
8 ms |
32748 KB |
Output is correct |
33 |
Correct |
10 ms |
32604 KB |
Output is correct |
34 |
Correct |
8 ms |
32580 KB |
Output is correct |
35 |
Correct |
11 ms |
32736 KB |
Output is correct |
36 |
Correct |
8 ms |
32604 KB |
Output is correct |
37 |
Correct |
7 ms |
32604 KB |
Output is correct |
38 |
Correct |
7 ms |
32604 KB |
Output is correct |
39 |
Correct |
8 ms |
32600 KB |
Output is correct |
40 |
Correct |
8 ms |
32604 KB |
Output is correct |
41 |
Correct |
8 ms |
32724 KB |
Output is correct |
42 |
Correct |
8 ms |
32604 KB |
Output is correct |
43 |
Correct |
8 ms |
32604 KB |
Output is correct |
44 |
Correct |
9 ms |
32604 KB |
Output is correct |
45 |
Correct |
8 ms |
32600 KB |
Output is correct |
46 |
Correct |
8 ms |
32604 KB |
Output is correct |
47 |
Correct |
9 ms |
32604 KB |
Output is correct |
48 |
Correct |
8 ms |
32600 KB |
Output is correct |
49 |
Correct |
7 ms |
32604 KB |
Output is correct |
50 |
Correct |
9 ms |
32436 KB |
Output is correct |
51 |
Correct |
7 ms |
32348 KB |
Output is correct |
52 |
Correct |
99 ms |
57428 KB |
Output is correct |
53 |
Correct |
89 ms |
57428 KB |
Output is correct |
54 |
Correct |
117 ms |
54704 KB |
Output is correct |
55 |
Correct |
102 ms |
57424 KB |
Output is correct |
56 |
Correct |
145 ms |
57428 KB |
Output is correct |
57 |
Correct |
116 ms |
54608 KB |
Output is correct |
58 |
Correct |
87 ms |
57428 KB |
Output is correct |
59 |
Correct |
141 ms |
57380 KB |
Output is correct |
60 |
Correct |
150 ms |
55008 KB |
Output is correct |
61 |
Correct |
96 ms |
58920 KB |
Output is correct |
62 |
Correct |
103 ms |
58876 KB |
Output is correct |
63 |
Correct |
111 ms |
55904 KB |
Output is correct |
64 |
Correct |
129 ms |
58836 KB |
Output is correct |
65 |
Correct |
111 ms |
58712 KB |
Output is correct |
66 |
Correct |
134 ms |
55652 KB |
Output is correct |
67 |
Correct |
95 ms |
57616 KB |
Output is correct |
68 |
Correct |
121 ms |
57400 KB |
Output is correct |
69 |
Correct |
96 ms |
57632 KB |
Output is correct |
70 |
Correct |
149 ms |
57588 KB |
Output is correct |
71 |
Correct |
142 ms |
54864 KB |
Output is correct |
72 |
Correct |
117 ms |
54608 KB |
Output is correct |
73 |
Correct |
49 ms |
41552 KB |
Output is correct |
74 |
Correct |
48 ms |
39932 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
32092 KB |
Output is correct |
2 |
Correct |
6 ms |
32092 KB |
Output is correct |
3 |
Correct |
6 ms |
32092 KB |
Output is correct |
4 |
Correct |
6 ms |
32208 KB |
Output is correct |
5 |
Correct |
6 ms |
32092 KB |
Output is correct |
6 |
Correct |
5 ms |
32092 KB |
Output is correct |
7 |
Correct |
5 ms |
32092 KB |
Output is correct |
8 |
Correct |
7 ms |
32092 KB |
Output is correct |
9 |
Correct |
6 ms |
32184 KB |
Output is correct |
10 |
Correct |
6 ms |
32092 KB |
Output is correct |
11 |
Correct |
6 ms |
32092 KB |
Output is correct |
12 |
Correct |
6 ms |
32224 KB |
Output is correct |
13 |
Correct |
6 ms |
32192 KB |
Output is correct |
14 |
Correct |
6 ms |
32088 KB |
Output is correct |
15 |
Correct |
6 ms |
32188 KB |
Output is correct |
16 |
Correct |
6 ms |
32092 KB |
Output is correct |
17 |
Correct |
6 ms |
32344 KB |
Output is correct |
18 |
Correct |
6 ms |
32092 KB |
Output is correct |
19 |
Correct |
6 ms |
32216 KB |
Output is correct |
20 |
Correct |
6 ms |
32092 KB |
Output is correct |
21 |
Correct |
6 ms |
32088 KB |
Output is correct |
22 |
Correct |
6 ms |
32456 KB |
Output is correct |
23 |
Correct |
6 ms |
32092 KB |
Output is correct |
24 |
Correct |
6 ms |
32092 KB |
Output is correct |
25 |
Correct |
6 ms |
32092 KB |
Output is correct |
26 |
Correct |
6 ms |
32092 KB |
Output is correct |
27 |
Correct |
6 ms |
32092 KB |
Output is correct |
28 |
Correct |
6 ms |
32092 KB |
Output is correct |
29 |
Correct |
7 ms |
32604 KB |
Output is correct |
30 |
Correct |
7 ms |
32604 KB |
Output is correct |
31 |
Correct |
7 ms |
32604 KB |
Output is correct |
32 |
Correct |
10 ms |
32604 KB |
Output is correct |
33 |
Correct |
8 ms |
32604 KB |
Output is correct |
34 |
Correct |
7 ms |
32604 KB |
Output is correct |
35 |
Correct |
8 ms |
32600 KB |
Output is correct |
36 |
Correct |
8 ms |
32604 KB |
Output is correct |
37 |
Correct |
8 ms |
32476 KB |
Output is correct |
38 |
Correct |
8 ms |
32600 KB |
Output is correct |
39 |
Correct |
7 ms |
32604 KB |
Output is correct |
40 |
Correct |
7 ms |
32604 KB |
Output is correct |
41 |
Correct |
7 ms |
32716 KB |
Output is correct |
42 |
Correct |
9 ms |
32604 KB |
Output is correct |
43 |
Correct |
8 ms |
32604 KB |
Output is correct |
44 |
Correct |
7 ms |
32776 KB |
Output is correct |
45 |
Correct |
8 ms |
32604 KB |
Output is correct |
46 |
Correct |
7 ms |
32700 KB |
Output is correct |
47 |
Correct |
8 ms |
32604 KB |
Output is correct |
48 |
Correct |
8 ms |
32604 KB |
Output is correct |
49 |
Correct |
8 ms |
32604 KB |
Output is correct |
50 |
Correct |
7 ms |
32480 KB |
Output is correct |
51 |
Correct |
7 ms |
32348 KB |
Output is correct |
52 |
Correct |
116 ms |
57424 KB |
Output is correct |
53 |
Correct |
95 ms |
57572 KB |
Output is correct |
54 |
Correct |
106 ms |
54720 KB |
Output is correct |
55 |
Correct |
114 ms |
57424 KB |
Output is correct |
56 |
Correct |
146 ms |
57428 KB |
Output is correct |
57 |
Correct |
129 ms |
54608 KB |
Output is correct |
58 |
Correct |
102 ms |
57420 KB |
Output is correct |
59 |
Correct |
123 ms |
57424 KB |
Output is correct |
60 |
Correct |
124 ms |
54864 KB |
Output is correct |
61 |
Correct |
115 ms |
58820 KB |
Output is correct |
62 |
Correct |
115 ms |
58824 KB |
Output is correct |
63 |
Correct |
123 ms |
55884 KB |
Output is correct |
64 |
Correct |
106 ms |
58704 KB |
Output is correct |
65 |
Correct |
128 ms |
58772 KB |
Output is correct |
66 |
Correct |
130 ms |
55788 KB |
Output is correct |
67 |
Correct |
113 ms |
57428 KB |
Output is correct |
68 |
Correct |
137 ms |
57428 KB |
Output is correct |
69 |
Correct |
117 ms |
57428 KB |
Output is correct |
70 |
Correct |
161 ms |
57756 KB |
Output is correct |
71 |
Correct |
132 ms |
54612 KB |
Output is correct |
72 |
Correct |
126 ms |
54612 KB |
Output is correct |
73 |
Correct |
51 ms |
41620 KB |
Output is correct |
74 |
Correct |
46 ms |
39764 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
32092 KB |
Output is correct |
2 |
Correct |
6 ms |
32092 KB |
Output is correct |
3 |
Correct |
6 ms |
32092 KB |
Output is correct |
4 |
Correct |
6 ms |
32208 KB |
Output is correct |
5 |
Correct |
6 ms |
32092 KB |
Output is correct |
6 |
Correct |
5 ms |
32092 KB |
Output is correct |
7 |
Correct |
5 ms |
32092 KB |
Output is correct |
8 |
Correct |
7 ms |
32092 KB |
Output is correct |
9 |
Correct |
6 ms |
32184 KB |
Output is correct |
10 |
Correct |
6 ms |
32092 KB |
Output is correct |
11 |
Correct |
6 ms |
32092 KB |
Output is correct |
12 |
Correct |
6 ms |
32224 KB |
Output is correct |
13 |
Correct |
6 ms |
32192 KB |
Output is correct |
14 |
Correct |
6 ms |
32088 KB |
Output is correct |
15 |
Correct |
6 ms |
32188 KB |
Output is correct |
16 |
Correct |
6 ms |
32092 KB |
Output is correct |
17 |
Correct |
6 ms |
32344 KB |
Output is correct |
18 |
Correct |
6 ms |
32092 KB |
Output is correct |
19 |
Correct |
6 ms |
32216 KB |
Output is correct |
20 |
Correct |
6 ms |
32092 KB |
Output is correct |
21 |
Correct |
6 ms |
32088 KB |
Output is correct |
22 |
Correct |
6 ms |
32456 KB |
Output is correct |
23 |
Correct |
6 ms |
32092 KB |
Output is correct |
24 |
Correct |
6 ms |
32092 KB |
Output is correct |
25 |
Correct |
6 ms |
32092 KB |
Output is correct |
26 |
Correct |
6 ms |
32092 KB |
Output is correct |
27 |
Correct |
6 ms |
32092 KB |
Output is correct |
28 |
Correct |
6 ms |
32092 KB |
Output is correct |
29 |
Correct |
7 ms |
32604 KB |
Output is correct |
30 |
Correct |
7 ms |
32604 KB |
Output is correct |
31 |
Correct |
7 ms |
32604 KB |
Output is correct |
32 |
Correct |
10 ms |
32604 KB |
Output is correct |
33 |
Correct |
8 ms |
32604 KB |
Output is correct |
34 |
Correct |
7 ms |
32604 KB |
Output is correct |
35 |
Correct |
8 ms |
32600 KB |
Output is correct |
36 |
Correct |
8 ms |
32604 KB |
Output is correct |
37 |
Correct |
8 ms |
32476 KB |
Output is correct |
38 |
Correct |
8 ms |
32600 KB |
Output is correct |
39 |
Correct |
7 ms |
32604 KB |
Output is correct |
40 |
Correct |
7 ms |
32604 KB |
Output is correct |
41 |
Correct |
7 ms |
32716 KB |
Output is correct |
42 |
Correct |
9 ms |
32604 KB |
Output is correct |
43 |
Correct |
8 ms |
32604 KB |
Output is correct |
44 |
Correct |
7 ms |
32776 KB |
Output is correct |
45 |
Correct |
8 ms |
32604 KB |
Output is correct |
46 |
Correct |
7 ms |
32700 KB |
Output is correct |
47 |
Correct |
8 ms |
32604 KB |
Output is correct |
48 |
Correct |
8 ms |
32604 KB |
Output is correct |
49 |
Correct |
8 ms |
32604 KB |
Output is correct |
50 |
Correct |
7 ms |
32480 KB |
Output is correct |
51 |
Correct |
7 ms |
32348 KB |
Output is correct |
52 |
Correct |
116 ms |
57424 KB |
Output is correct |
53 |
Correct |
95 ms |
57572 KB |
Output is correct |
54 |
Correct |
106 ms |
54720 KB |
Output is correct |
55 |
Correct |
114 ms |
57424 KB |
Output is correct |
56 |
Correct |
146 ms |
57428 KB |
Output is correct |
57 |
Correct |
129 ms |
54608 KB |
Output is correct |
58 |
Correct |
102 ms |
57420 KB |
Output is correct |
59 |
Correct |
123 ms |
57424 KB |
Output is correct |
60 |
Correct |
124 ms |
54864 KB |
Output is correct |
61 |
Correct |
115 ms |
58820 KB |
Output is correct |
62 |
Correct |
115 ms |
58824 KB |
Output is correct |
63 |
Correct |
123 ms |
55884 KB |
Output is correct |
64 |
Correct |
106 ms |
58704 KB |
Output is correct |
65 |
Correct |
128 ms |
58772 KB |
Output is correct |
66 |
Correct |
130 ms |
55788 KB |
Output is correct |
67 |
Correct |
113 ms |
57428 KB |
Output is correct |
68 |
Correct |
137 ms |
57428 KB |
Output is correct |
69 |
Correct |
117 ms |
57428 KB |
Output is correct |
70 |
Correct |
161 ms |
57756 KB |
Output is correct |
71 |
Correct |
132 ms |
54612 KB |
Output is correct |
72 |
Correct |
126 ms |
54612 KB |
Output is correct |
73 |
Correct |
51 ms |
41620 KB |
Output is correct |
74 |
Correct |
46 ms |
39764 KB |
Output is correct |
75 |
Correct |
569 ms |
151344 KB |
Output is correct |
76 |
Correct |
645 ms |
151444 KB |
Output is correct |
77 |
Correct |
937 ms |
136784 KB |
Output is correct |
78 |
Correct |
583 ms |
151380 KB |
Output is correct |
79 |
Correct |
1177 ms |
151120 KB |
Output is correct |
80 |
Correct |
1046 ms |
136484 KB |
Output is correct |
81 |
Correct |
649 ms |
151156 KB |
Output is correct |
82 |
Correct |
1045 ms |
150864 KB |
Output is correct |
83 |
Correct |
1012 ms |
136712 KB |
Output is correct |
84 |
Correct |
719 ms |
151452 KB |
Output is correct |
85 |
Correct |
895 ms |
150864 KB |
Output is correct |
86 |
Correct |
1104 ms |
137228 KB |
Output is correct |
87 |
Correct |
750 ms |
156776 KB |
Output is correct |
88 |
Correct |
768 ms |
156864 KB |
Output is correct |
89 |
Correct |
918 ms |
142220 KB |
Output is correct |
90 |
Correct |
596 ms |
155728 KB |
Output is correct |
91 |
Correct |
657 ms |
155444 KB |
Output is correct |
92 |
Correct |
1051 ms |
143140 KB |
Output is correct |
93 |
Correct |
633 ms |
151380 KB |
Output is correct |
94 |
Correct |
1160 ms |
151044 KB |
Output is correct |
95 |
Correct |
743 ms |
151376 KB |
Output is correct |
96 |
Correct |
1439 ms |
150968 KB |
Output is correct |
97 |
Correct |
968 ms |
136528 KB |
Output is correct |
98 |
Correct |
925 ms |
136584 KB |
Output is correct |
99 |
Correct |
232 ms |
71504 KB |
Output is correct |
100 |
Correct |
213 ms |
62032 KB |
Output is correct |
101 |
Correct |
6 ms |
32092 KB |
Output is correct |