#include <bits/stdc++.h>
using namespace std;
#define dbgv(v) cout<<#v<<" = "; f(i,0,v.size()) cout<<v[i]<<" "; cout<<endl
#define dbga(a,x,y) cout<<#a<<" = "; f(i,x,y) cout<<a[i]<<" "; cout<<endl
#define erorp(x) cout<<#x<<"={"<<(x.F)<<" , "<<x.S<<"}"<<endl
#define eror(x) cout<<#x<<'='<<(x)<<endl
#define f_(i,a,b) for(int i=a;i>=b;i--)
#define f(i,a,b) for(int i=a;i<b;i++)
#define nb(x) __builtin_popcount(x)
#define all(v) v.begin(),v.end()
#define bit(n,k) (((n)>>(k))&1)
#define Add(x,y) x=(x+y)%mod
#define maxm(a,b) a=max(a,b)
#define minm(a,b) a=min(a,b)
#define lst(x) x[x.size()-1]
#define sz(x) int(x.size())
#define mp make_pair
#define ll long long
#define pb push_back
#define S second
#define F first
#define int ll
const int N=3e5+99,inf=1e15;
int n,m,q,a[N],b[N],c[N],k[N],type[N],ans[N],seg[2][N<<2],lazy[2][N<<2];
vector<int> ad[N],dl[N],Q[N];
void shift(int ,int ,int ,int );
void add(int L,int R,int val,int s,int id=1,int l=1,int r=q+1){
if(r<=L || R<=l) return ;
if(L<=l && r<=R){
seg[s][id]+=val;
lazy[s][id]+=val;
return ;
}
int mid=(l+r)>>1;
shift(id,l,r,s);
add(L,R,val,s,id<<1,l,mid);
add(L,R,val,s,id<<1|1,mid,r);
seg[s][id]=min(seg[s][id<<1],seg[s][id<<1|1]);
}
int query(int L,int R,int s,int id=1,int l=1,int r=q+1){
if(r<=L || R<=l) return inf;
if(L<=l && r<=R){
return seg[s][id];
}
int mid=(l+r)>>1;
shift(id,l,r,s);
return min(query(L,R,s,id<<1,l,mid),query(L,R,s,id<<1|1,mid,r));
}
inline void shift(int id,int l,int r,int s){
int mid=(l+r)>>1;
lazy[s][id<<1]+=lazy[s][id];
lazy[s][id<<1|1]+=lazy[s][id];
seg[s][id<<1]+=lazy[s][id];
seg[s][id<<1|1]+=lazy[s][id];
lazy[s][id]=0;
}
int pur(int x,int id=1,int l=1,int r=q+1){
if(l+1==r){
return l;
}
int mid=(l+r)>>1;
shift(id,l,r,1);
if(-(seg[1][id<<1])<x) return pur(x,id<<1|1,mid,r);
return pur(x,id<<1,l,mid);
}
main(){
ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
cin>>n>>m>>q;
f(i,1,q+1){
cin>>type[i];
if(type[i]==1){
cin>>a[i]>>b[i]>>c[i]>>k[i];
ad[a[i]].pb(i);
dl[b[i]].pb(i);
}
if(type[i]==2){
cin>>a[i]>>b[i]>>k[i];
ad[a[i]].pb(i);
dl[b[i]].pb(i);
}
if(type[i]==3){
cin>>a[i]>>b[i];
Q[a[i]].pb(i);
}
}
f(i,1,n+1){
for(auto x : ad[i]){
if(type[x]==1){
add(x,q+1,k[x],0);
add(x,q+1,-k[x],1);
}
if(type[x]==2){
add(x,q+1,-k[x],0);
}
}
for(auto x : Q[i]){
int res=query(x,x+1,0)-min(0ll,query(1,x+1,0)),cnt=(-query(x,x+1,1))-res+b[x];
if(b[x]>res){
ans[x]=0;
continue ;
}
ans[x]=pur(cnt);
}
for(auto x : dl[i]){
if(type[x]==1){
add(x,q+1,-k[x],0);
add(x,q+1,k[x],1);
}
if(type[x]==2){
add(x,q+1,k[x],0);
}
}
}
f(i,1,q+1){
if(type[i]==3){
cout<<c[ans[i]]<<" ";
}
}
}
Compilation message
foodcourt.cpp: In function 'void shift(long long int, long long int, long long int, long long int)':
foodcourt.cpp:54:6: warning: unused variable 'mid' [-Wunused-variable]
54 | int mid=(l+r)>>1;
| ^~~
foodcourt.cpp: At global scope:
foodcourt.cpp:72:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
72 | main(){
| ^~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
13 ms |
21708 KB |
Output is correct |
2 |
Correct |
13 ms |
21712 KB |
Output is correct |
3 |
Correct |
13 ms |
21708 KB |
Output is correct |
4 |
Correct |
12 ms |
21836 KB |
Output is correct |
5 |
Correct |
17 ms |
21716 KB |
Output is correct |
6 |
Correct |
13 ms |
21796 KB |
Output is correct |
7 |
Correct |
14 ms |
21824 KB |
Output is correct |
8 |
Correct |
13 ms |
21708 KB |
Output is correct |
9 |
Correct |
16 ms |
21836 KB |
Output is correct |
10 |
Correct |
14 ms |
21748 KB |
Output is correct |
11 |
Correct |
15 ms |
21708 KB |
Output is correct |
12 |
Correct |
16 ms |
21732 KB |
Output is correct |
13 |
Correct |
12 ms |
21804 KB |
Output is correct |
14 |
Correct |
13 ms |
21708 KB |
Output is correct |
15 |
Correct |
13 ms |
21660 KB |
Output is correct |
16 |
Correct |
12 ms |
21728 KB |
Output is correct |
17 |
Correct |
12 ms |
21708 KB |
Output is correct |
18 |
Correct |
13 ms |
21836 KB |
Output is correct |
19 |
Correct |
13 ms |
21716 KB |
Output is correct |
20 |
Correct |
13 ms |
21836 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
13 ms |
21708 KB |
Output is correct |
2 |
Correct |
13 ms |
21712 KB |
Output is correct |
3 |
Correct |
13 ms |
21708 KB |
Output is correct |
4 |
Correct |
12 ms |
21836 KB |
Output is correct |
5 |
Correct |
17 ms |
21716 KB |
Output is correct |
6 |
Correct |
13 ms |
21796 KB |
Output is correct |
7 |
Correct |
14 ms |
21824 KB |
Output is correct |
8 |
Correct |
13 ms |
21708 KB |
Output is correct |
9 |
Correct |
16 ms |
21836 KB |
Output is correct |
10 |
Correct |
14 ms |
21748 KB |
Output is correct |
11 |
Correct |
15 ms |
21708 KB |
Output is correct |
12 |
Correct |
16 ms |
21732 KB |
Output is correct |
13 |
Correct |
12 ms |
21804 KB |
Output is correct |
14 |
Correct |
13 ms |
21708 KB |
Output is correct |
15 |
Correct |
13 ms |
21660 KB |
Output is correct |
16 |
Correct |
12 ms |
21728 KB |
Output is correct |
17 |
Correct |
12 ms |
21708 KB |
Output is correct |
18 |
Correct |
13 ms |
21836 KB |
Output is correct |
19 |
Correct |
13 ms |
21716 KB |
Output is correct |
20 |
Correct |
13 ms |
21836 KB |
Output is correct |
21 |
Correct |
13 ms |
21708 KB |
Output is correct |
22 |
Correct |
12 ms |
21832 KB |
Output is correct |
23 |
Correct |
14 ms |
21752 KB |
Output is correct |
24 |
Correct |
14 ms |
21836 KB |
Output is correct |
25 |
Correct |
16 ms |
21708 KB |
Output is correct |
26 |
Correct |
17 ms |
21788 KB |
Output is correct |
27 |
Correct |
13 ms |
21708 KB |
Output is correct |
28 |
Correct |
17 ms |
21824 KB |
Output is correct |
29 |
Correct |
12 ms |
21792 KB |
Output is correct |
30 |
Correct |
13 ms |
21756 KB |
Output is correct |
31 |
Correct |
14 ms |
21744 KB |
Output is correct |
32 |
Correct |
14 ms |
21836 KB |
Output is correct |
33 |
Correct |
13 ms |
21708 KB |
Output is correct |
34 |
Correct |
18 ms |
21708 KB |
Output is correct |
35 |
Correct |
13 ms |
21708 KB |
Output is correct |
36 |
Correct |
18 ms |
21764 KB |
Output is correct |
37 |
Correct |
13 ms |
21780 KB |
Output is correct |
38 |
Correct |
16 ms |
21836 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
109 ms |
31316 KB |
Output is correct |
2 |
Correct |
110 ms |
31348 KB |
Output is correct |
3 |
Correct |
121 ms |
31264 KB |
Output is correct |
4 |
Correct |
104 ms |
31300 KB |
Output is correct |
5 |
Correct |
134 ms |
31300 KB |
Output is correct |
6 |
Correct |
114 ms |
31368 KB |
Output is correct |
7 |
Correct |
66 ms |
29512 KB |
Output is correct |
8 |
Correct |
73 ms |
29696 KB |
Output is correct |
9 |
Correct |
113 ms |
31064 KB |
Output is correct |
10 |
Correct |
140 ms |
31228 KB |
Output is correct |
11 |
Correct |
108 ms |
31172 KB |
Output is correct |
12 |
Correct |
110 ms |
31216 KB |
Output is correct |
13 |
Correct |
102 ms |
30532 KB |
Output is correct |
14 |
Correct |
120 ms |
31248 KB |
Output is correct |
15 |
Correct |
198 ms |
31036 KB |
Output is correct |
16 |
Correct |
162 ms |
31328 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
534 ms |
57628 KB |
Output is correct |
2 |
Correct |
466 ms |
53808 KB |
Output is correct |
3 |
Correct |
671 ms |
59432 KB |
Output is correct |
4 |
Correct |
431 ms |
53784 KB |
Output is correct |
5 |
Correct |
457 ms |
53688 KB |
Output is correct |
6 |
Correct |
602 ms |
59340 KB |
Output is correct |
7 |
Correct |
286 ms |
53976 KB |
Output is correct |
8 |
Correct |
287 ms |
54004 KB |
Output is correct |
9 |
Correct |
702 ms |
58692 KB |
Output is correct |
10 |
Correct |
599 ms |
58624 KB |
Output is correct |
11 |
Correct |
628 ms |
58108 KB |
Output is correct |
12 |
Correct |
703 ms |
59088 KB |
Output is correct |
13 |
Correct |
685 ms |
58060 KB |
Output is correct |
14 |
Correct |
634 ms |
59104 KB |
Output is correct |
15 |
Correct |
622 ms |
59108 KB |
Output is correct |
16 |
Correct |
640 ms |
59104 KB |
Output is correct |
17 |
Correct |
654 ms |
59140 KB |
Output is correct |
18 |
Correct |
633 ms |
58612 KB |
Output is correct |
19 |
Correct |
638 ms |
59092 KB |
Output is correct |
20 |
Correct |
564 ms |
58576 KB |
Output is correct |
21 |
Correct |
558 ms |
59088 KB |
Output is correct |
22 |
Correct |
560 ms |
59084 KB |
Output is correct |
23 |
Correct |
557 ms |
59108 KB |
Output is correct |
24 |
Correct |
567 ms |
59088 KB |
Output is correct |
25 |
Correct |
499 ms |
56240 KB |
Output is correct |
26 |
Correct |
524 ms |
56672 KB |
Output is correct |
27 |
Correct |
465 ms |
60100 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
13 ms |
21708 KB |
Output is correct |
2 |
Correct |
13 ms |
21712 KB |
Output is correct |
3 |
Correct |
13 ms |
21708 KB |
Output is correct |
4 |
Correct |
12 ms |
21836 KB |
Output is correct |
5 |
Correct |
17 ms |
21716 KB |
Output is correct |
6 |
Correct |
13 ms |
21796 KB |
Output is correct |
7 |
Correct |
14 ms |
21824 KB |
Output is correct |
8 |
Correct |
13 ms |
21708 KB |
Output is correct |
9 |
Correct |
16 ms |
21836 KB |
Output is correct |
10 |
Correct |
14 ms |
21748 KB |
Output is correct |
11 |
Correct |
15 ms |
21708 KB |
Output is correct |
12 |
Correct |
16 ms |
21732 KB |
Output is correct |
13 |
Correct |
12 ms |
21804 KB |
Output is correct |
14 |
Correct |
13 ms |
21708 KB |
Output is correct |
15 |
Correct |
13 ms |
21660 KB |
Output is correct |
16 |
Correct |
12 ms |
21728 KB |
Output is correct |
17 |
Correct |
12 ms |
21708 KB |
Output is correct |
18 |
Correct |
13 ms |
21836 KB |
Output is correct |
19 |
Correct |
13 ms |
21716 KB |
Output is correct |
20 |
Correct |
13 ms |
21836 KB |
Output is correct |
21 |
Correct |
109 ms |
31316 KB |
Output is correct |
22 |
Correct |
110 ms |
31348 KB |
Output is correct |
23 |
Correct |
121 ms |
31264 KB |
Output is correct |
24 |
Correct |
104 ms |
31300 KB |
Output is correct |
25 |
Correct |
134 ms |
31300 KB |
Output is correct |
26 |
Correct |
114 ms |
31368 KB |
Output is correct |
27 |
Correct |
66 ms |
29512 KB |
Output is correct |
28 |
Correct |
73 ms |
29696 KB |
Output is correct |
29 |
Correct |
113 ms |
31064 KB |
Output is correct |
30 |
Correct |
140 ms |
31228 KB |
Output is correct |
31 |
Correct |
108 ms |
31172 KB |
Output is correct |
32 |
Correct |
110 ms |
31216 KB |
Output is correct |
33 |
Correct |
102 ms |
30532 KB |
Output is correct |
34 |
Correct |
120 ms |
31248 KB |
Output is correct |
35 |
Correct |
198 ms |
31036 KB |
Output is correct |
36 |
Correct |
162 ms |
31328 KB |
Output is correct |
37 |
Correct |
99 ms |
30648 KB |
Output is correct |
38 |
Correct |
95 ms |
30048 KB |
Output is correct |
39 |
Correct |
58 ms |
28988 KB |
Output is correct |
40 |
Correct |
65 ms |
29540 KB |
Output is correct |
41 |
Correct |
114 ms |
30916 KB |
Output is correct |
42 |
Correct |
150 ms |
31116 KB |
Output is correct |
43 |
Correct |
123 ms |
31180 KB |
Output is correct |
44 |
Correct |
135 ms |
31000 KB |
Output is correct |
45 |
Correct |
112 ms |
31092 KB |
Output is correct |
46 |
Correct |
109 ms |
31108 KB |
Output is correct |
47 |
Correct |
78 ms |
29952 KB |
Output is correct |
48 |
Correct |
94 ms |
30532 KB |
Output is correct |
49 |
Correct |
101 ms |
29528 KB |
Output is correct |
50 |
Correct |
92 ms |
30396 KB |
Output is correct |
51 |
Correct |
110 ms |
31240 KB |
Output is correct |
52 |
Correct |
109 ms |
31224 KB |
Output is correct |
53 |
Correct |
95 ms |
30148 KB |
Output is correct |
54 |
Correct |
130 ms |
31300 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
110 ms |
30544 KB |
Output is correct |
2 |
Correct |
117 ms |
30944 KB |
Output is correct |
3 |
Correct |
120 ms |
31104 KB |
Output is correct |
4 |
Correct |
90 ms |
29464 KB |
Output is correct |
5 |
Correct |
101 ms |
30372 KB |
Output is correct |
6 |
Correct |
118 ms |
31064 KB |
Output is correct |
7 |
Correct |
75 ms |
29316 KB |
Output is correct |
8 |
Correct |
69 ms |
29116 KB |
Output is correct |
9 |
Correct |
94 ms |
30076 KB |
Output is correct |
10 |
Correct |
75 ms |
28952 KB |
Output is correct |
11 |
Correct |
124 ms |
30272 KB |
Output is correct |
12 |
Correct |
114 ms |
30312 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
13 ms |
21708 KB |
Output is correct |
2 |
Correct |
13 ms |
21712 KB |
Output is correct |
3 |
Correct |
13 ms |
21708 KB |
Output is correct |
4 |
Correct |
12 ms |
21836 KB |
Output is correct |
5 |
Correct |
17 ms |
21716 KB |
Output is correct |
6 |
Correct |
13 ms |
21796 KB |
Output is correct |
7 |
Correct |
14 ms |
21824 KB |
Output is correct |
8 |
Correct |
13 ms |
21708 KB |
Output is correct |
9 |
Correct |
16 ms |
21836 KB |
Output is correct |
10 |
Correct |
14 ms |
21748 KB |
Output is correct |
11 |
Correct |
15 ms |
21708 KB |
Output is correct |
12 |
Correct |
16 ms |
21732 KB |
Output is correct |
13 |
Correct |
12 ms |
21804 KB |
Output is correct |
14 |
Correct |
13 ms |
21708 KB |
Output is correct |
15 |
Correct |
13 ms |
21660 KB |
Output is correct |
16 |
Correct |
12 ms |
21728 KB |
Output is correct |
17 |
Correct |
12 ms |
21708 KB |
Output is correct |
18 |
Correct |
13 ms |
21836 KB |
Output is correct |
19 |
Correct |
13 ms |
21716 KB |
Output is correct |
20 |
Correct |
13 ms |
21836 KB |
Output is correct |
21 |
Correct |
13 ms |
21708 KB |
Output is correct |
22 |
Correct |
12 ms |
21832 KB |
Output is correct |
23 |
Correct |
14 ms |
21752 KB |
Output is correct |
24 |
Correct |
14 ms |
21836 KB |
Output is correct |
25 |
Correct |
16 ms |
21708 KB |
Output is correct |
26 |
Correct |
17 ms |
21788 KB |
Output is correct |
27 |
Correct |
13 ms |
21708 KB |
Output is correct |
28 |
Correct |
17 ms |
21824 KB |
Output is correct |
29 |
Correct |
12 ms |
21792 KB |
Output is correct |
30 |
Correct |
13 ms |
21756 KB |
Output is correct |
31 |
Correct |
14 ms |
21744 KB |
Output is correct |
32 |
Correct |
14 ms |
21836 KB |
Output is correct |
33 |
Correct |
13 ms |
21708 KB |
Output is correct |
34 |
Correct |
18 ms |
21708 KB |
Output is correct |
35 |
Correct |
13 ms |
21708 KB |
Output is correct |
36 |
Correct |
18 ms |
21764 KB |
Output is correct |
37 |
Correct |
13 ms |
21780 KB |
Output is correct |
38 |
Correct |
16 ms |
21836 KB |
Output is correct |
39 |
Correct |
109 ms |
31316 KB |
Output is correct |
40 |
Correct |
110 ms |
31348 KB |
Output is correct |
41 |
Correct |
121 ms |
31264 KB |
Output is correct |
42 |
Correct |
104 ms |
31300 KB |
Output is correct |
43 |
Correct |
134 ms |
31300 KB |
Output is correct |
44 |
Correct |
114 ms |
31368 KB |
Output is correct |
45 |
Correct |
66 ms |
29512 KB |
Output is correct |
46 |
Correct |
73 ms |
29696 KB |
Output is correct |
47 |
Correct |
113 ms |
31064 KB |
Output is correct |
48 |
Correct |
140 ms |
31228 KB |
Output is correct |
49 |
Correct |
108 ms |
31172 KB |
Output is correct |
50 |
Correct |
110 ms |
31216 KB |
Output is correct |
51 |
Correct |
102 ms |
30532 KB |
Output is correct |
52 |
Correct |
120 ms |
31248 KB |
Output is correct |
53 |
Correct |
198 ms |
31036 KB |
Output is correct |
54 |
Correct |
162 ms |
31328 KB |
Output is correct |
55 |
Correct |
99 ms |
30648 KB |
Output is correct |
56 |
Correct |
95 ms |
30048 KB |
Output is correct |
57 |
Correct |
58 ms |
28988 KB |
Output is correct |
58 |
Correct |
65 ms |
29540 KB |
Output is correct |
59 |
Correct |
114 ms |
30916 KB |
Output is correct |
60 |
Correct |
150 ms |
31116 KB |
Output is correct |
61 |
Correct |
123 ms |
31180 KB |
Output is correct |
62 |
Correct |
135 ms |
31000 KB |
Output is correct |
63 |
Correct |
112 ms |
31092 KB |
Output is correct |
64 |
Correct |
109 ms |
31108 KB |
Output is correct |
65 |
Correct |
78 ms |
29952 KB |
Output is correct |
66 |
Correct |
94 ms |
30532 KB |
Output is correct |
67 |
Correct |
101 ms |
29528 KB |
Output is correct |
68 |
Correct |
92 ms |
30396 KB |
Output is correct |
69 |
Correct |
110 ms |
31240 KB |
Output is correct |
70 |
Correct |
109 ms |
31224 KB |
Output is correct |
71 |
Correct |
95 ms |
30148 KB |
Output is correct |
72 |
Correct |
130 ms |
31300 KB |
Output is correct |
73 |
Correct |
110 ms |
30544 KB |
Output is correct |
74 |
Correct |
117 ms |
30944 KB |
Output is correct |
75 |
Correct |
120 ms |
31104 KB |
Output is correct |
76 |
Correct |
90 ms |
29464 KB |
Output is correct |
77 |
Correct |
101 ms |
30372 KB |
Output is correct |
78 |
Correct |
118 ms |
31064 KB |
Output is correct |
79 |
Correct |
75 ms |
29316 KB |
Output is correct |
80 |
Correct |
69 ms |
29116 KB |
Output is correct |
81 |
Correct |
94 ms |
30076 KB |
Output is correct |
82 |
Correct |
75 ms |
28952 KB |
Output is correct |
83 |
Correct |
124 ms |
30272 KB |
Output is correct |
84 |
Correct |
114 ms |
30312 KB |
Output is correct |
85 |
Correct |
104 ms |
30624 KB |
Output is correct |
86 |
Correct |
124 ms |
31268 KB |
Output is correct |
87 |
Correct |
109 ms |
30476 KB |
Output is correct |
88 |
Correct |
124 ms |
31148 KB |
Output is correct |
89 |
Correct |
74 ms |
29204 KB |
Output is correct |
90 |
Correct |
115 ms |
31140 KB |
Output is correct |
91 |
Correct |
95 ms |
30060 KB |
Output is correct |
92 |
Correct |
84 ms |
29892 KB |
Output is correct |
93 |
Correct |
118 ms |
31096 KB |
Output is correct |
94 |
Correct |
113 ms |
30976 KB |
Output is correct |
95 |
Correct |
112 ms |
30984 KB |
Output is correct |
96 |
Correct |
118 ms |
31172 KB |
Output is correct |
97 |
Correct |
119 ms |
31084 KB |
Output is correct |
98 |
Correct |
99 ms |
30272 KB |
Output is correct |
99 |
Correct |
84 ms |
30064 KB |
Output is correct |
100 |
Correct |
90 ms |
29576 KB |
Output is correct |
101 |
Correct |
101 ms |
30528 KB |
Output is correct |
102 |
Correct |
104 ms |
31300 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
13 ms |
21708 KB |
Output is correct |
2 |
Correct |
13 ms |
21712 KB |
Output is correct |
3 |
Correct |
13 ms |
21708 KB |
Output is correct |
4 |
Correct |
12 ms |
21836 KB |
Output is correct |
5 |
Correct |
17 ms |
21716 KB |
Output is correct |
6 |
Correct |
13 ms |
21796 KB |
Output is correct |
7 |
Correct |
14 ms |
21824 KB |
Output is correct |
8 |
Correct |
13 ms |
21708 KB |
Output is correct |
9 |
Correct |
16 ms |
21836 KB |
Output is correct |
10 |
Correct |
14 ms |
21748 KB |
Output is correct |
11 |
Correct |
15 ms |
21708 KB |
Output is correct |
12 |
Correct |
16 ms |
21732 KB |
Output is correct |
13 |
Correct |
12 ms |
21804 KB |
Output is correct |
14 |
Correct |
13 ms |
21708 KB |
Output is correct |
15 |
Correct |
13 ms |
21660 KB |
Output is correct |
16 |
Correct |
12 ms |
21728 KB |
Output is correct |
17 |
Correct |
12 ms |
21708 KB |
Output is correct |
18 |
Correct |
13 ms |
21836 KB |
Output is correct |
19 |
Correct |
13 ms |
21716 KB |
Output is correct |
20 |
Correct |
13 ms |
21836 KB |
Output is correct |
21 |
Correct |
13 ms |
21708 KB |
Output is correct |
22 |
Correct |
12 ms |
21832 KB |
Output is correct |
23 |
Correct |
14 ms |
21752 KB |
Output is correct |
24 |
Correct |
14 ms |
21836 KB |
Output is correct |
25 |
Correct |
16 ms |
21708 KB |
Output is correct |
26 |
Correct |
17 ms |
21788 KB |
Output is correct |
27 |
Correct |
13 ms |
21708 KB |
Output is correct |
28 |
Correct |
17 ms |
21824 KB |
Output is correct |
29 |
Correct |
12 ms |
21792 KB |
Output is correct |
30 |
Correct |
13 ms |
21756 KB |
Output is correct |
31 |
Correct |
14 ms |
21744 KB |
Output is correct |
32 |
Correct |
14 ms |
21836 KB |
Output is correct |
33 |
Correct |
13 ms |
21708 KB |
Output is correct |
34 |
Correct |
18 ms |
21708 KB |
Output is correct |
35 |
Correct |
13 ms |
21708 KB |
Output is correct |
36 |
Correct |
18 ms |
21764 KB |
Output is correct |
37 |
Correct |
13 ms |
21780 KB |
Output is correct |
38 |
Correct |
16 ms |
21836 KB |
Output is correct |
39 |
Correct |
109 ms |
31316 KB |
Output is correct |
40 |
Correct |
110 ms |
31348 KB |
Output is correct |
41 |
Correct |
121 ms |
31264 KB |
Output is correct |
42 |
Correct |
104 ms |
31300 KB |
Output is correct |
43 |
Correct |
134 ms |
31300 KB |
Output is correct |
44 |
Correct |
114 ms |
31368 KB |
Output is correct |
45 |
Correct |
66 ms |
29512 KB |
Output is correct |
46 |
Correct |
73 ms |
29696 KB |
Output is correct |
47 |
Correct |
113 ms |
31064 KB |
Output is correct |
48 |
Correct |
140 ms |
31228 KB |
Output is correct |
49 |
Correct |
108 ms |
31172 KB |
Output is correct |
50 |
Correct |
110 ms |
31216 KB |
Output is correct |
51 |
Correct |
102 ms |
30532 KB |
Output is correct |
52 |
Correct |
120 ms |
31248 KB |
Output is correct |
53 |
Correct |
198 ms |
31036 KB |
Output is correct |
54 |
Correct |
162 ms |
31328 KB |
Output is correct |
55 |
Correct |
534 ms |
57628 KB |
Output is correct |
56 |
Correct |
466 ms |
53808 KB |
Output is correct |
57 |
Correct |
671 ms |
59432 KB |
Output is correct |
58 |
Correct |
431 ms |
53784 KB |
Output is correct |
59 |
Correct |
457 ms |
53688 KB |
Output is correct |
60 |
Correct |
602 ms |
59340 KB |
Output is correct |
61 |
Correct |
286 ms |
53976 KB |
Output is correct |
62 |
Correct |
287 ms |
54004 KB |
Output is correct |
63 |
Correct |
702 ms |
58692 KB |
Output is correct |
64 |
Correct |
599 ms |
58624 KB |
Output is correct |
65 |
Correct |
628 ms |
58108 KB |
Output is correct |
66 |
Correct |
703 ms |
59088 KB |
Output is correct |
67 |
Correct |
685 ms |
58060 KB |
Output is correct |
68 |
Correct |
634 ms |
59104 KB |
Output is correct |
69 |
Correct |
622 ms |
59108 KB |
Output is correct |
70 |
Correct |
640 ms |
59104 KB |
Output is correct |
71 |
Correct |
654 ms |
59140 KB |
Output is correct |
72 |
Correct |
633 ms |
58612 KB |
Output is correct |
73 |
Correct |
638 ms |
59092 KB |
Output is correct |
74 |
Correct |
564 ms |
58576 KB |
Output is correct |
75 |
Correct |
558 ms |
59088 KB |
Output is correct |
76 |
Correct |
560 ms |
59084 KB |
Output is correct |
77 |
Correct |
557 ms |
59108 KB |
Output is correct |
78 |
Correct |
567 ms |
59088 KB |
Output is correct |
79 |
Correct |
499 ms |
56240 KB |
Output is correct |
80 |
Correct |
524 ms |
56672 KB |
Output is correct |
81 |
Correct |
465 ms |
60100 KB |
Output is correct |
82 |
Correct |
99 ms |
30648 KB |
Output is correct |
83 |
Correct |
95 ms |
30048 KB |
Output is correct |
84 |
Correct |
58 ms |
28988 KB |
Output is correct |
85 |
Correct |
65 ms |
29540 KB |
Output is correct |
86 |
Correct |
114 ms |
30916 KB |
Output is correct |
87 |
Correct |
150 ms |
31116 KB |
Output is correct |
88 |
Correct |
123 ms |
31180 KB |
Output is correct |
89 |
Correct |
135 ms |
31000 KB |
Output is correct |
90 |
Correct |
112 ms |
31092 KB |
Output is correct |
91 |
Correct |
109 ms |
31108 KB |
Output is correct |
92 |
Correct |
78 ms |
29952 KB |
Output is correct |
93 |
Correct |
94 ms |
30532 KB |
Output is correct |
94 |
Correct |
101 ms |
29528 KB |
Output is correct |
95 |
Correct |
92 ms |
30396 KB |
Output is correct |
96 |
Correct |
110 ms |
31240 KB |
Output is correct |
97 |
Correct |
109 ms |
31224 KB |
Output is correct |
98 |
Correct |
95 ms |
30148 KB |
Output is correct |
99 |
Correct |
130 ms |
31300 KB |
Output is correct |
100 |
Correct |
110 ms |
30544 KB |
Output is correct |
101 |
Correct |
117 ms |
30944 KB |
Output is correct |
102 |
Correct |
120 ms |
31104 KB |
Output is correct |
103 |
Correct |
90 ms |
29464 KB |
Output is correct |
104 |
Correct |
101 ms |
30372 KB |
Output is correct |
105 |
Correct |
118 ms |
31064 KB |
Output is correct |
106 |
Correct |
75 ms |
29316 KB |
Output is correct |
107 |
Correct |
69 ms |
29116 KB |
Output is correct |
108 |
Correct |
94 ms |
30076 KB |
Output is correct |
109 |
Correct |
75 ms |
28952 KB |
Output is correct |
110 |
Correct |
124 ms |
30272 KB |
Output is correct |
111 |
Correct |
114 ms |
30312 KB |
Output is correct |
112 |
Correct |
104 ms |
30624 KB |
Output is correct |
113 |
Correct |
124 ms |
31268 KB |
Output is correct |
114 |
Correct |
109 ms |
30476 KB |
Output is correct |
115 |
Correct |
124 ms |
31148 KB |
Output is correct |
116 |
Correct |
74 ms |
29204 KB |
Output is correct |
117 |
Correct |
115 ms |
31140 KB |
Output is correct |
118 |
Correct |
95 ms |
30060 KB |
Output is correct |
119 |
Correct |
84 ms |
29892 KB |
Output is correct |
120 |
Correct |
118 ms |
31096 KB |
Output is correct |
121 |
Correct |
113 ms |
30976 KB |
Output is correct |
122 |
Correct |
112 ms |
30984 KB |
Output is correct |
123 |
Correct |
118 ms |
31172 KB |
Output is correct |
124 |
Correct |
119 ms |
31084 KB |
Output is correct |
125 |
Correct |
99 ms |
30272 KB |
Output is correct |
126 |
Correct |
84 ms |
30064 KB |
Output is correct |
127 |
Correct |
90 ms |
29576 KB |
Output is correct |
128 |
Correct |
101 ms |
30528 KB |
Output is correct |
129 |
Correct |
104 ms |
31300 KB |
Output is correct |
130 |
Correct |
592 ms |
59748 KB |
Output is correct |
131 |
Correct |
433 ms |
53828 KB |
Output is correct |
132 |
Correct |
562 ms |
59732 KB |
Output is correct |
133 |
Correct |
592 ms |
58440 KB |
Output is correct |
134 |
Correct |
504 ms |
56444 KB |
Output is correct |
135 |
Correct |
640 ms |
59408 KB |
Output is correct |
136 |
Correct |
658 ms |
59060 KB |
Output is correct |
137 |
Correct |
641 ms |
58952 KB |
Output is correct |
138 |
Correct |
578 ms |
58304 KB |
Output is correct |
139 |
Correct |
558 ms |
59176 KB |
Output is correct |
140 |
Correct |
562 ms |
58408 KB |
Output is correct |
141 |
Correct |
588 ms |
59216 KB |
Output is correct |
142 |
Correct |
567 ms |
59232 KB |
Output is correct |
143 |
Correct |
568 ms |
59224 KB |
Output is correct |
144 |
Correct |
584 ms |
58860 KB |
Output is correct |
145 |
Correct |
564 ms |
59208 KB |
Output is correct |
146 |
Correct |
587 ms |
58848 KB |
Output is correct |
147 |
Correct |
577 ms |
59276 KB |
Output is correct |
148 |
Correct |
565 ms |
59204 KB |
Output is correct |
149 |
Correct |
568 ms |
59204 KB |
Output is correct |
150 |
Correct |
347 ms |
54908 KB |
Output is correct |
151 |
Correct |
470 ms |
56944 KB |
Output is correct |
152 |
Correct |
474 ms |
57028 KB |
Output is correct |
153 |
Correct |
458 ms |
60216 KB |
Output is correct |