#include <bits/stdc++.h>
#define f first
#define s second
#define m_p make_pair
#define vec vector
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define sz(x) (int)(x).size()
#define pw(x) (1LL<<(x))
#define fast_prep ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define int long long
using namespace std;
typedef long long ll;
const int N=250'000+1;
template<class T> bool umax(T &a,const T &b){return (a<b?a=b,1:0);}
struct fenwick{
ll fnw[N];
fenwick(){
fill(fnw,fnw+N,0);
}
void reset(){
fill(fnw,fnw+N,0);
}
void upd(int i,int x){
++i;
while(i<N){
fnw[i]+=x;
i+=i&-i;
}
}
ll get(int i){
++i;
ll ans=0;
while(i>0){
ans+=fnw[i];
i-=i&-i;
}
return ans;
}
void add(int l,int r,ll x){
upd(l,x);
upd(r+1,-x);
}
};
struct segtree{
ll p1[4*N],p2[4*N];
int p3[4*N];
ll mx[4*N],mn[4*N];
segtree(){
fill(mx,mx+4*N,0);
fill(mn,mn+4*N,0);
fill(p1,p1+4*N,0);
fill(p2,p2+4*N,0);
fill(p3,p3+4*N,-1);
}
void push(int v,int tl,int tr){
if(p2[v]!=-1){
// assert(p1[v]==0);
for(auto &u : {2*v,2*v+1}){
p2[u]=p2[v];
mx[u]=mn[u]=p2[v];
umax(p3[u],p3[v]);
p1[u]=0;
}
p2[v]=-1;
}
else{
for(auto &u : {2*v,2*v+1}){
if(p2[u]!=-1) p2[u]+=p1[v];
else p1[u]+=p1[v];
mx[u]+=p1[v];mn[u]+=p1[v];
}
p1[v]=0;
}
}
void add(int l,int r,int x,int t,int v,int tl,int tr){
if(tl>r||tr<l) return;
if(tl>=l&&tr<=r&&((mx[v]+x)<=0)==((mn[v]+x)<=0)){
// cout<<"TL "<<tl<<' '<<tr<<' '<<mx[v]+x<<' '<<mn[v]+x<<endl;
if((mx[v]+x)<=0){
p1[v]=0;
umax(p3[v],t);
p2[v]=mx[v]=mn[v]=0;
// cout<<"WAY "<<v<<' '<<tl<<' '<<tr<<endl;
return;
}
if((p2[v]!=-1)) p2[v]+=x;
else p1[v]+=x;
mx[v]+=x;mn[v]+=x;
return;
}
int tm=(tl+tr)>>1;push(v,tl,tr);
add(l,r,x,t,2*v,tl,tm);add(l,r,x,t,2*v+1,tm+1,tr);
mx[v]=max(mx[v<<1],mx[v<<1|1]);
mn[v]=min(mn[v<<1],mn[v<<1|1]);
}
int get(int i,int v,int tl,int tr){
if(tl==tr)
return p3[v];
int tm=(tl+tr)>>1;push(v,tl,tr);
if(tm>=i)
return get(i,v<<1,tl,tm);
else
return get(i,v<<1|1,tm+1,tr);
}
}sega;
signed main(){
fast_prep;
int n,m,q;
cin>>n>>m>>q;
fenwick fen;
vec<int> tl(q),tr(q);
vec<int> t(q),l(q),r(q),c(q),k(q);
vec<int> ask;
vec<ll> rl(q);
vec<ll> toadd(q);
vec<vec<int>> need(q,vec<int>());
for(int i=0;i<q;i++){
cin>>t[i];
if(t[i]==1){
cin>>l[i]>>r[i]>>c[i]>>k[i];
--l[i];--r[i];
sega.add(l[i],r[i],k[i],i,1,0,n-1);
}
else if(t[i]==2){
cin>>l[i]>>r[i]>>k[i];
--l[i];--r[i];
fen.add(l[i],r[i],k[i]);
sega.add(l[i],r[i],-k[i],i,1,0,n-1);
}
else{
ask.pb(i);
cin>>l[i]>>k[i];
--l[i];
rl[i]=fen.get(l[i])+k[i];
// cerr<<"WO "<<sega.get(l[i],1,0,n-1);
tl[i]=sega.get(l[i],1,0,n-1)+1;tr[i]=i;
if(tl[i]!=0) need[tl[i]-1].pb(i);
}
}
{
fen.reset();
for(int i=0;i<q;i++){
if(t[i]==1) fen.add(l[i],r[i],k[i]);
else if(t[i]==2) fen.add(l[i],r[i],-k[i]);
for(auto &j : need[i]){
toadd[j]=-fen.get(l[j]);
}
}
}
int ok=1;
while(ok){
ok=0;
fen.reset();
vec<vec<int>> toask(q,vec<int>());
///just an id
for(auto &i : ask){
if(tl[i]!=tr[i]){
int tm=(tl[i]+tr[i])>>1;
// cout<<"HEYASK "<<i<<' '<<tl[i]<<' '<<tr[i]<<' '<<tm<<endl;
ok=1;
toask[tm].pb(i);
}
}
if(!ok) break;
for(int i=0;i<q;i++){
if(t[i]==1){
fen.add(l[i],r[i],k[i]);
}
// cout<<"I "<<i<<endl;
for(auto &j : toask[i]){
ll have=fen.get(l[j])+toadd[j];
// cout<<"YO "<<c[i]<<' '<<j<<' '<<have<<' '<<rl[j]<<endl;
if(have>=rl[j]){
tr[j]=i;
}
else{
tl[j]=i+1;
}
}
}
}
for(auto &i : ask){
cout<<(tl[i]==i?0:c[tl[i]])<<'\n';
}
return 0;
}
/*
3 5 5
1 2 3 5 2
1 1 2 2 4
2 1 3 3
1 2 3 4 2
3 3 2
3 5 5
1 2 3 5 2
1 1 2 2 4
2 1 3 3
3 1 2
1 2 3 4 2
*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
19 ms |
41556 KB |
Output is correct |
2 |
Correct |
25 ms |
41644 KB |
Output is correct |
3 |
Correct |
19 ms |
41484 KB |
Output is correct |
4 |
Correct |
18 ms |
41608 KB |
Output is correct |
5 |
Correct |
19 ms |
41636 KB |
Output is correct |
6 |
Correct |
17 ms |
41560 KB |
Output is correct |
7 |
Correct |
19 ms |
41668 KB |
Output is correct |
8 |
Correct |
20 ms |
41576 KB |
Output is correct |
9 |
Correct |
23 ms |
41600 KB |
Output is correct |
10 |
Correct |
23 ms |
41644 KB |
Output is correct |
11 |
Correct |
20 ms |
41600 KB |
Output is correct |
12 |
Correct |
21 ms |
41664 KB |
Output is correct |
13 |
Correct |
20 ms |
41520 KB |
Output is correct |
14 |
Correct |
21 ms |
41636 KB |
Output is correct |
15 |
Correct |
20 ms |
41556 KB |
Output is correct |
16 |
Correct |
21 ms |
41604 KB |
Output is correct |
17 |
Correct |
24 ms |
41560 KB |
Output is correct |
18 |
Correct |
21 ms |
41556 KB |
Output is correct |
19 |
Correct |
20 ms |
41592 KB |
Output is correct |
20 |
Correct |
22 ms |
41556 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
19 ms |
41556 KB |
Output is correct |
2 |
Correct |
25 ms |
41644 KB |
Output is correct |
3 |
Correct |
19 ms |
41484 KB |
Output is correct |
4 |
Correct |
18 ms |
41608 KB |
Output is correct |
5 |
Correct |
19 ms |
41636 KB |
Output is correct |
6 |
Correct |
17 ms |
41560 KB |
Output is correct |
7 |
Correct |
19 ms |
41668 KB |
Output is correct |
8 |
Correct |
20 ms |
41576 KB |
Output is correct |
9 |
Correct |
23 ms |
41600 KB |
Output is correct |
10 |
Correct |
23 ms |
41644 KB |
Output is correct |
11 |
Correct |
20 ms |
41600 KB |
Output is correct |
12 |
Correct |
21 ms |
41664 KB |
Output is correct |
13 |
Correct |
20 ms |
41520 KB |
Output is correct |
14 |
Correct |
21 ms |
41636 KB |
Output is correct |
15 |
Correct |
20 ms |
41556 KB |
Output is correct |
16 |
Correct |
21 ms |
41604 KB |
Output is correct |
17 |
Correct |
24 ms |
41560 KB |
Output is correct |
18 |
Correct |
21 ms |
41556 KB |
Output is correct |
19 |
Correct |
20 ms |
41592 KB |
Output is correct |
20 |
Correct |
22 ms |
41556 KB |
Output is correct |
21 |
Correct |
21 ms |
41556 KB |
Output is correct |
22 |
Correct |
22 ms |
41724 KB |
Output is correct |
23 |
Correct |
23 ms |
41624 KB |
Output is correct |
24 |
Correct |
25 ms |
41676 KB |
Output is correct |
25 |
Correct |
24 ms |
41556 KB |
Output is correct |
26 |
Correct |
20 ms |
41620 KB |
Output is correct |
27 |
Correct |
25 ms |
41656 KB |
Output is correct |
28 |
Correct |
21 ms |
41696 KB |
Output is correct |
29 |
Correct |
22 ms |
41708 KB |
Output is correct |
30 |
Correct |
21 ms |
41692 KB |
Output is correct |
31 |
Correct |
21 ms |
41640 KB |
Output is correct |
32 |
Correct |
22 ms |
41684 KB |
Output is correct |
33 |
Correct |
24 ms |
41812 KB |
Output is correct |
34 |
Correct |
19 ms |
41684 KB |
Output is correct |
35 |
Correct |
27 ms |
41632 KB |
Output is correct |
36 |
Correct |
21 ms |
41684 KB |
Output is correct |
37 |
Correct |
19 ms |
41556 KB |
Output is correct |
38 |
Correct |
20 ms |
41636 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
117 ms |
50104 KB |
Output is correct |
2 |
Correct |
127 ms |
49836 KB |
Output is correct |
3 |
Correct |
148 ms |
50048 KB |
Output is correct |
4 |
Correct |
109 ms |
50048 KB |
Output is correct |
5 |
Correct |
124 ms |
49908 KB |
Output is correct |
6 |
Correct |
174 ms |
49932 KB |
Output is correct |
7 |
Correct |
76 ms |
49452 KB |
Output is correct |
8 |
Correct |
55 ms |
49584 KB |
Output is correct |
9 |
Correct |
115 ms |
49748 KB |
Output is correct |
10 |
Correct |
114 ms |
49840 KB |
Output is correct |
11 |
Correct |
119 ms |
49748 KB |
Output is correct |
12 |
Correct |
115 ms |
49848 KB |
Output is correct |
13 |
Correct |
116 ms |
49204 KB |
Output is correct |
14 |
Correct |
129 ms |
50040 KB |
Output is correct |
15 |
Correct |
146 ms |
49452 KB |
Output is correct |
16 |
Correct |
159 ms |
49496 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
748 ms |
77316 KB |
Output is correct |
2 |
Correct |
581 ms |
70068 KB |
Output is correct |
3 |
Correct |
807 ms |
80424 KB |
Output is correct |
4 |
Correct |
543 ms |
68772 KB |
Output is correct |
5 |
Correct |
598 ms |
69636 KB |
Output is correct |
6 |
Correct |
833 ms |
79836 KB |
Output is correct |
7 |
Correct |
384 ms |
78980 KB |
Output is correct |
8 |
Correct |
427 ms |
78780 KB |
Output is correct |
9 |
Correct |
895 ms |
81124 KB |
Output is correct |
10 |
Correct |
914 ms |
81124 KB |
Output is correct |
11 |
Correct |
753 ms |
79252 KB |
Output is correct |
12 |
Correct |
791 ms |
79292 KB |
Output is correct |
13 |
Correct |
724 ms |
79400 KB |
Output is correct |
14 |
Correct |
755 ms |
79704 KB |
Output is correct |
15 |
Correct |
788 ms |
79712 KB |
Output is correct |
16 |
Correct |
819 ms |
79692 KB |
Output is correct |
17 |
Correct |
814 ms |
79708 KB |
Output is correct |
18 |
Correct |
795 ms |
79748 KB |
Output is correct |
19 |
Correct |
810 ms |
79736 KB |
Output is correct |
20 |
Correct |
808 ms |
79736 KB |
Output is correct |
21 |
Correct |
788 ms |
79736 KB |
Output is correct |
22 |
Correct |
820 ms |
79912 KB |
Output is correct |
23 |
Correct |
784 ms |
79844 KB |
Output is correct |
24 |
Correct |
790 ms |
79860 KB |
Output is correct |
25 |
Correct |
579 ms |
79916 KB |
Output is correct |
26 |
Correct |
636 ms |
80584 KB |
Output is correct |
27 |
Execution timed out |
1088 ms |
69484 KB |
Time limit exceeded |
28 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
19 ms |
41556 KB |
Output is correct |
2 |
Correct |
25 ms |
41644 KB |
Output is correct |
3 |
Correct |
19 ms |
41484 KB |
Output is correct |
4 |
Correct |
18 ms |
41608 KB |
Output is correct |
5 |
Correct |
19 ms |
41636 KB |
Output is correct |
6 |
Correct |
17 ms |
41560 KB |
Output is correct |
7 |
Correct |
19 ms |
41668 KB |
Output is correct |
8 |
Correct |
20 ms |
41576 KB |
Output is correct |
9 |
Correct |
23 ms |
41600 KB |
Output is correct |
10 |
Correct |
23 ms |
41644 KB |
Output is correct |
11 |
Correct |
20 ms |
41600 KB |
Output is correct |
12 |
Correct |
21 ms |
41664 KB |
Output is correct |
13 |
Correct |
20 ms |
41520 KB |
Output is correct |
14 |
Correct |
21 ms |
41636 KB |
Output is correct |
15 |
Correct |
20 ms |
41556 KB |
Output is correct |
16 |
Correct |
21 ms |
41604 KB |
Output is correct |
17 |
Correct |
24 ms |
41560 KB |
Output is correct |
18 |
Correct |
21 ms |
41556 KB |
Output is correct |
19 |
Correct |
20 ms |
41592 KB |
Output is correct |
20 |
Correct |
22 ms |
41556 KB |
Output is correct |
21 |
Correct |
117 ms |
50104 KB |
Output is correct |
22 |
Correct |
127 ms |
49836 KB |
Output is correct |
23 |
Correct |
148 ms |
50048 KB |
Output is correct |
24 |
Correct |
109 ms |
50048 KB |
Output is correct |
25 |
Correct |
124 ms |
49908 KB |
Output is correct |
26 |
Correct |
174 ms |
49932 KB |
Output is correct |
27 |
Correct |
76 ms |
49452 KB |
Output is correct |
28 |
Correct |
55 ms |
49584 KB |
Output is correct |
29 |
Correct |
115 ms |
49748 KB |
Output is correct |
30 |
Correct |
114 ms |
49840 KB |
Output is correct |
31 |
Correct |
119 ms |
49748 KB |
Output is correct |
32 |
Correct |
115 ms |
49848 KB |
Output is correct |
33 |
Correct |
116 ms |
49204 KB |
Output is correct |
34 |
Correct |
129 ms |
50040 KB |
Output is correct |
35 |
Correct |
146 ms |
49452 KB |
Output is correct |
36 |
Correct |
159 ms |
49496 KB |
Output is correct |
37 |
Correct |
194 ms |
49164 KB |
Output is correct |
38 |
Correct |
117 ms |
48044 KB |
Output is correct |
39 |
Correct |
78 ms |
48364 KB |
Output is correct |
40 |
Correct |
108 ms |
49276 KB |
Output is correct |
41 |
Correct |
169 ms |
49624 KB |
Output is correct |
42 |
Correct |
144 ms |
49808 KB |
Output is correct |
43 |
Correct |
164 ms |
49772 KB |
Output is correct |
44 |
Correct |
240 ms |
49868 KB |
Output is correct |
45 |
Correct |
152 ms |
49800 KB |
Output is correct |
46 |
Correct |
157 ms |
49848 KB |
Output is correct |
47 |
Correct |
115 ms |
50140 KB |
Output is correct |
48 |
Correct |
135 ms |
50092 KB |
Output is correct |
49 |
Correct |
160 ms |
47256 KB |
Output is correct |
50 |
Correct |
170 ms |
48456 KB |
Output is correct |
51 |
Correct |
198 ms |
49716 KB |
Output is correct |
52 |
Correct |
190 ms |
49716 KB |
Output is correct |
53 |
Correct |
116 ms |
47748 KB |
Output is correct |
54 |
Correct |
164 ms |
49532 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
181 ms |
50744 KB |
Output is correct |
2 |
Correct |
184 ms |
51772 KB |
Output is correct |
3 |
Correct |
216 ms |
51956 KB |
Output is correct |
4 |
Correct |
173 ms |
48716 KB |
Output is correct |
5 |
Correct |
161 ms |
50484 KB |
Output is correct |
6 |
Correct |
172 ms |
51900 KB |
Output is correct |
7 |
Correct |
127 ms |
50432 KB |
Output is correct |
8 |
Correct |
110 ms |
49868 KB |
Output is correct |
9 |
Correct |
181 ms |
51716 KB |
Output is correct |
10 |
Correct |
141 ms |
48556 KB |
Output is correct |
11 |
Correct |
173 ms |
51800 KB |
Output is correct |
12 |
Correct |
218 ms |
51848 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
19 ms |
41556 KB |
Output is correct |
2 |
Correct |
25 ms |
41644 KB |
Output is correct |
3 |
Correct |
19 ms |
41484 KB |
Output is correct |
4 |
Correct |
18 ms |
41608 KB |
Output is correct |
5 |
Correct |
19 ms |
41636 KB |
Output is correct |
6 |
Correct |
17 ms |
41560 KB |
Output is correct |
7 |
Correct |
19 ms |
41668 KB |
Output is correct |
8 |
Correct |
20 ms |
41576 KB |
Output is correct |
9 |
Correct |
23 ms |
41600 KB |
Output is correct |
10 |
Correct |
23 ms |
41644 KB |
Output is correct |
11 |
Correct |
20 ms |
41600 KB |
Output is correct |
12 |
Correct |
21 ms |
41664 KB |
Output is correct |
13 |
Correct |
20 ms |
41520 KB |
Output is correct |
14 |
Correct |
21 ms |
41636 KB |
Output is correct |
15 |
Correct |
20 ms |
41556 KB |
Output is correct |
16 |
Correct |
21 ms |
41604 KB |
Output is correct |
17 |
Correct |
24 ms |
41560 KB |
Output is correct |
18 |
Correct |
21 ms |
41556 KB |
Output is correct |
19 |
Correct |
20 ms |
41592 KB |
Output is correct |
20 |
Correct |
22 ms |
41556 KB |
Output is correct |
21 |
Correct |
21 ms |
41556 KB |
Output is correct |
22 |
Correct |
22 ms |
41724 KB |
Output is correct |
23 |
Correct |
23 ms |
41624 KB |
Output is correct |
24 |
Correct |
25 ms |
41676 KB |
Output is correct |
25 |
Correct |
24 ms |
41556 KB |
Output is correct |
26 |
Correct |
20 ms |
41620 KB |
Output is correct |
27 |
Correct |
25 ms |
41656 KB |
Output is correct |
28 |
Correct |
21 ms |
41696 KB |
Output is correct |
29 |
Correct |
22 ms |
41708 KB |
Output is correct |
30 |
Correct |
21 ms |
41692 KB |
Output is correct |
31 |
Correct |
21 ms |
41640 KB |
Output is correct |
32 |
Correct |
22 ms |
41684 KB |
Output is correct |
33 |
Correct |
24 ms |
41812 KB |
Output is correct |
34 |
Correct |
19 ms |
41684 KB |
Output is correct |
35 |
Correct |
27 ms |
41632 KB |
Output is correct |
36 |
Correct |
21 ms |
41684 KB |
Output is correct |
37 |
Correct |
19 ms |
41556 KB |
Output is correct |
38 |
Correct |
20 ms |
41636 KB |
Output is correct |
39 |
Correct |
117 ms |
50104 KB |
Output is correct |
40 |
Correct |
127 ms |
49836 KB |
Output is correct |
41 |
Correct |
148 ms |
50048 KB |
Output is correct |
42 |
Correct |
109 ms |
50048 KB |
Output is correct |
43 |
Correct |
124 ms |
49908 KB |
Output is correct |
44 |
Correct |
174 ms |
49932 KB |
Output is correct |
45 |
Correct |
76 ms |
49452 KB |
Output is correct |
46 |
Correct |
55 ms |
49584 KB |
Output is correct |
47 |
Correct |
115 ms |
49748 KB |
Output is correct |
48 |
Correct |
114 ms |
49840 KB |
Output is correct |
49 |
Correct |
119 ms |
49748 KB |
Output is correct |
50 |
Correct |
115 ms |
49848 KB |
Output is correct |
51 |
Correct |
116 ms |
49204 KB |
Output is correct |
52 |
Correct |
129 ms |
50040 KB |
Output is correct |
53 |
Correct |
146 ms |
49452 KB |
Output is correct |
54 |
Correct |
159 ms |
49496 KB |
Output is correct |
55 |
Correct |
194 ms |
49164 KB |
Output is correct |
56 |
Correct |
117 ms |
48044 KB |
Output is correct |
57 |
Correct |
78 ms |
48364 KB |
Output is correct |
58 |
Correct |
108 ms |
49276 KB |
Output is correct |
59 |
Correct |
169 ms |
49624 KB |
Output is correct |
60 |
Correct |
144 ms |
49808 KB |
Output is correct |
61 |
Correct |
164 ms |
49772 KB |
Output is correct |
62 |
Correct |
240 ms |
49868 KB |
Output is correct |
63 |
Correct |
152 ms |
49800 KB |
Output is correct |
64 |
Correct |
157 ms |
49848 KB |
Output is correct |
65 |
Correct |
115 ms |
50140 KB |
Output is correct |
66 |
Correct |
135 ms |
50092 KB |
Output is correct |
67 |
Correct |
160 ms |
47256 KB |
Output is correct |
68 |
Correct |
170 ms |
48456 KB |
Output is correct |
69 |
Correct |
198 ms |
49716 KB |
Output is correct |
70 |
Correct |
190 ms |
49716 KB |
Output is correct |
71 |
Correct |
116 ms |
47748 KB |
Output is correct |
72 |
Correct |
164 ms |
49532 KB |
Output is correct |
73 |
Correct |
181 ms |
50744 KB |
Output is correct |
74 |
Correct |
184 ms |
51772 KB |
Output is correct |
75 |
Correct |
216 ms |
51956 KB |
Output is correct |
76 |
Correct |
173 ms |
48716 KB |
Output is correct |
77 |
Correct |
161 ms |
50484 KB |
Output is correct |
78 |
Correct |
172 ms |
51900 KB |
Output is correct |
79 |
Correct |
127 ms |
50432 KB |
Output is correct |
80 |
Correct |
110 ms |
49868 KB |
Output is correct |
81 |
Correct |
181 ms |
51716 KB |
Output is correct |
82 |
Correct |
141 ms |
48556 KB |
Output is correct |
83 |
Correct |
173 ms |
51800 KB |
Output is correct |
84 |
Correct |
218 ms |
51848 KB |
Output is correct |
85 |
Correct |
157 ms |
50784 KB |
Output is correct |
86 |
Correct |
173 ms |
51604 KB |
Output is correct |
87 |
Correct |
150 ms |
50124 KB |
Output is correct |
88 |
Correct |
158 ms |
51392 KB |
Output is correct |
89 |
Correct |
113 ms |
48088 KB |
Output is correct |
90 |
Correct |
190 ms |
51352 KB |
Output is correct |
91 |
Correct |
133 ms |
49636 KB |
Output is correct |
92 |
Correct |
119 ms |
49224 KB |
Output is correct |
93 |
Correct |
167 ms |
51380 KB |
Output is correct |
94 |
Correct |
204 ms |
51368 KB |
Output is correct |
95 |
Correct |
144 ms |
51252 KB |
Output is correct |
96 |
Correct |
163 ms |
51380 KB |
Output is correct |
97 |
Correct |
182 ms |
51388 KB |
Output is correct |
98 |
Correct |
146 ms |
50048 KB |
Output is correct |
99 |
Correct |
138 ms |
51468 KB |
Output is correct |
100 |
Correct |
133 ms |
50032 KB |
Output is correct |
101 |
Correct |
148 ms |
51548 KB |
Output is correct |
102 |
Correct |
589 ms |
51072 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
19 ms |
41556 KB |
Output is correct |
2 |
Correct |
25 ms |
41644 KB |
Output is correct |
3 |
Correct |
19 ms |
41484 KB |
Output is correct |
4 |
Correct |
18 ms |
41608 KB |
Output is correct |
5 |
Correct |
19 ms |
41636 KB |
Output is correct |
6 |
Correct |
17 ms |
41560 KB |
Output is correct |
7 |
Correct |
19 ms |
41668 KB |
Output is correct |
8 |
Correct |
20 ms |
41576 KB |
Output is correct |
9 |
Correct |
23 ms |
41600 KB |
Output is correct |
10 |
Correct |
23 ms |
41644 KB |
Output is correct |
11 |
Correct |
20 ms |
41600 KB |
Output is correct |
12 |
Correct |
21 ms |
41664 KB |
Output is correct |
13 |
Correct |
20 ms |
41520 KB |
Output is correct |
14 |
Correct |
21 ms |
41636 KB |
Output is correct |
15 |
Correct |
20 ms |
41556 KB |
Output is correct |
16 |
Correct |
21 ms |
41604 KB |
Output is correct |
17 |
Correct |
24 ms |
41560 KB |
Output is correct |
18 |
Correct |
21 ms |
41556 KB |
Output is correct |
19 |
Correct |
20 ms |
41592 KB |
Output is correct |
20 |
Correct |
22 ms |
41556 KB |
Output is correct |
21 |
Correct |
21 ms |
41556 KB |
Output is correct |
22 |
Correct |
22 ms |
41724 KB |
Output is correct |
23 |
Correct |
23 ms |
41624 KB |
Output is correct |
24 |
Correct |
25 ms |
41676 KB |
Output is correct |
25 |
Correct |
24 ms |
41556 KB |
Output is correct |
26 |
Correct |
20 ms |
41620 KB |
Output is correct |
27 |
Correct |
25 ms |
41656 KB |
Output is correct |
28 |
Correct |
21 ms |
41696 KB |
Output is correct |
29 |
Correct |
22 ms |
41708 KB |
Output is correct |
30 |
Correct |
21 ms |
41692 KB |
Output is correct |
31 |
Correct |
21 ms |
41640 KB |
Output is correct |
32 |
Correct |
22 ms |
41684 KB |
Output is correct |
33 |
Correct |
24 ms |
41812 KB |
Output is correct |
34 |
Correct |
19 ms |
41684 KB |
Output is correct |
35 |
Correct |
27 ms |
41632 KB |
Output is correct |
36 |
Correct |
21 ms |
41684 KB |
Output is correct |
37 |
Correct |
19 ms |
41556 KB |
Output is correct |
38 |
Correct |
20 ms |
41636 KB |
Output is correct |
39 |
Correct |
117 ms |
50104 KB |
Output is correct |
40 |
Correct |
127 ms |
49836 KB |
Output is correct |
41 |
Correct |
148 ms |
50048 KB |
Output is correct |
42 |
Correct |
109 ms |
50048 KB |
Output is correct |
43 |
Correct |
124 ms |
49908 KB |
Output is correct |
44 |
Correct |
174 ms |
49932 KB |
Output is correct |
45 |
Correct |
76 ms |
49452 KB |
Output is correct |
46 |
Correct |
55 ms |
49584 KB |
Output is correct |
47 |
Correct |
115 ms |
49748 KB |
Output is correct |
48 |
Correct |
114 ms |
49840 KB |
Output is correct |
49 |
Correct |
119 ms |
49748 KB |
Output is correct |
50 |
Correct |
115 ms |
49848 KB |
Output is correct |
51 |
Correct |
116 ms |
49204 KB |
Output is correct |
52 |
Correct |
129 ms |
50040 KB |
Output is correct |
53 |
Correct |
146 ms |
49452 KB |
Output is correct |
54 |
Correct |
159 ms |
49496 KB |
Output is correct |
55 |
Correct |
748 ms |
77316 KB |
Output is correct |
56 |
Correct |
581 ms |
70068 KB |
Output is correct |
57 |
Correct |
807 ms |
80424 KB |
Output is correct |
58 |
Correct |
543 ms |
68772 KB |
Output is correct |
59 |
Correct |
598 ms |
69636 KB |
Output is correct |
60 |
Correct |
833 ms |
79836 KB |
Output is correct |
61 |
Correct |
384 ms |
78980 KB |
Output is correct |
62 |
Correct |
427 ms |
78780 KB |
Output is correct |
63 |
Correct |
895 ms |
81124 KB |
Output is correct |
64 |
Correct |
914 ms |
81124 KB |
Output is correct |
65 |
Correct |
753 ms |
79252 KB |
Output is correct |
66 |
Correct |
791 ms |
79292 KB |
Output is correct |
67 |
Correct |
724 ms |
79400 KB |
Output is correct |
68 |
Correct |
755 ms |
79704 KB |
Output is correct |
69 |
Correct |
788 ms |
79712 KB |
Output is correct |
70 |
Correct |
819 ms |
79692 KB |
Output is correct |
71 |
Correct |
814 ms |
79708 KB |
Output is correct |
72 |
Correct |
795 ms |
79748 KB |
Output is correct |
73 |
Correct |
810 ms |
79736 KB |
Output is correct |
74 |
Correct |
808 ms |
79736 KB |
Output is correct |
75 |
Correct |
788 ms |
79736 KB |
Output is correct |
76 |
Correct |
820 ms |
79912 KB |
Output is correct |
77 |
Correct |
784 ms |
79844 KB |
Output is correct |
78 |
Correct |
790 ms |
79860 KB |
Output is correct |
79 |
Correct |
579 ms |
79916 KB |
Output is correct |
80 |
Correct |
636 ms |
80584 KB |
Output is correct |
81 |
Execution timed out |
1088 ms |
69484 KB |
Time limit exceeded |
82 |
Halted |
0 ms |
0 KB |
- |