#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx,avx2,sse,sse2")
#include<bits/stdc++.h>
#define int long long
//#define ll long long
#define down cout<<'\n';
#define NHP ios_base::sync_with_stdio(0);cout.tie(0);cin.tie(0);
#define modwwe int t;cin>>t; while(t--)
#define bit(i,j) (i>>j&1)
#define sobit(a) __builtin_popcountll(a)
#define task "test"
#define fin(x) freopen(x".inp","r",stdin)
#define fou(x) freopen(x".out","w",stdout)
#define pb push_back
#define checktime cerr << (double)clock() / CLOCKS_PER_SEC * 1000 << " ms";
using namespace std;
void ngha();
const int mod2=1e9+7;
const int mod1=998244353;
struct ib
{
int a;
int b;
};
struct icd
{
int a,b;
};
struct ic
{
int a,b,c;
};
struct id
{
int a,b,c,d;
};
struct ie
{
int a,b,c, d,e;
};
int n,m,s1,s2,s4,s3,sf,k,r,mid,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,l;
int i,s10,s12;
int el=29;
main()
{
//#ifndef ONLINE_JUDGE
// fin(task),fou(task);
//#endif
NHP
//modwwe
// cin>>res;
ngha();
}
int c[250001];
ic t[1000001];
id b[250001];
void ff(int x)
{
for(int i=x*2;i<=x*2+1;i++)
{
if(t[i].a>=t[x].b)t[i].a-=t[x].b;
else t[i].b+=t[x].b-t[i].a,t[i].a=0;
t[i].a+=t[x].a;
t[i].c+=t[x].c;
}
t[x].a=t[x].b=t[x].c=0;
}
void upd(int node,int l,int r,int l1,int r1,int k,int z)
{
if(l>r1||r<l1) return;
if(l>=l1&&r<=r1)
{ if(k==1)
t[node].a+=z,t[node].c+=z;
if(k==0)
{
if(t[node].a>=z)t[node].a-=z;
else t[node].b+=z-t[node].a,t[node].a=0;
}
return;
}
ff(node);
int mid=l+r>>1;
upd(node<<1,l,mid,l1,r1,k,z);
upd(node<<1|1,mid+1,r,l1,r1,k,z);
}
int get(int node,int l,int r,int l1,int r1)
{
if(l>r1||r<l1) return 0;
if(l>=l1&&r<=r1) return t[node].a;
int mid=l+r>>1;
ff(node);
return get(node<<1,l,mid,l1,r1)+get(node<<1|1,mid+1,r,l1,r1);
}
int get2(int node,int l,int r,int l1,int r1)
{
if(l>r1||r<l1) return 0;
if(l>=l1&&r<=r1) return t[node].c;
int mid=l+r>>1;
ff(node);
return get2(node<<1,l,mid,l1,r1)+get2(node<<1|1,mid+1,r,l1,r1);
}
int bit[250001];
void upd(int x,int y)
{
for(x;x<=k;x+=x&-x)
bit[x]+=y;
}
int get(int x)
{ int ss=0;
for(x;x;x-=x&-x)
ss+=bit[x];
return ss;
}
vector<ib> v[250001];
vector<ib> v2[250002];
vector<ib> v3[250002];
void ngha()
{
cin>>n>>m>>k;
for(int i=1;i<=k;i++)
{
cin>>l;
if(l==3){cin>>l>>r;
c[++dem]=0;
s2=get2(1,1,n,l,l);
s3=get(1,1,n,l,l);
//cout<<s3 ,down
///cout<<s2-s3+r<<" "<<l<<" "<<r<<" "<<s3,down
/// if(i==90) cout<<r<<" "<<s3<<" cucucuc",down
if(r<=s3)
{ ///cout<<s2-s3+r<<" "<<s3,down
/// cout<<i<<" cucu "<<dem,down
v[l].pb({s2-s3+r,dem});
}
}
else
if(l==2)
{
cin>>l>>r>>s3;
upd(1,1,n,l,r,0,s3);
}
else
if(l==1)
{
cin>>l>>r>>s2>>s3;
b[++dem2]={l,r,s2,s3};
upd(1,1,n,l,r,1,s3);
///if(i==1)
/// cout<<get(1,1,n,3,3),down
}
}
for(int i=1;i<=dem2;i++)
{
v2[b[i].a].pb({b[i].d,i});
v3[b[i].b+1].pb({b[i].d,i});
}
for(int i=1;i<=n;i++)
{
for(auto x:v2[i])
{
upd(x.b,x.a);
}
for(auto x:v3[i])
{
upd(x.b,-x.a);
}
for(auto x:v[i])
{
l=1;
r=k;
while(l<=r)
{
int mid=l+r>>1;
if(get(mid)>=x.a)r=mid-1;
else l=mid+1;
}
/// cout<<r+1<<" "<<dem2<<" "<<get(3),down
c[x.b]=b[r+1].c;
}
}
for(int i=1;i<=dem;i++)
cout<<c[i],down
}
Compilation message
foodcourt.cpp:45:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
45 | main()
| ^~~~
foodcourt.cpp: In function 'void upd(long long int, long long int, long long int, long long int, long long int, long long int, long long int)':
foodcourt.cpp:84:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
84 | int mid=l+r>>1;
| ~^~
foodcourt.cpp: In function 'long long int get(long long int, long long int, long long int, long long int, long long int)':
foodcourt.cpp:92:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
92 | int mid=l+r>>1;
| ~^~
foodcourt.cpp: In function 'long long int get2(long long int, long long int, long long int, long long int, long long int)':
foodcourt.cpp:100:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
100 | int mid=l+r>>1;
| ~^~
foodcourt.cpp: In function 'void upd(long long int, long long int)':
foodcourt.cpp:107:10: warning: statement has no effect [-Wunused-value]
107 | for(x;x<=k;x+=x&-x)
| ^
foodcourt.cpp: In function 'long long int get(long long int)':
foodcourt.cpp:112:11: warning: statement has no effect [-Wunused-value]
112 | for(x;x;x-=x&-x)
| ^
foodcourt.cpp: In function 'void ngha()':
foodcourt.cpp:175:29: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
175 | int mid=l+r>>1;
| ~^~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
23128 KB |
Output is correct |
2 |
Correct |
8 ms |
23208 KB |
Output is correct |
3 |
Correct |
8 ms |
23232 KB |
Output is correct |
4 |
Correct |
7 ms |
23384 KB |
Output is correct |
5 |
Correct |
9 ms |
23384 KB |
Output is correct |
6 |
Correct |
7 ms |
23128 KB |
Output is correct |
7 |
Correct |
7 ms |
23388 KB |
Output is correct |
8 |
Correct |
7 ms |
23388 KB |
Output is correct |
9 |
Correct |
8 ms |
23384 KB |
Output is correct |
10 |
Correct |
7 ms |
23388 KB |
Output is correct |
11 |
Correct |
8 ms |
23388 KB |
Output is correct |
12 |
Correct |
8 ms |
23384 KB |
Output is correct |
13 |
Correct |
7 ms |
23384 KB |
Output is correct |
14 |
Correct |
7 ms |
23388 KB |
Output is correct |
15 |
Correct |
8 ms |
23132 KB |
Output is correct |
16 |
Correct |
7 ms |
23388 KB |
Output is correct |
17 |
Correct |
7 ms |
23468 KB |
Output is correct |
18 |
Correct |
8 ms |
23352 KB |
Output is correct |
19 |
Correct |
7 ms |
23384 KB |
Output is correct |
20 |
Correct |
9 ms |
23388 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
23128 KB |
Output is correct |
2 |
Correct |
8 ms |
23208 KB |
Output is correct |
3 |
Correct |
8 ms |
23232 KB |
Output is correct |
4 |
Correct |
7 ms |
23384 KB |
Output is correct |
5 |
Correct |
9 ms |
23384 KB |
Output is correct |
6 |
Correct |
7 ms |
23128 KB |
Output is correct |
7 |
Correct |
7 ms |
23388 KB |
Output is correct |
8 |
Correct |
7 ms |
23388 KB |
Output is correct |
9 |
Correct |
8 ms |
23384 KB |
Output is correct |
10 |
Correct |
7 ms |
23388 KB |
Output is correct |
11 |
Correct |
8 ms |
23388 KB |
Output is correct |
12 |
Correct |
8 ms |
23384 KB |
Output is correct |
13 |
Correct |
7 ms |
23384 KB |
Output is correct |
14 |
Correct |
7 ms |
23388 KB |
Output is correct |
15 |
Correct |
8 ms |
23132 KB |
Output is correct |
16 |
Correct |
7 ms |
23388 KB |
Output is correct |
17 |
Correct |
7 ms |
23468 KB |
Output is correct |
18 |
Correct |
8 ms |
23352 KB |
Output is correct |
19 |
Correct |
7 ms |
23384 KB |
Output is correct |
20 |
Correct |
9 ms |
23388 KB |
Output is correct |
21 |
Correct |
8 ms |
23384 KB |
Output is correct |
22 |
Correct |
8 ms |
23232 KB |
Output is correct |
23 |
Correct |
8 ms |
23388 KB |
Output is correct |
24 |
Correct |
8 ms |
23388 KB |
Output is correct |
25 |
Correct |
7 ms |
23252 KB |
Output is correct |
26 |
Correct |
9 ms |
25180 KB |
Output is correct |
27 |
Correct |
8 ms |
23388 KB |
Output is correct |
28 |
Correct |
7 ms |
23388 KB |
Output is correct |
29 |
Correct |
9 ms |
23392 KB |
Output is correct |
30 |
Correct |
8 ms |
23388 KB |
Output is correct |
31 |
Correct |
8 ms |
23240 KB |
Output is correct |
32 |
Correct |
7 ms |
23388 KB |
Output is correct |
33 |
Correct |
6 ms |
23220 KB |
Output is correct |
34 |
Correct |
8 ms |
23388 KB |
Output is correct |
35 |
Correct |
8 ms |
23388 KB |
Output is correct |
36 |
Correct |
8 ms |
23360 KB |
Output is correct |
37 |
Correct |
7 ms |
23388 KB |
Output is correct |
38 |
Correct |
8 ms |
23388 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
51 ms |
27524 KB |
Output is correct |
2 |
Correct |
58 ms |
28060 KB |
Output is correct |
3 |
Correct |
50 ms |
27472 KB |
Output is correct |
4 |
Correct |
49 ms |
27560 KB |
Output is correct |
5 |
Correct |
51 ms |
27992 KB |
Output is correct |
6 |
Correct |
49 ms |
28060 KB |
Output is correct |
7 |
Correct |
20 ms |
24212 KB |
Output is correct |
8 |
Correct |
23 ms |
24280 KB |
Output is correct |
9 |
Correct |
49 ms |
27556 KB |
Output is correct |
10 |
Correct |
50 ms |
27564 KB |
Output is correct |
11 |
Correct |
50 ms |
27472 KB |
Output is correct |
12 |
Correct |
50 ms |
27472 KB |
Output is correct |
13 |
Correct |
46 ms |
27984 KB |
Output is correct |
14 |
Correct |
57 ms |
28260 KB |
Output is correct |
15 |
Correct |
52 ms |
31060 KB |
Output is correct |
16 |
Correct |
54 ms |
31140 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
274 ms |
43412 KB |
Output is correct |
2 |
Correct |
230 ms |
46444 KB |
Output is correct |
3 |
Correct |
305 ms |
50116 KB |
Output is correct |
4 |
Correct |
234 ms |
47920 KB |
Output is correct |
5 |
Correct |
210 ms |
48240 KB |
Output is correct |
6 |
Correct |
302 ms |
53928 KB |
Output is correct |
7 |
Correct |
78 ms |
33552 KB |
Output is correct |
8 |
Correct |
80 ms |
35684 KB |
Output is correct |
9 |
Correct |
327 ms |
55316 KB |
Output is correct |
10 |
Correct |
311 ms |
55412 KB |
Output is correct |
11 |
Correct |
264 ms |
50168 KB |
Output is correct |
12 |
Correct |
289 ms |
50444 KB |
Output is correct |
13 |
Correct |
268 ms |
50000 KB |
Output is correct |
14 |
Correct |
292 ms |
50428 KB |
Output is correct |
15 |
Correct |
293 ms |
50020 KB |
Output is correct |
16 |
Correct |
320 ms |
50000 KB |
Output is correct |
17 |
Correct |
296 ms |
50004 KB |
Output is correct |
18 |
Correct |
280 ms |
50000 KB |
Output is correct |
19 |
Correct |
315 ms |
50192 KB |
Output is correct |
20 |
Correct |
283 ms |
50196 KB |
Output is correct |
21 |
Correct |
311 ms |
50376 KB |
Output is correct |
22 |
Correct |
301 ms |
50000 KB |
Output is correct |
23 |
Correct |
332 ms |
50252 KB |
Output is correct |
24 |
Correct |
304 ms |
50004 KB |
Output is correct |
25 |
Correct |
256 ms |
49508 KB |
Output is correct |
26 |
Correct |
266 ms |
49748 KB |
Output is correct |
27 |
Correct |
220 ms |
56112 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
23128 KB |
Output is correct |
2 |
Correct |
8 ms |
23208 KB |
Output is correct |
3 |
Correct |
8 ms |
23232 KB |
Output is correct |
4 |
Correct |
7 ms |
23384 KB |
Output is correct |
5 |
Correct |
9 ms |
23384 KB |
Output is correct |
6 |
Correct |
7 ms |
23128 KB |
Output is correct |
7 |
Correct |
7 ms |
23388 KB |
Output is correct |
8 |
Correct |
7 ms |
23388 KB |
Output is correct |
9 |
Correct |
8 ms |
23384 KB |
Output is correct |
10 |
Correct |
7 ms |
23388 KB |
Output is correct |
11 |
Correct |
8 ms |
23388 KB |
Output is correct |
12 |
Correct |
8 ms |
23384 KB |
Output is correct |
13 |
Correct |
7 ms |
23384 KB |
Output is correct |
14 |
Correct |
7 ms |
23388 KB |
Output is correct |
15 |
Correct |
8 ms |
23132 KB |
Output is correct |
16 |
Correct |
7 ms |
23388 KB |
Output is correct |
17 |
Correct |
7 ms |
23468 KB |
Output is correct |
18 |
Correct |
8 ms |
23352 KB |
Output is correct |
19 |
Correct |
7 ms |
23384 KB |
Output is correct |
20 |
Correct |
9 ms |
23388 KB |
Output is correct |
21 |
Correct |
51 ms |
27524 KB |
Output is correct |
22 |
Correct |
58 ms |
28060 KB |
Output is correct |
23 |
Correct |
50 ms |
27472 KB |
Output is correct |
24 |
Correct |
49 ms |
27560 KB |
Output is correct |
25 |
Correct |
51 ms |
27992 KB |
Output is correct |
26 |
Correct |
49 ms |
28060 KB |
Output is correct |
27 |
Correct |
20 ms |
24212 KB |
Output is correct |
28 |
Correct |
23 ms |
24280 KB |
Output is correct |
29 |
Correct |
49 ms |
27556 KB |
Output is correct |
30 |
Correct |
50 ms |
27564 KB |
Output is correct |
31 |
Correct |
50 ms |
27472 KB |
Output is correct |
32 |
Correct |
50 ms |
27472 KB |
Output is correct |
33 |
Correct |
46 ms |
27984 KB |
Output is correct |
34 |
Correct |
57 ms |
28260 KB |
Output is correct |
35 |
Correct |
52 ms |
31060 KB |
Output is correct |
36 |
Correct |
54 ms |
31140 KB |
Output is correct |
37 |
Correct |
73 ms |
28844 KB |
Output is correct |
38 |
Correct |
49 ms |
28708 KB |
Output is correct |
39 |
Correct |
18 ms |
24668 KB |
Output is correct |
40 |
Correct |
24 ms |
25172 KB |
Output is correct |
41 |
Correct |
56 ms |
29060 KB |
Output is correct |
42 |
Correct |
62 ms |
29000 KB |
Output is correct |
43 |
Correct |
70 ms |
29004 KB |
Output is correct |
44 |
Correct |
60 ms |
29012 KB |
Output is correct |
45 |
Correct |
62 ms |
29044 KB |
Output is correct |
46 |
Correct |
65 ms |
29008 KB |
Output is correct |
47 |
Correct |
38 ms |
28620 KB |
Output is correct |
48 |
Correct |
55 ms |
28912 KB |
Output is correct |
49 |
Correct |
44 ms |
28240 KB |
Output is correct |
50 |
Correct |
52 ms |
28496 KB |
Output is correct |
51 |
Correct |
78 ms |
28948 KB |
Output is correct |
52 |
Correct |
62 ms |
29008 KB |
Output is correct |
53 |
Correct |
41 ms |
31572 KB |
Output is correct |
54 |
Correct |
51 ms |
32336 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
60 ms |
28488 KB |
Output is correct |
2 |
Correct |
62 ms |
28764 KB |
Output is correct |
3 |
Correct |
67 ms |
28724 KB |
Output is correct |
4 |
Correct |
51 ms |
28244 KB |
Output is correct |
5 |
Correct |
56 ms |
28500 KB |
Output is correct |
6 |
Correct |
64 ms |
28752 KB |
Output is correct |
7 |
Correct |
25 ms |
26840 KB |
Output is correct |
8 |
Correct |
24 ms |
24788 KB |
Output is correct |
9 |
Correct |
44 ms |
28880 KB |
Output is correct |
10 |
Correct |
43 ms |
27964 KB |
Output is correct |
11 |
Correct |
58 ms |
28408 KB |
Output is correct |
12 |
Correct |
57 ms |
28500 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
23128 KB |
Output is correct |
2 |
Correct |
8 ms |
23208 KB |
Output is correct |
3 |
Correct |
8 ms |
23232 KB |
Output is correct |
4 |
Correct |
7 ms |
23384 KB |
Output is correct |
5 |
Correct |
9 ms |
23384 KB |
Output is correct |
6 |
Correct |
7 ms |
23128 KB |
Output is correct |
7 |
Correct |
7 ms |
23388 KB |
Output is correct |
8 |
Correct |
7 ms |
23388 KB |
Output is correct |
9 |
Correct |
8 ms |
23384 KB |
Output is correct |
10 |
Correct |
7 ms |
23388 KB |
Output is correct |
11 |
Correct |
8 ms |
23388 KB |
Output is correct |
12 |
Correct |
8 ms |
23384 KB |
Output is correct |
13 |
Correct |
7 ms |
23384 KB |
Output is correct |
14 |
Correct |
7 ms |
23388 KB |
Output is correct |
15 |
Correct |
8 ms |
23132 KB |
Output is correct |
16 |
Correct |
7 ms |
23388 KB |
Output is correct |
17 |
Correct |
7 ms |
23468 KB |
Output is correct |
18 |
Correct |
8 ms |
23352 KB |
Output is correct |
19 |
Correct |
7 ms |
23384 KB |
Output is correct |
20 |
Correct |
9 ms |
23388 KB |
Output is correct |
21 |
Correct |
8 ms |
23384 KB |
Output is correct |
22 |
Correct |
8 ms |
23232 KB |
Output is correct |
23 |
Correct |
8 ms |
23388 KB |
Output is correct |
24 |
Correct |
8 ms |
23388 KB |
Output is correct |
25 |
Correct |
7 ms |
23252 KB |
Output is correct |
26 |
Correct |
9 ms |
25180 KB |
Output is correct |
27 |
Correct |
8 ms |
23388 KB |
Output is correct |
28 |
Correct |
7 ms |
23388 KB |
Output is correct |
29 |
Correct |
9 ms |
23392 KB |
Output is correct |
30 |
Correct |
8 ms |
23388 KB |
Output is correct |
31 |
Correct |
8 ms |
23240 KB |
Output is correct |
32 |
Correct |
7 ms |
23388 KB |
Output is correct |
33 |
Correct |
6 ms |
23220 KB |
Output is correct |
34 |
Correct |
8 ms |
23388 KB |
Output is correct |
35 |
Correct |
8 ms |
23388 KB |
Output is correct |
36 |
Correct |
8 ms |
23360 KB |
Output is correct |
37 |
Correct |
7 ms |
23388 KB |
Output is correct |
38 |
Correct |
8 ms |
23388 KB |
Output is correct |
39 |
Correct |
51 ms |
27524 KB |
Output is correct |
40 |
Correct |
58 ms |
28060 KB |
Output is correct |
41 |
Correct |
50 ms |
27472 KB |
Output is correct |
42 |
Correct |
49 ms |
27560 KB |
Output is correct |
43 |
Correct |
51 ms |
27992 KB |
Output is correct |
44 |
Correct |
49 ms |
28060 KB |
Output is correct |
45 |
Correct |
20 ms |
24212 KB |
Output is correct |
46 |
Correct |
23 ms |
24280 KB |
Output is correct |
47 |
Correct |
49 ms |
27556 KB |
Output is correct |
48 |
Correct |
50 ms |
27564 KB |
Output is correct |
49 |
Correct |
50 ms |
27472 KB |
Output is correct |
50 |
Correct |
50 ms |
27472 KB |
Output is correct |
51 |
Correct |
46 ms |
27984 KB |
Output is correct |
52 |
Correct |
57 ms |
28260 KB |
Output is correct |
53 |
Correct |
52 ms |
31060 KB |
Output is correct |
54 |
Correct |
54 ms |
31140 KB |
Output is correct |
55 |
Correct |
73 ms |
28844 KB |
Output is correct |
56 |
Correct |
49 ms |
28708 KB |
Output is correct |
57 |
Correct |
18 ms |
24668 KB |
Output is correct |
58 |
Correct |
24 ms |
25172 KB |
Output is correct |
59 |
Correct |
56 ms |
29060 KB |
Output is correct |
60 |
Correct |
62 ms |
29000 KB |
Output is correct |
61 |
Correct |
70 ms |
29004 KB |
Output is correct |
62 |
Correct |
60 ms |
29012 KB |
Output is correct |
63 |
Correct |
62 ms |
29044 KB |
Output is correct |
64 |
Correct |
65 ms |
29008 KB |
Output is correct |
65 |
Correct |
38 ms |
28620 KB |
Output is correct |
66 |
Correct |
55 ms |
28912 KB |
Output is correct |
67 |
Correct |
44 ms |
28240 KB |
Output is correct |
68 |
Correct |
52 ms |
28496 KB |
Output is correct |
69 |
Correct |
78 ms |
28948 KB |
Output is correct |
70 |
Correct |
62 ms |
29008 KB |
Output is correct |
71 |
Correct |
41 ms |
31572 KB |
Output is correct |
72 |
Correct |
51 ms |
32336 KB |
Output is correct |
73 |
Correct |
60 ms |
28488 KB |
Output is correct |
74 |
Correct |
62 ms |
28764 KB |
Output is correct |
75 |
Correct |
67 ms |
28724 KB |
Output is correct |
76 |
Correct |
51 ms |
28244 KB |
Output is correct |
77 |
Correct |
56 ms |
28500 KB |
Output is correct |
78 |
Correct |
64 ms |
28752 KB |
Output is correct |
79 |
Correct |
25 ms |
26840 KB |
Output is correct |
80 |
Correct |
24 ms |
24788 KB |
Output is correct |
81 |
Correct |
44 ms |
28880 KB |
Output is correct |
82 |
Correct |
43 ms |
27964 KB |
Output is correct |
83 |
Correct |
58 ms |
28408 KB |
Output is correct |
84 |
Correct |
57 ms |
28500 KB |
Output is correct |
85 |
Correct |
62 ms |
29108 KB |
Output is correct |
86 |
Correct |
68 ms |
29520 KB |
Output is correct |
87 |
Correct |
70 ms |
29524 KB |
Output is correct |
88 |
Correct |
65 ms |
30032 KB |
Output is correct |
89 |
Correct |
42 ms |
28496 KB |
Output is correct |
90 |
Correct |
62 ms |
29440 KB |
Output is correct |
91 |
Correct |
54 ms |
29008 KB |
Output is correct |
92 |
Correct |
52 ms |
28620 KB |
Output is correct |
93 |
Correct |
72 ms |
29524 KB |
Output is correct |
94 |
Correct |
81 ms |
29556 KB |
Output is correct |
95 |
Correct |
66 ms |
29524 KB |
Output is correct |
96 |
Correct |
67 ms |
29524 KB |
Output is correct |
97 |
Correct |
76 ms |
29732 KB |
Output is correct |
98 |
Correct |
59 ms |
29012 KB |
Output is correct |
99 |
Correct |
40 ms |
29648 KB |
Output is correct |
100 |
Correct |
52 ms |
28844 KB |
Output is correct |
101 |
Correct |
65 ms |
29268 KB |
Output is correct |
102 |
Correct |
52 ms |
32676 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
23128 KB |
Output is correct |
2 |
Correct |
8 ms |
23208 KB |
Output is correct |
3 |
Correct |
8 ms |
23232 KB |
Output is correct |
4 |
Correct |
7 ms |
23384 KB |
Output is correct |
5 |
Correct |
9 ms |
23384 KB |
Output is correct |
6 |
Correct |
7 ms |
23128 KB |
Output is correct |
7 |
Correct |
7 ms |
23388 KB |
Output is correct |
8 |
Correct |
7 ms |
23388 KB |
Output is correct |
9 |
Correct |
8 ms |
23384 KB |
Output is correct |
10 |
Correct |
7 ms |
23388 KB |
Output is correct |
11 |
Correct |
8 ms |
23388 KB |
Output is correct |
12 |
Correct |
8 ms |
23384 KB |
Output is correct |
13 |
Correct |
7 ms |
23384 KB |
Output is correct |
14 |
Correct |
7 ms |
23388 KB |
Output is correct |
15 |
Correct |
8 ms |
23132 KB |
Output is correct |
16 |
Correct |
7 ms |
23388 KB |
Output is correct |
17 |
Correct |
7 ms |
23468 KB |
Output is correct |
18 |
Correct |
8 ms |
23352 KB |
Output is correct |
19 |
Correct |
7 ms |
23384 KB |
Output is correct |
20 |
Correct |
9 ms |
23388 KB |
Output is correct |
21 |
Correct |
8 ms |
23384 KB |
Output is correct |
22 |
Correct |
8 ms |
23232 KB |
Output is correct |
23 |
Correct |
8 ms |
23388 KB |
Output is correct |
24 |
Correct |
8 ms |
23388 KB |
Output is correct |
25 |
Correct |
7 ms |
23252 KB |
Output is correct |
26 |
Correct |
9 ms |
25180 KB |
Output is correct |
27 |
Correct |
8 ms |
23388 KB |
Output is correct |
28 |
Correct |
7 ms |
23388 KB |
Output is correct |
29 |
Correct |
9 ms |
23392 KB |
Output is correct |
30 |
Correct |
8 ms |
23388 KB |
Output is correct |
31 |
Correct |
8 ms |
23240 KB |
Output is correct |
32 |
Correct |
7 ms |
23388 KB |
Output is correct |
33 |
Correct |
6 ms |
23220 KB |
Output is correct |
34 |
Correct |
8 ms |
23388 KB |
Output is correct |
35 |
Correct |
8 ms |
23388 KB |
Output is correct |
36 |
Correct |
8 ms |
23360 KB |
Output is correct |
37 |
Correct |
7 ms |
23388 KB |
Output is correct |
38 |
Correct |
8 ms |
23388 KB |
Output is correct |
39 |
Correct |
51 ms |
27524 KB |
Output is correct |
40 |
Correct |
58 ms |
28060 KB |
Output is correct |
41 |
Correct |
50 ms |
27472 KB |
Output is correct |
42 |
Correct |
49 ms |
27560 KB |
Output is correct |
43 |
Correct |
51 ms |
27992 KB |
Output is correct |
44 |
Correct |
49 ms |
28060 KB |
Output is correct |
45 |
Correct |
20 ms |
24212 KB |
Output is correct |
46 |
Correct |
23 ms |
24280 KB |
Output is correct |
47 |
Correct |
49 ms |
27556 KB |
Output is correct |
48 |
Correct |
50 ms |
27564 KB |
Output is correct |
49 |
Correct |
50 ms |
27472 KB |
Output is correct |
50 |
Correct |
50 ms |
27472 KB |
Output is correct |
51 |
Correct |
46 ms |
27984 KB |
Output is correct |
52 |
Correct |
57 ms |
28260 KB |
Output is correct |
53 |
Correct |
52 ms |
31060 KB |
Output is correct |
54 |
Correct |
54 ms |
31140 KB |
Output is correct |
55 |
Correct |
274 ms |
43412 KB |
Output is correct |
56 |
Correct |
230 ms |
46444 KB |
Output is correct |
57 |
Correct |
305 ms |
50116 KB |
Output is correct |
58 |
Correct |
234 ms |
47920 KB |
Output is correct |
59 |
Correct |
210 ms |
48240 KB |
Output is correct |
60 |
Correct |
302 ms |
53928 KB |
Output is correct |
61 |
Correct |
78 ms |
33552 KB |
Output is correct |
62 |
Correct |
80 ms |
35684 KB |
Output is correct |
63 |
Correct |
327 ms |
55316 KB |
Output is correct |
64 |
Correct |
311 ms |
55412 KB |
Output is correct |
65 |
Correct |
264 ms |
50168 KB |
Output is correct |
66 |
Correct |
289 ms |
50444 KB |
Output is correct |
67 |
Correct |
268 ms |
50000 KB |
Output is correct |
68 |
Correct |
292 ms |
50428 KB |
Output is correct |
69 |
Correct |
293 ms |
50020 KB |
Output is correct |
70 |
Correct |
320 ms |
50000 KB |
Output is correct |
71 |
Correct |
296 ms |
50004 KB |
Output is correct |
72 |
Correct |
280 ms |
50000 KB |
Output is correct |
73 |
Correct |
315 ms |
50192 KB |
Output is correct |
74 |
Correct |
283 ms |
50196 KB |
Output is correct |
75 |
Correct |
311 ms |
50376 KB |
Output is correct |
76 |
Correct |
301 ms |
50000 KB |
Output is correct |
77 |
Correct |
332 ms |
50252 KB |
Output is correct |
78 |
Correct |
304 ms |
50004 KB |
Output is correct |
79 |
Correct |
256 ms |
49508 KB |
Output is correct |
80 |
Correct |
266 ms |
49748 KB |
Output is correct |
81 |
Correct |
220 ms |
56112 KB |
Output is correct |
82 |
Correct |
73 ms |
28844 KB |
Output is correct |
83 |
Correct |
49 ms |
28708 KB |
Output is correct |
84 |
Correct |
18 ms |
24668 KB |
Output is correct |
85 |
Correct |
24 ms |
25172 KB |
Output is correct |
86 |
Correct |
56 ms |
29060 KB |
Output is correct |
87 |
Correct |
62 ms |
29000 KB |
Output is correct |
88 |
Correct |
70 ms |
29004 KB |
Output is correct |
89 |
Correct |
60 ms |
29012 KB |
Output is correct |
90 |
Correct |
62 ms |
29044 KB |
Output is correct |
91 |
Correct |
65 ms |
29008 KB |
Output is correct |
92 |
Correct |
38 ms |
28620 KB |
Output is correct |
93 |
Correct |
55 ms |
28912 KB |
Output is correct |
94 |
Correct |
44 ms |
28240 KB |
Output is correct |
95 |
Correct |
52 ms |
28496 KB |
Output is correct |
96 |
Correct |
78 ms |
28948 KB |
Output is correct |
97 |
Correct |
62 ms |
29008 KB |
Output is correct |
98 |
Correct |
41 ms |
31572 KB |
Output is correct |
99 |
Correct |
51 ms |
32336 KB |
Output is correct |
100 |
Correct |
60 ms |
28488 KB |
Output is correct |
101 |
Correct |
62 ms |
28764 KB |
Output is correct |
102 |
Correct |
67 ms |
28724 KB |
Output is correct |
103 |
Correct |
51 ms |
28244 KB |
Output is correct |
104 |
Correct |
56 ms |
28500 KB |
Output is correct |
105 |
Correct |
64 ms |
28752 KB |
Output is correct |
106 |
Correct |
25 ms |
26840 KB |
Output is correct |
107 |
Correct |
24 ms |
24788 KB |
Output is correct |
108 |
Correct |
44 ms |
28880 KB |
Output is correct |
109 |
Correct |
43 ms |
27964 KB |
Output is correct |
110 |
Correct |
58 ms |
28408 KB |
Output is correct |
111 |
Correct |
57 ms |
28500 KB |
Output is correct |
112 |
Correct |
62 ms |
29108 KB |
Output is correct |
113 |
Correct |
68 ms |
29520 KB |
Output is correct |
114 |
Correct |
70 ms |
29524 KB |
Output is correct |
115 |
Correct |
65 ms |
30032 KB |
Output is correct |
116 |
Correct |
42 ms |
28496 KB |
Output is correct |
117 |
Correct |
62 ms |
29440 KB |
Output is correct |
118 |
Correct |
54 ms |
29008 KB |
Output is correct |
119 |
Correct |
52 ms |
28620 KB |
Output is correct |
120 |
Correct |
72 ms |
29524 KB |
Output is correct |
121 |
Correct |
81 ms |
29556 KB |
Output is correct |
122 |
Correct |
66 ms |
29524 KB |
Output is correct |
123 |
Correct |
67 ms |
29524 KB |
Output is correct |
124 |
Correct |
76 ms |
29732 KB |
Output is correct |
125 |
Correct |
59 ms |
29012 KB |
Output is correct |
126 |
Correct |
40 ms |
29648 KB |
Output is correct |
127 |
Correct |
52 ms |
28844 KB |
Output is correct |
128 |
Correct |
65 ms |
29268 KB |
Output is correct |
129 |
Correct |
52 ms |
32676 KB |
Output is correct |
130 |
Correct |
310 ms |
50772 KB |
Output is correct |
131 |
Correct |
214 ms |
46896 KB |
Output is correct |
132 |
Correct |
343 ms |
50612 KB |
Output is correct |
133 |
Correct |
278 ms |
53844 KB |
Output is correct |
134 |
Correct |
259 ms |
52680 KB |
Output is correct |
135 |
Correct |
323 ms |
54608 KB |
Output is correct |
136 |
Correct |
323 ms |
56460 KB |
Output is correct |
137 |
Correct |
310 ms |
56148 KB |
Output is correct |
138 |
Correct |
264 ms |
51100 KB |
Output is correct |
139 |
Correct |
318 ms |
50848 KB |
Output is correct |
140 |
Correct |
331 ms |
50800 KB |
Output is correct |
141 |
Correct |
288 ms |
50640 KB |
Output is correct |
142 |
Correct |
308 ms |
50768 KB |
Output is correct |
143 |
Correct |
305 ms |
50720 KB |
Output is correct |
144 |
Correct |
294 ms |
50748 KB |
Output is correct |
145 |
Correct |
293 ms |
51028 KB |
Output is correct |
146 |
Correct |
343 ms |
50772 KB |
Output is correct |
147 |
Correct |
322 ms |
50628 KB |
Output is correct |
148 |
Correct |
340 ms |
50552 KB |
Output is correct |
149 |
Correct |
315 ms |
50600 KB |
Output is correct |
150 |
Correct |
157 ms |
48684 KB |
Output is correct |
151 |
Correct |
262 ms |
50256 KB |
Output is correct |
152 |
Correct |
251 ms |
50132 KB |
Output is correct |
153 |
Correct |
228 ms |
56916 KB |
Output is correct |