#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
//#pragma GCC optimize("unroll-loops")
using namespace std;
typedef long long ll;
const ll inf=1e18;
const int N=3e5+1;
template<class T> bool umax(T &a,const T &b){return (a<b?a=b,1:0);}
template<class T> bool umin(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],p4[4*N];
///add,whom,to_set
int p3[4*N];
struct node{
ll x,y;
node(){
x=0,y=inf;
}
};
node mg(node a,node b){
if(a.x>b.x) swap(a.x,b.x);
if(b.x>b.y) swap(b.x,b.y);
if(a.x==b.x) umin(a.y,b.y);
else umin(a.y,b.x);
return a;
}
node tt[4*N];
segtree(){
fill(p1,p1+4*N,0);
fill(p4,p4+4*N,inf);
fill(p3,p3+4*N,-1);
}
bool check(ll a,ll b,ll c){
if((a+c)<=0 && (b+c)<=0)
return 0;
return 1;
}
void push(int v,int tl,int tr){
int mn=min(tt[2*v].x,tt[2*v+1].x);
for(auto &u : {v<<1,v<<1|1}){
if(tt[u].x==mn && p4[v]!=inf){
tt[u].x=p4[v];
umax(p3[u],p3[v]);
p4[u]=p4[v];
}else tt[u].x+=p1[v],p4[u]=(p4[u]==inf?inf:p4[u]+p1[v]);
tt[u].y+=p1[v];
p1[u]+=p1[v];
}
p1[v]=0;p4[v]=inf;
}
void add(int l,int r,ll x,int t,int v,int tl,int tr){
if(tl>r||tr<l) return;
if(tl>=l&&tr<=r&&check(tt[v].x,tt[v].y,x)){
tt[v].x+=x;
if((tt[v].x)<0){
umax(p3[v],t);
}
tt[v].y+=x;
p1[v]+=x;
if(umax(tt[v].x,0LL) || p4[v]!=inf)
p4[v]=tt[v].x;
return;
}
int tm=(tl+tr)>>1;push(v,tl,tr);
add(l,r,x,t,v<<1,tl,tm);add(l,r,x,t,v<<1|1,tm+1,tr);
tt[v]=mg(tt[2*v],tt[2*v+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);
}
}sega1;
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);
vec<ll> 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];
sega1.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]);
sega1.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<<"ALO "<<
// cerr<<"WO "<<sega1.get(l[i],1,0,n-1)<<endl;
tl[i]=sega1.get(l[i],1,0,n-1)+1;tr[i]=i;
// cout<<"ALO "<<tl[i]<<endl;
if(tl[i]!=0) need[tl[i]-1].pb(i);
}
// sega1.get(977,1,0,n-1);
}
{
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]);
}
}
}
if(m==1){
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]==3){
if((fen.get(l[i])+toadd[i])>=rl[i]){
cout<<1<<'\n';
}
else{
cout<<0<<'\n';
}
}
}
return 0;
}
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;
}
/*
1457 1000 3
2 253 1112 1
1 872 1007 206029 1
3 978 1
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
*/
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
25 ms |
49748 KB |
Output is correct |
2 |
Correct |
26 ms |
49876 KB |
Output is correct |
3 |
Correct |
24 ms |
49788 KB |
Output is correct |
4 |
Correct |
27 ms |
49800 KB |
Output is correct |
5 |
Correct |
26 ms |
49752 KB |
Output is correct |
6 |
Correct |
32 ms |
49760 KB |
Output is correct |
7 |
Correct |
31 ms |
49868 KB |
Output is correct |
8 |
Correct |
29 ms |
49868 KB |
Output is correct |
9 |
Correct |
25 ms |
49868 KB |
Output is correct |
10 |
Correct |
25 ms |
49816 KB |
Output is correct |
11 |
Correct |
25 ms |
49884 KB |
Output is correct |
12 |
Correct |
25 ms |
49852 KB |
Output is correct |
13 |
Correct |
28 ms |
49820 KB |
Output is correct |
14 |
Correct |
23 ms |
49876 KB |
Output is correct |
15 |
Correct |
25 ms |
49752 KB |
Output is correct |
16 |
Correct |
29 ms |
49844 KB |
Output is correct |
17 |
Correct |
26 ms |
49740 KB |
Output is correct |
18 |
Correct |
25 ms |
49876 KB |
Output is correct |
19 |
Correct |
24 ms |
49828 KB |
Output is correct |
20 |
Correct |
25 ms |
49868 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
25 ms |
49748 KB |
Output is correct |
2 |
Correct |
26 ms |
49876 KB |
Output is correct |
3 |
Correct |
24 ms |
49788 KB |
Output is correct |
4 |
Correct |
27 ms |
49800 KB |
Output is correct |
5 |
Correct |
26 ms |
49752 KB |
Output is correct |
6 |
Correct |
32 ms |
49760 KB |
Output is correct |
7 |
Correct |
31 ms |
49868 KB |
Output is correct |
8 |
Correct |
29 ms |
49868 KB |
Output is correct |
9 |
Correct |
25 ms |
49868 KB |
Output is correct |
10 |
Correct |
25 ms |
49816 KB |
Output is correct |
11 |
Correct |
25 ms |
49884 KB |
Output is correct |
12 |
Correct |
25 ms |
49852 KB |
Output is correct |
13 |
Correct |
28 ms |
49820 KB |
Output is correct |
14 |
Correct |
23 ms |
49876 KB |
Output is correct |
15 |
Correct |
25 ms |
49752 KB |
Output is correct |
16 |
Correct |
29 ms |
49844 KB |
Output is correct |
17 |
Correct |
26 ms |
49740 KB |
Output is correct |
18 |
Correct |
25 ms |
49876 KB |
Output is correct |
19 |
Correct |
24 ms |
49828 KB |
Output is correct |
20 |
Correct |
25 ms |
49868 KB |
Output is correct |
21 |
Correct |
27 ms |
49876 KB |
Output is correct |
22 |
Correct |
25 ms |
49876 KB |
Output is correct |
23 |
Correct |
26 ms |
49792 KB |
Output is correct |
24 |
Correct |
31 ms |
49796 KB |
Output is correct |
25 |
Correct |
26 ms |
49788 KB |
Output is correct |
26 |
Correct |
25 ms |
49804 KB |
Output is correct |
27 |
Correct |
26 ms |
49876 KB |
Output is correct |
28 |
Correct |
27 ms |
49820 KB |
Output is correct |
29 |
Correct |
26 ms |
49876 KB |
Output is correct |
30 |
Correct |
25 ms |
49812 KB |
Output is correct |
31 |
Correct |
26 ms |
49808 KB |
Output is correct |
32 |
Correct |
28 ms |
49788 KB |
Output is correct |
33 |
Correct |
24 ms |
49816 KB |
Output is correct |
34 |
Correct |
24 ms |
49820 KB |
Output is correct |
35 |
Correct |
25 ms |
49860 KB |
Output is correct |
36 |
Correct |
25 ms |
49876 KB |
Output is correct |
37 |
Correct |
30 ms |
49808 KB |
Output is correct |
38 |
Correct |
27 ms |
49808 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
143 ms |
58292 KB |
Output is correct |
2 |
Correct |
138 ms |
58080 KB |
Output is correct |
3 |
Correct |
141 ms |
58348 KB |
Output is correct |
4 |
Correct |
150 ms |
58464 KB |
Output is correct |
5 |
Correct |
186 ms |
58060 KB |
Output is correct |
6 |
Correct |
153 ms |
58068 KB |
Output is correct |
7 |
Correct |
63 ms |
57672 KB |
Output is correct |
8 |
Correct |
72 ms |
57884 KB |
Output is correct |
9 |
Correct |
123 ms |
57968 KB |
Output is correct |
10 |
Correct |
133 ms |
57980 KB |
Output is correct |
11 |
Correct |
128 ms |
58000 KB |
Output is correct |
12 |
Correct |
140 ms |
58084 KB |
Output is correct |
13 |
Correct |
139 ms |
57444 KB |
Output is correct |
14 |
Correct |
171 ms |
58220 KB |
Output is correct |
15 |
Correct |
151 ms |
57572 KB |
Output is correct |
16 |
Correct |
169 ms |
57740 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
489 ms |
72912 KB |
Output is correct |
2 |
Correct |
422 ms |
68100 KB |
Output is correct |
3 |
Correct |
532 ms |
74652 KB |
Output is correct |
4 |
Correct |
336 ms |
67340 KB |
Output is correct |
5 |
Correct |
324 ms |
67836 KB |
Output is correct |
6 |
Correct |
477 ms |
74452 KB |
Output is correct |
7 |
Correct |
138 ms |
74816 KB |
Output is correct |
8 |
Correct |
145 ms |
74904 KB |
Output is correct |
9 |
Correct |
460 ms |
74444 KB |
Output is correct |
10 |
Correct |
454 ms |
74388 KB |
Output is correct |
11 |
Correct |
503 ms |
73836 KB |
Output is correct |
12 |
Correct |
508 ms |
73960 KB |
Output is correct |
13 |
Correct |
551 ms |
73980 KB |
Output is correct |
14 |
Correct |
582 ms |
74136 KB |
Output is correct |
15 |
Correct |
630 ms |
74364 KB |
Output is correct |
16 |
Correct |
755 ms |
74292 KB |
Output is correct |
17 |
Correct |
706 ms |
74368 KB |
Output is correct |
18 |
Correct |
720 ms |
74412 KB |
Output is correct |
19 |
Correct |
637 ms |
74420 KB |
Output is correct |
20 |
Correct |
606 ms |
74492 KB |
Output is correct |
21 |
Correct |
646 ms |
74336 KB |
Output is correct |
22 |
Correct |
631 ms |
74380 KB |
Output is correct |
23 |
Correct |
629 ms |
74352 KB |
Output is correct |
24 |
Correct |
637 ms |
74308 KB |
Output is correct |
25 |
Correct |
476 ms |
74404 KB |
Output is correct |
26 |
Correct |
413 ms |
75120 KB |
Output is correct |
27 |
Correct |
469 ms |
73792 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
25 ms |
49748 KB |
Output is correct |
2 |
Correct |
26 ms |
49876 KB |
Output is correct |
3 |
Correct |
24 ms |
49788 KB |
Output is correct |
4 |
Correct |
27 ms |
49800 KB |
Output is correct |
5 |
Correct |
26 ms |
49752 KB |
Output is correct |
6 |
Correct |
32 ms |
49760 KB |
Output is correct |
7 |
Correct |
31 ms |
49868 KB |
Output is correct |
8 |
Correct |
29 ms |
49868 KB |
Output is correct |
9 |
Correct |
25 ms |
49868 KB |
Output is correct |
10 |
Correct |
25 ms |
49816 KB |
Output is correct |
11 |
Correct |
25 ms |
49884 KB |
Output is correct |
12 |
Correct |
25 ms |
49852 KB |
Output is correct |
13 |
Correct |
28 ms |
49820 KB |
Output is correct |
14 |
Correct |
23 ms |
49876 KB |
Output is correct |
15 |
Correct |
25 ms |
49752 KB |
Output is correct |
16 |
Correct |
29 ms |
49844 KB |
Output is correct |
17 |
Correct |
26 ms |
49740 KB |
Output is correct |
18 |
Correct |
25 ms |
49876 KB |
Output is correct |
19 |
Correct |
24 ms |
49828 KB |
Output is correct |
20 |
Correct |
25 ms |
49868 KB |
Output is correct |
21 |
Correct |
143 ms |
58292 KB |
Output is correct |
22 |
Correct |
138 ms |
58080 KB |
Output is correct |
23 |
Correct |
141 ms |
58348 KB |
Output is correct |
24 |
Correct |
150 ms |
58464 KB |
Output is correct |
25 |
Correct |
186 ms |
58060 KB |
Output is correct |
26 |
Correct |
153 ms |
58068 KB |
Output is correct |
27 |
Correct |
63 ms |
57672 KB |
Output is correct |
28 |
Correct |
72 ms |
57884 KB |
Output is correct |
29 |
Correct |
123 ms |
57968 KB |
Output is correct |
30 |
Correct |
133 ms |
57980 KB |
Output is correct |
31 |
Correct |
128 ms |
58000 KB |
Output is correct |
32 |
Correct |
140 ms |
58084 KB |
Output is correct |
33 |
Correct |
139 ms |
57444 KB |
Output is correct |
34 |
Correct |
171 ms |
58220 KB |
Output is correct |
35 |
Correct |
151 ms |
57572 KB |
Output is correct |
36 |
Correct |
169 ms |
57740 KB |
Output is correct |
37 |
Correct |
185 ms |
57440 KB |
Output is correct |
38 |
Correct |
161 ms |
56248 KB |
Output is correct |
39 |
Correct |
115 ms |
56608 KB |
Output is correct |
40 |
Correct |
125 ms |
57420 KB |
Output is correct |
41 |
Correct |
192 ms |
57844 KB |
Output is correct |
42 |
Correct |
193 ms |
57916 KB |
Output is correct |
43 |
Correct |
219 ms |
58036 KB |
Output is correct |
44 |
Correct |
198 ms |
58084 KB |
Output is correct |
45 |
Correct |
192 ms |
58092 KB |
Output is correct |
46 |
Correct |
224 ms |
58072 KB |
Output is correct |
47 |
Correct |
135 ms |
58400 KB |
Output is correct |
48 |
Correct |
172 ms |
58272 KB |
Output is correct |
49 |
Correct |
153 ms |
55500 KB |
Output is correct |
50 |
Correct |
189 ms |
56648 KB |
Output is correct |
51 |
Correct |
227 ms |
57932 KB |
Output is correct |
52 |
Correct |
217 ms |
57976 KB |
Output is correct |
53 |
Correct |
152 ms |
55992 KB |
Output is correct |
54 |
Correct |
198 ms |
57684 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
200 ms |
57556 KB |
Output is correct |
2 |
Correct |
213 ms |
58380 KB |
Output is correct |
3 |
Correct |
229 ms |
58468 KB |
Output is correct |
4 |
Correct |
167 ms |
55852 KB |
Output is correct |
5 |
Correct |
188 ms |
57300 KB |
Output is correct |
6 |
Correct |
212 ms |
58436 KB |
Output is correct |
7 |
Correct |
154 ms |
57608 KB |
Output is correct |
8 |
Correct |
144 ms |
57032 KB |
Output is correct |
9 |
Correct |
197 ms |
58484 KB |
Output is correct |
10 |
Correct |
150 ms |
55668 KB |
Output is correct |
11 |
Correct |
200 ms |
58460 KB |
Output is correct |
12 |
Correct |
215 ms |
58476 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
25 ms |
49748 KB |
Output is correct |
2 |
Correct |
26 ms |
49876 KB |
Output is correct |
3 |
Correct |
24 ms |
49788 KB |
Output is correct |
4 |
Correct |
27 ms |
49800 KB |
Output is correct |
5 |
Correct |
26 ms |
49752 KB |
Output is correct |
6 |
Correct |
32 ms |
49760 KB |
Output is correct |
7 |
Correct |
31 ms |
49868 KB |
Output is correct |
8 |
Correct |
29 ms |
49868 KB |
Output is correct |
9 |
Correct |
25 ms |
49868 KB |
Output is correct |
10 |
Correct |
25 ms |
49816 KB |
Output is correct |
11 |
Correct |
25 ms |
49884 KB |
Output is correct |
12 |
Correct |
25 ms |
49852 KB |
Output is correct |
13 |
Correct |
28 ms |
49820 KB |
Output is correct |
14 |
Correct |
23 ms |
49876 KB |
Output is correct |
15 |
Correct |
25 ms |
49752 KB |
Output is correct |
16 |
Correct |
29 ms |
49844 KB |
Output is correct |
17 |
Correct |
26 ms |
49740 KB |
Output is correct |
18 |
Correct |
25 ms |
49876 KB |
Output is correct |
19 |
Correct |
24 ms |
49828 KB |
Output is correct |
20 |
Correct |
25 ms |
49868 KB |
Output is correct |
21 |
Correct |
27 ms |
49876 KB |
Output is correct |
22 |
Correct |
25 ms |
49876 KB |
Output is correct |
23 |
Correct |
26 ms |
49792 KB |
Output is correct |
24 |
Correct |
31 ms |
49796 KB |
Output is correct |
25 |
Correct |
26 ms |
49788 KB |
Output is correct |
26 |
Correct |
25 ms |
49804 KB |
Output is correct |
27 |
Correct |
26 ms |
49876 KB |
Output is correct |
28 |
Correct |
27 ms |
49820 KB |
Output is correct |
29 |
Correct |
26 ms |
49876 KB |
Output is correct |
30 |
Correct |
25 ms |
49812 KB |
Output is correct |
31 |
Correct |
26 ms |
49808 KB |
Output is correct |
32 |
Correct |
28 ms |
49788 KB |
Output is correct |
33 |
Correct |
24 ms |
49816 KB |
Output is correct |
34 |
Correct |
24 ms |
49820 KB |
Output is correct |
35 |
Correct |
25 ms |
49860 KB |
Output is correct |
36 |
Correct |
25 ms |
49876 KB |
Output is correct |
37 |
Correct |
30 ms |
49808 KB |
Output is correct |
38 |
Correct |
27 ms |
49808 KB |
Output is correct |
39 |
Correct |
143 ms |
58292 KB |
Output is correct |
40 |
Correct |
138 ms |
58080 KB |
Output is correct |
41 |
Correct |
141 ms |
58348 KB |
Output is correct |
42 |
Correct |
150 ms |
58464 KB |
Output is correct |
43 |
Correct |
186 ms |
58060 KB |
Output is correct |
44 |
Correct |
153 ms |
58068 KB |
Output is correct |
45 |
Correct |
63 ms |
57672 KB |
Output is correct |
46 |
Correct |
72 ms |
57884 KB |
Output is correct |
47 |
Correct |
123 ms |
57968 KB |
Output is correct |
48 |
Correct |
133 ms |
57980 KB |
Output is correct |
49 |
Correct |
128 ms |
58000 KB |
Output is correct |
50 |
Correct |
140 ms |
58084 KB |
Output is correct |
51 |
Correct |
139 ms |
57444 KB |
Output is correct |
52 |
Correct |
171 ms |
58220 KB |
Output is correct |
53 |
Correct |
151 ms |
57572 KB |
Output is correct |
54 |
Correct |
169 ms |
57740 KB |
Output is correct |
55 |
Correct |
185 ms |
57440 KB |
Output is correct |
56 |
Correct |
161 ms |
56248 KB |
Output is correct |
57 |
Correct |
115 ms |
56608 KB |
Output is correct |
58 |
Correct |
125 ms |
57420 KB |
Output is correct |
59 |
Correct |
192 ms |
57844 KB |
Output is correct |
60 |
Correct |
193 ms |
57916 KB |
Output is correct |
61 |
Correct |
219 ms |
58036 KB |
Output is correct |
62 |
Correct |
198 ms |
58084 KB |
Output is correct |
63 |
Correct |
192 ms |
58092 KB |
Output is correct |
64 |
Correct |
224 ms |
58072 KB |
Output is correct |
65 |
Correct |
135 ms |
58400 KB |
Output is correct |
66 |
Correct |
172 ms |
58272 KB |
Output is correct |
67 |
Correct |
153 ms |
55500 KB |
Output is correct |
68 |
Correct |
189 ms |
56648 KB |
Output is correct |
69 |
Correct |
227 ms |
57932 KB |
Output is correct |
70 |
Correct |
217 ms |
57976 KB |
Output is correct |
71 |
Correct |
152 ms |
55992 KB |
Output is correct |
72 |
Correct |
198 ms |
57684 KB |
Output is correct |
73 |
Correct |
200 ms |
57556 KB |
Output is correct |
74 |
Correct |
213 ms |
58380 KB |
Output is correct |
75 |
Correct |
229 ms |
58468 KB |
Output is correct |
76 |
Correct |
167 ms |
55852 KB |
Output is correct |
77 |
Correct |
188 ms |
57300 KB |
Output is correct |
78 |
Correct |
212 ms |
58436 KB |
Output is correct |
79 |
Correct |
154 ms |
57608 KB |
Output is correct |
80 |
Correct |
144 ms |
57032 KB |
Output is correct |
81 |
Correct |
197 ms |
58484 KB |
Output is correct |
82 |
Correct |
150 ms |
55668 KB |
Output is correct |
83 |
Correct |
200 ms |
58460 KB |
Output is correct |
84 |
Correct |
215 ms |
58476 KB |
Output is correct |
85 |
Correct |
178 ms |
57516 KB |
Output is correct |
86 |
Correct |
181 ms |
58340 KB |
Output is correct |
87 |
Correct |
153 ms |
56868 KB |
Output is correct |
88 |
Correct |
219 ms |
57996 KB |
Output is correct |
89 |
Correct |
129 ms |
55224 KB |
Output is correct |
90 |
Correct |
166 ms |
57972 KB |
Output is correct |
91 |
Correct |
147 ms |
56640 KB |
Output is correct |
92 |
Correct |
149 ms |
56248 KB |
Output is correct |
93 |
Correct |
190 ms |
58272 KB |
Output is correct |
94 |
Correct |
174 ms |
58068 KB |
Output is correct |
95 |
Correct |
186 ms |
57932 KB |
Output is correct |
96 |
Correct |
230 ms |
58028 KB |
Output is correct |
97 |
Correct |
199 ms |
58108 KB |
Output is correct |
98 |
Correct |
182 ms |
56876 KB |
Output is correct |
99 |
Correct |
133 ms |
58268 KB |
Output is correct |
100 |
Correct |
164 ms |
57020 KB |
Output is correct |
101 |
Correct |
166 ms |
58272 KB |
Output is correct |
102 |
Correct |
175 ms |
57728 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
25 ms |
49748 KB |
Output is correct |
2 |
Correct |
26 ms |
49876 KB |
Output is correct |
3 |
Correct |
24 ms |
49788 KB |
Output is correct |
4 |
Correct |
27 ms |
49800 KB |
Output is correct |
5 |
Correct |
26 ms |
49752 KB |
Output is correct |
6 |
Correct |
32 ms |
49760 KB |
Output is correct |
7 |
Correct |
31 ms |
49868 KB |
Output is correct |
8 |
Correct |
29 ms |
49868 KB |
Output is correct |
9 |
Correct |
25 ms |
49868 KB |
Output is correct |
10 |
Correct |
25 ms |
49816 KB |
Output is correct |
11 |
Correct |
25 ms |
49884 KB |
Output is correct |
12 |
Correct |
25 ms |
49852 KB |
Output is correct |
13 |
Correct |
28 ms |
49820 KB |
Output is correct |
14 |
Correct |
23 ms |
49876 KB |
Output is correct |
15 |
Correct |
25 ms |
49752 KB |
Output is correct |
16 |
Correct |
29 ms |
49844 KB |
Output is correct |
17 |
Correct |
26 ms |
49740 KB |
Output is correct |
18 |
Correct |
25 ms |
49876 KB |
Output is correct |
19 |
Correct |
24 ms |
49828 KB |
Output is correct |
20 |
Correct |
25 ms |
49868 KB |
Output is correct |
21 |
Correct |
27 ms |
49876 KB |
Output is correct |
22 |
Correct |
25 ms |
49876 KB |
Output is correct |
23 |
Correct |
26 ms |
49792 KB |
Output is correct |
24 |
Correct |
31 ms |
49796 KB |
Output is correct |
25 |
Correct |
26 ms |
49788 KB |
Output is correct |
26 |
Correct |
25 ms |
49804 KB |
Output is correct |
27 |
Correct |
26 ms |
49876 KB |
Output is correct |
28 |
Correct |
27 ms |
49820 KB |
Output is correct |
29 |
Correct |
26 ms |
49876 KB |
Output is correct |
30 |
Correct |
25 ms |
49812 KB |
Output is correct |
31 |
Correct |
26 ms |
49808 KB |
Output is correct |
32 |
Correct |
28 ms |
49788 KB |
Output is correct |
33 |
Correct |
24 ms |
49816 KB |
Output is correct |
34 |
Correct |
24 ms |
49820 KB |
Output is correct |
35 |
Correct |
25 ms |
49860 KB |
Output is correct |
36 |
Correct |
25 ms |
49876 KB |
Output is correct |
37 |
Correct |
30 ms |
49808 KB |
Output is correct |
38 |
Correct |
27 ms |
49808 KB |
Output is correct |
39 |
Correct |
143 ms |
58292 KB |
Output is correct |
40 |
Correct |
138 ms |
58080 KB |
Output is correct |
41 |
Correct |
141 ms |
58348 KB |
Output is correct |
42 |
Correct |
150 ms |
58464 KB |
Output is correct |
43 |
Correct |
186 ms |
58060 KB |
Output is correct |
44 |
Correct |
153 ms |
58068 KB |
Output is correct |
45 |
Correct |
63 ms |
57672 KB |
Output is correct |
46 |
Correct |
72 ms |
57884 KB |
Output is correct |
47 |
Correct |
123 ms |
57968 KB |
Output is correct |
48 |
Correct |
133 ms |
57980 KB |
Output is correct |
49 |
Correct |
128 ms |
58000 KB |
Output is correct |
50 |
Correct |
140 ms |
58084 KB |
Output is correct |
51 |
Correct |
139 ms |
57444 KB |
Output is correct |
52 |
Correct |
171 ms |
58220 KB |
Output is correct |
53 |
Correct |
151 ms |
57572 KB |
Output is correct |
54 |
Correct |
169 ms |
57740 KB |
Output is correct |
55 |
Correct |
489 ms |
72912 KB |
Output is correct |
56 |
Correct |
422 ms |
68100 KB |
Output is correct |
57 |
Correct |
532 ms |
74652 KB |
Output is correct |
58 |
Correct |
336 ms |
67340 KB |
Output is correct |
59 |
Correct |
324 ms |
67836 KB |
Output is correct |
60 |
Correct |
477 ms |
74452 KB |
Output is correct |
61 |
Correct |
138 ms |
74816 KB |
Output is correct |
62 |
Correct |
145 ms |
74904 KB |
Output is correct |
63 |
Correct |
460 ms |
74444 KB |
Output is correct |
64 |
Correct |
454 ms |
74388 KB |
Output is correct |
65 |
Correct |
503 ms |
73836 KB |
Output is correct |
66 |
Correct |
508 ms |
73960 KB |
Output is correct |
67 |
Correct |
551 ms |
73980 KB |
Output is correct |
68 |
Correct |
582 ms |
74136 KB |
Output is correct |
69 |
Correct |
630 ms |
74364 KB |
Output is correct |
70 |
Correct |
755 ms |
74292 KB |
Output is correct |
71 |
Correct |
706 ms |
74368 KB |
Output is correct |
72 |
Correct |
720 ms |
74412 KB |
Output is correct |
73 |
Correct |
637 ms |
74420 KB |
Output is correct |
74 |
Correct |
606 ms |
74492 KB |
Output is correct |
75 |
Correct |
646 ms |
74336 KB |
Output is correct |
76 |
Correct |
631 ms |
74380 KB |
Output is correct |
77 |
Correct |
629 ms |
74352 KB |
Output is correct |
78 |
Correct |
637 ms |
74308 KB |
Output is correct |
79 |
Correct |
476 ms |
74404 KB |
Output is correct |
80 |
Correct |
413 ms |
75120 KB |
Output is correct |
81 |
Correct |
469 ms |
73792 KB |
Output is correct |
82 |
Correct |
185 ms |
57440 KB |
Output is correct |
83 |
Correct |
161 ms |
56248 KB |
Output is correct |
84 |
Correct |
115 ms |
56608 KB |
Output is correct |
85 |
Correct |
125 ms |
57420 KB |
Output is correct |
86 |
Correct |
192 ms |
57844 KB |
Output is correct |
87 |
Correct |
193 ms |
57916 KB |
Output is correct |
88 |
Correct |
219 ms |
58036 KB |
Output is correct |
89 |
Correct |
198 ms |
58084 KB |
Output is correct |
90 |
Correct |
192 ms |
58092 KB |
Output is correct |
91 |
Correct |
224 ms |
58072 KB |
Output is correct |
92 |
Correct |
135 ms |
58400 KB |
Output is correct |
93 |
Correct |
172 ms |
58272 KB |
Output is correct |
94 |
Correct |
153 ms |
55500 KB |
Output is correct |
95 |
Correct |
189 ms |
56648 KB |
Output is correct |
96 |
Correct |
227 ms |
57932 KB |
Output is correct |
97 |
Correct |
217 ms |
57976 KB |
Output is correct |
98 |
Correct |
152 ms |
55992 KB |
Output is correct |
99 |
Correct |
198 ms |
57684 KB |
Output is correct |
100 |
Correct |
200 ms |
57556 KB |
Output is correct |
101 |
Correct |
213 ms |
58380 KB |
Output is correct |
102 |
Correct |
229 ms |
58468 KB |
Output is correct |
103 |
Correct |
167 ms |
55852 KB |
Output is correct |
104 |
Correct |
188 ms |
57300 KB |
Output is correct |
105 |
Correct |
212 ms |
58436 KB |
Output is correct |
106 |
Correct |
154 ms |
57608 KB |
Output is correct |
107 |
Correct |
144 ms |
57032 KB |
Output is correct |
108 |
Correct |
197 ms |
58484 KB |
Output is correct |
109 |
Correct |
150 ms |
55668 KB |
Output is correct |
110 |
Correct |
200 ms |
58460 KB |
Output is correct |
111 |
Correct |
215 ms |
58476 KB |
Output is correct |
112 |
Correct |
178 ms |
57516 KB |
Output is correct |
113 |
Correct |
181 ms |
58340 KB |
Output is correct |
114 |
Correct |
153 ms |
56868 KB |
Output is correct |
115 |
Correct |
219 ms |
57996 KB |
Output is correct |
116 |
Correct |
129 ms |
55224 KB |
Output is correct |
117 |
Correct |
166 ms |
57972 KB |
Output is correct |
118 |
Correct |
147 ms |
56640 KB |
Output is correct |
119 |
Correct |
149 ms |
56248 KB |
Output is correct |
120 |
Correct |
190 ms |
58272 KB |
Output is correct |
121 |
Correct |
174 ms |
58068 KB |
Output is correct |
122 |
Correct |
186 ms |
57932 KB |
Output is correct |
123 |
Correct |
230 ms |
58028 KB |
Output is correct |
124 |
Correct |
199 ms |
58108 KB |
Output is correct |
125 |
Correct |
182 ms |
56876 KB |
Output is correct |
126 |
Correct |
133 ms |
58268 KB |
Output is correct |
127 |
Correct |
164 ms |
57020 KB |
Output is correct |
128 |
Correct |
166 ms |
58272 KB |
Output is correct |
129 |
Correct |
175 ms |
57728 KB |
Output is correct |
130 |
Correct |
941 ms |
83104 KB |
Output is correct |
131 |
Correct |
715 ms |
78548 KB |
Output is correct |
132 |
Execution timed out |
1094 ms |
89080 KB |
Time limit exceeded |
133 |
Halted |
0 ms |
0 KB |
- |