#include<iostream>
#include<stack>
#include<map>
#include<vector>
#include<string>
#include<unordered_map>
#include <queue>
#include<cstring>
#include<limits.h>
#include <cassert>
#include<cmath>
#include<set>
#include<algorithm>
#include <iomanip>
#include<numeric> //gcd(a,b)
#include<bitset>
using namespace std;
#define ll long long
#define f first
#define endl "\n"
#define s second
#define pii pair<int,int>
#define ppii pair<int,pii>
#define vi vector<int>
#define pb push_back
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define F(n) for(int i=0;i<n;i++)
#define lb lower_bound
#define ub upper_bound
#define fastio ios::sync_with_stdio(false);cin.tie(NULL);
#pragma GCC optimize ("03,unroll-loops")
using namespace std;
#define int long long
const int mod=1e9+7,mxn=3e5+5,lg=30,inf=1e18,minf=-1e18;
int n,m,q;
int a,b,c,d;
int findans[mxn+10],realans[mxn+10];
vector<pii>qry[mxn+10];
struct solve{
int fwk[mxn+10];
vector<pii>add[mxn+10],remove[mxn+10];
void upd(int pos,int val){for(int i=pos;i<=q;i+=(i&-i))fwk[i]+=val;}
int qry(int pos){
int sum=0;
for(int i=pos;i>0;i-=(i&-i))sum+=fwk[i];
return sum;
}
}f[2];
struct node{
int sum,mxpref;
node operator+(node a){
node tmp;
tmp.mxpref=max(mxpref,sum+a.mxpref);
tmp.sum=sum+a.sum;
return tmp;
}
};
struct seg{
node v[4*mxn+10];
void update(int l,int r,int node,int pos,int val){
if(l==r){
v[node].mxpref=v[node].sum=val;
return;
}
int mid=l+(r-l)/2;
if(pos<=mid)update(l,mid,node<<1,pos,val);
else update(mid+1,r,(node<<1)^1,pos,val);
v[node]=v[node<<1]+v[(node<<1)^1];
}
node qry(int l,int r,int ql,int qr,int node){
if(ql<=l&&r<=qr)return v[node];
int mid=l+(r-l)/2;
if(qr<=mid)return qry(l,mid,ql,qr,node<<1);
if(ql>mid)return qry(mid+1,r,ql,qr,(node<<1)^1);
return qry(l,mid,ql,qr,(node<<1))+qry(mid+1,r,ql,qr,(node<<1)^1);
}
}t;
void update(int x){
for(auto i:f[0].add[x])f[0].upd(i.f,i.s),t.update(1,q,1,i.f,-i.s);
for(auto i:f[0].remove[x])f[0].upd(i.f,-i.s),t.update(1,q,1,i.f,0);
for(auto i:f[1].add[x])f[1].upd(i.f,i.s),t.update(1,q,1,i.f,i.s);;
for(auto i:f[1].remove[x])f[1].upd(i.f,-i.s),t.update(1,q,1,i.f,0);
}
int32_t main(){
fastio
cin>>n>>m>>q;
for(int i=1;i<=q;i++){
int ty;cin>>ty;
if(ty==1){
cin>>a>>b>>c>>d;
findans[i]=c;
f[0].add[a].pb({i,d});
f[0].remove[b+1].pb({i,d});
}
else if(ty==2){
cin>>a>>b>>c;
f[1].add[a].pb({i,c});
f[1].remove[b+1].pb({i,c});
}
else{
cin>>a>>b;
qry[a].pb({i,b});
}
}
for(int i=1;i<=n;i++){
update(i);
for(auto j:qry[i]){
int l=1,r=j.f,ans=inf,g=f[1].qry(j.f),k=t.qry(1,q,1,j.f,1).mxpref;
k=max(k,0ll);
while(l<=r){
int mid=l+(r-l)/2;
if(f[0].qry(mid)-g-j.s+k>=0)r=mid-1,ans=min(ans,mid);
else l=mid+1;
}
realans[j.f]=(ans==inf)?-1:findans[ans];
}
}
for(int i=1;i<=q;i++)if(realans[i]!=0)cout<<((realans[i]==-1)?0:realans[i])<<'\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
43612 KB |
Output is correct |
2 |
Correct |
10 ms |
43756 KB |
Output is correct |
3 |
Correct |
10 ms |
43612 KB |
Output is correct |
4 |
Correct |
10 ms |
43752 KB |
Output is correct |
5 |
Correct |
9 ms |
43612 KB |
Output is correct |
6 |
Correct |
9 ms |
43612 KB |
Output is correct |
7 |
Correct |
9 ms |
43612 KB |
Output is correct |
8 |
Correct |
10 ms |
43728 KB |
Output is correct |
9 |
Correct |
12 ms |
43612 KB |
Output is correct |
10 |
Correct |
11 ms |
43764 KB |
Output is correct |
11 |
Correct |
10 ms |
43612 KB |
Output is correct |
12 |
Correct |
11 ms |
43612 KB |
Output is correct |
13 |
Correct |
9 ms |
43740 KB |
Output is correct |
14 |
Correct |
10 ms |
43612 KB |
Output is correct |
15 |
Correct |
10 ms |
43508 KB |
Output is correct |
16 |
Correct |
10 ms |
43632 KB |
Output is correct |
17 |
Correct |
10 ms |
43612 KB |
Output is correct |
18 |
Correct |
10 ms |
43512 KB |
Output is correct |
19 |
Correct |
10 ms |
43612 KB |
Output is correct |
20 |
Correct |
11 ms |
43612 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
43612 KB |
Output is correct |
2 |
Correct |
10 ms |
43756 KB |
Output is correct |
3 |
Correct |
10 ms |
43612 KB |
Output is correct |
4 |
Correct |
10 ms |
43752 KB |
Output is correct |
5 |
Correct |
9 ms |
43612 KB |
Output is correct |
6 |
Correct |
9 ms |
43612 KB |
Output is correct |
7 |
Correct |
9 ms |
43612 KB |
Output is correct |
8 |
Correct |
10 ms |
43728 KB |
Output is correct |
9 |
Correct |
12 ms |
43612 KB |
Output is correct |
10 |
Correct |
11 ms |
43764 KB |
Output is correct |
11 |
Correct |
10 ms |
43612 KB |
Output is correct |
12 |
Correct |
11 ms |
43612 KB |
Output is correct |
13 |
Correct |
9 ms |
43740 KB |
Output is correct |
14 |
Correct |
10 ms |
43612 KB |
Output is correct |
15 |
Correct |
10 ms |
43508 KB |
Output is correct |
16 |
Correct |
10 ms |
43632 KB |
Output is correct |
17 |
Correct |
10 ms |
43612 KB |
Output is correct |
18 |
Correct |
10 ms |
43512 KB |
Output is correct |
19 |
Correct |
10 ms |
43612 KB |
Output is correct |
20 |
Correct |
11 ms |
43612 KB |
Output is correct |
21 |
Correct |
10 ms |
43608 KB |
Output is correct |
22 |
Correct |
10 ms |
43864 KB |
Output is correct |
23 |
Correct |
10 ms |
43508 KB |
Output is correct |
24 |
Correct |
10 ms |
43700 KB |
Output is correct |
25 |
Correct |
9 ms |
43612 KB |
Output is correct |
26 |
Correct |
11 ms |
43756 KB |
Output is correct |
27 |
Correct |
10 ms |
43632 KB |
Output is correct |
28 |
Correct |
10 ms |
43772 KB |
Output is correct |
29 |
Correct |
10 ms |
43612 KB |
Output is correct |
30 |
Correct |
10 ms |
43776 KB |
Output is correct |
31 |
Correct |
10 ms |
43748 KB |
Output is correct |
32 |
Correct |
10 ms |
43864 KB |
Output is correct |
33 |
Correct |
10 ms |
43716 KB |
Output is correct |
34 |
Correct |
10 ms |
43612 KB |
Output is correct |
35 |
Correct |
10 ms |
43612 KB |
Output is correct |
36 |
Correct |
10 ms |
43612 KB |
Output is correct |
37 |
Correct |
10 ms |
43720 KB |
Output is correct |
38 |
Correct |
10 ms |
43556 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
64 ms |
50004 KB |
Output is correct |
2 |
Correct |
60 ms |
50256 KB |
Output is correct |
3 |
Correct |
68 ms |
48716 KB |
Output is correct |
4 |
Correct |
60 ms |
50348 KB |
Output is correct |
5 |
Correct |
61 ms |
50268 KB |
Output is correct |
6 |
Correct |
60 ms |
50076 KB |
Output is correct |
7 |
Correct |
31 ms |
48176 KB |
Output is correct |
8 |
Correct |
33 ms |
48340 KB |
Output is correct |
9 |
Correct |
59 ms |
50256 KB |
Output is correct |
10 |
Correct |
59 ms |
50260 KB |
Output is correct |
11 |
Correct |
59 ms |
48460 KB |
Output is correct |
12 |
Correct |
61 ms |
50260 KB |
Output is correct |
13 |
Correct |
51 ms |
49448 KB |
Output is correct |
14 |
Correct |
63 ms |
50004 KB |
Output is correct |
15 |
Correct |
57 ms |
50152 KB |
Output is correct |
16 |
Correct |
59 ms |
50568 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
292 ms |
69460 KB |
Output is correct |
2 |
Correct |
223 ms |
65800 KB |
Output is correct |
3 |
Correct |
321 ms |
71128 KB |
Output is correct |
4 |
Correct |
222 ms |
66472 KB |
Output is correct |
5 |
Correct |
217 ms |
66384 KB |
Output is correct |
6 |
Correct |
307 ms |
71712 KB |
Output is correct |
7 |
Correct |
117 ms |
64104 KB |
Output is correct |
8 |
Correct |
124 ms |
64524 KB |
Output is correct |
9 |
Correct |
283 ms |
69972 KB |
Output is correct |
10 |
Correct |
290 ms |
69968 KB |
Output is correct |
11 |
Correct |
293 ms |
70572 KB |
Output is correct |
12 |
Correct |
301 ms |
71760 KB |
Output is correct |
13 |
Correct |
294 ms |
70996 KB |
Output is correct |
14 |
Correct |
301 ms |
71512 KB |
Output is correct |
15 |
Correct |
311 ms |
71376 KB |
Output is correct |
16 |
Correct |
315 ms |
71500 KB |
Output is correct |
17 |
Correct |
313 ms |
71544 KB |
Output is correct |
18 |
Correct |
298 ms |
70956 KB |
Output is correct |
19 |
Correct |
336 ms |
71624 KB |
Output is correct |
20 |
Correct |
314 ms |
71252 KB |
Output is correct |
21 |
Correct |
315 ms |
71508 KB |
Output is correct |
22 |
Correct |
311 ms |
71604 KB |
Output is correct |
23 |
Correct |
318 ms |
71508 KB |
Output is correct |
24 |
Correct |
313 ms |
71476 KB |
Output is correct |
25 |
Correct |
223 ms |
69720 KB |
Output is correct |
26 |
Correct |
229 ms |
70532 KB |
Output is correct |
27 |
Correct |
244 ms |
72272 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
43612 KB |
Output is correct |
2 |
Correct |
10 ms |
43756 KB |
Output is correct |
3 |
Correct |
10 ms |
43612 KB |
Output is correct |
4 |
Correct |
10 ms |
43752 KB |
Output is correct |
5 |
Correct |
9 ms |
43612 KB |
Output is correct |
6 |
Correct |
9 ms |
43612 KB |
Output is correct |
7 |
Correct |
9 ms |
43612 KB |
Output is correct |
8 |
Correct |
10 ms |
43728 KB |
Output is correct |
9 |
Correct |
12 ms |
43612 KB |
Output is correct |
10 |
Correct |
11 ms |
43764 KB |
Output is correct |
11 |
Correct |
10 ms |
43612 KB |
Output is correct |
12 |
Correct |
11 ms |
43612 KB |
Output is correct |
13 |
Correct |
9 ms |
43740 KB |
Output is correct |
14 |
Correct |
10 ms |
43612 KB |
Output is correct |
15 |
Correct |
10 ms |
43508 KB |
Output is correct |
16 |
Correct |
10 ms |
43632 KB |
Output is correct |
17 |
Correct |
10 ms |
43612 KB |
Output is correct |
18 |
Correct |
10 ms |
43512 KB |
Output is correct |
19 |
Correct |
10 ms |
43612 KB |
Output is correct |
20 |
Correct |
11 ms |
43612 KB |
Output is correct |
21 |
Correct |
64 ms |
50004 KB |
Output is correct |
22 |
Correct |
60 ms |
50256 KB |
Output is correct |
23 |
Correct |
68 ms |
48716 KB |
Output is correct |
24 |
Correct |
60 ms |
50348 KB |
Output is correct |
25 |
Correct |
61 ms |
50268 KB |
Output is correct |
26 |
Correct |
60 ms |
50076 KB |
Output is correct |
27 |
Correct |
31 ms |
48176 KB |
Output is correct |
28 |
Correct |
33 ms |
48340 KB |
Output is correct |
29 |
Correct |
59 ms |
50256 KB |
Output is correct |
30 |
Correct |
59 ms |
50260 KB |
Output is correct |
31 |
Correct |
59 ms |
48460 KB |
Output is correct |
32 |
Correct |
61 ms |
50260 KB |
Output is correct |
33 |
Correct |
51 ms |
49448 KB |
Output is correct |
34 |
Correct |
63 ms |
50004 KB |
Output is correct |
35 |
Correct |
57 ms |
50152 KB |
Output is correct |
36 |
Correct |
59 ms |
50568 KB |
Output is correct |
37 |
Correct |
56 ms |
49368 KB |
Output is correct |
38 |
Correct |
49 ms |
49276 KB |
Output is correct |
39 |
Correct |
28 ms |
47900 KB |
Output is correct |
40 |
Correct |
32 ms |
48448 KB |
Output is correct |
41 |
Correct |
59 ms |
50012 KB |
Output is correct |
42 |
Correct |
58 ms |
50000 KB |
Output is correct |
43 |
Correct |
65 ms |
50004 KB |
Output is correct |
44 |
Correct |
60 ms |
50008 KB |
Output is correct |
45 |
Correct |
65 ms |
50004 KB |
Output is correct |
46 |
Correct |
62 ms |
50000 KB |
Output is correct |
47 |
Correct |
40 ms |
48608 KB |
Output is correct |
48 |
Correct |
52 ms |
49744 KB |
Output is correct |
49 |
Correct |
45 ms |
48836 KB |
Output is correct |
50 |
Correct |
53 ms |
49692 KB |
Output is correct |
51 |
Correct |
61 ms |
50116 KB |
Output is correct |
52 |
Correct |
66 ms |
50120 KB |
Output is correct |
53 |
Correct |
56 ms |
49244 KB |
Output is correct |
54 |
Correct |
62 ms |
50264 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
56 ms |
47956 KB |
Output is correct |
2 |
Correct |
60 ms |
50060 KB |
Output is correct |
3 |
Correct |
66 ms |
48416 KB |
Output is correct |
4 |
Correct |
46 ms |
48900 KB |
Output is correct |
5 |
Correct |
55 ms |
49420 KB |
Output is correct |
6 |
Correct |
70 ms |
50076 KB |
Output is correct |
7 |
Correct |
36 ms |
48324 KB |
Output is correct |
8 |
Correct |
36 ms |
48432 KB |
Output is correct |
9 |
Correct |
46 ms |
49340 KB |
Output is correct |
10 |
Correct |
41 ms |
48572 KB |
Output is correct |
11 |
Correct |
55 ms |
49744 KB |
Output is correct |
12 |
Correct |
53 ms |
49732 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
43612 KB |
Output is correct |
2 |
Correct |
10 ms |
43756 KB |
Output is correct |
3 |
Correct |
10 ms |
43612 KB |
Output is correct |
4 |
Correct |
10 ms |
43752 KB |
Output is correct |
5 |
Correct |
9 ms |
43612 KB |
Output is correct |
6 |
Correct |
9 ms |
43612 KB |
Output is correct |
7 |
Correct |
9 ms |
43612 KB |
Output is correct |
8 |
Correct |
10 ms |
43728 KB |
Output is correct |
9 |
Correct |
12 ms |
43612 KB |
Output is correct |
10 |
Correct |
11 ms |
43764 KB |
Output is correct |
11 |
Correct |
10 ms |
43612 KB |
Output is correct |
12 |
Correct |
11 ms |
43612 KB |
Output is correct |
13 |
Correct |
9 ms |
43740 KB |
Output is correct |
14 |
Correct |
10 ms |
43612 KB |
Output is correct |
15 |
Correct |
10 ms |
43508 KB |
Output is correct |
16 |
Correct |
10 ms |
43632 KB |
Output is correct |
17 |
Correct |
10 ms |
43612 KB |
Output is correct |
18 |
Correct |
10 ms |
43512 KB |
Output is correct |
19 |
Correct |
10 ms |
43612 KB |
Output is correct |
20 |
Correct |
11 ms |
43612 KB |
Output is correct |
21 |
Correct |
10 ms |
43608 KB |
Output is correct |
22 |
Correct |
10 ms |
43864 KB |
Output is correct |
23 |
Correct |
10 ms |
43508 KB |
Output is correct |
24 |
Correct |
10 ms |
43700 KB |
Output is correct |
25 |
Correct |
9 ms |
43612 KB |
Output is correct |
26 |
Correct |
11 ms |
43756 KB |
Output is correct |
27 |
Correct |
10 ms |
43632 KB |
Output is correct |
28 |
Correct |
10 ms |
43772 KB |
Output is correct |
29 |
Correct |
10 ms |
43612 KB |
Output is correct |
30 |
Correct |
10 ms |
43776 KB |
Output is correct |
31 |
Correct |
10 ms |
43748 KB |
Output is correct |
32 |
Correct |
10 ms |
43864 KB |
Output is correct |
33 |
Correct |
10 ms |
43716 KB |
Output is correct |
34 |
Correct |
10 ms |
43612 KB |
Output is correct |
35 |
Correct |
10 ms |
43612 KB |
Output is correct |
36 |
Correct |
10 ms |
43612 KB |
Output is correct |
37 |
Correct |
10 ms |
43720 KB |
Output is correct |
38 |
Correct |
10 ms |
43556 KB |
Output is correct |
39 |
Correct |
64 ms |
50004 KB |
Output is correct |
40 |
Correct |
60 ms |
50256 KB |
Output is correct |
41 |
Correct |
68 ms |
48716 KB |
Output is correct |
42 |
Correct |
60 ms |
50348 KB |
Output is correct |
43 |
Correct |
61 ms |
50268 KB |
Output is correct |
44 |
Correct |
60 ms |
50076 KB |
Output is correct |
45 |
Correct |
31 ms |
48176 KB |
Output is correct |
46 |
Correct |
33 ms |
48340 KB |
Output is correct |
47 |
Correct |
59 ms |
50256 KB |
Output is correct |
48 |
Correct |
59 ms |
50260 KB |
Output is correct |
49 |
Correct |
59 ms |
48460 KB |
Output is correct |
50 |
Correct |
61 ms |
50260 KB |
Output is correct |
51 |
Correct |
51 ms |
49448 KB |
Output is correct |
52 |
Correct |
63 ms |
50004 KB |
Output is correct |
53 |
Correct |
57 ms |
50152 KB |
Output is correct |
54 |
Correct |
59 ms |
50568 KB |
Output is correct |
55 |
Correct |
56 ms |
49368 KB |
Output is correct |
56 |
Correct |
49 ms |
49276 KB |
Output is correct |
57 |
Correct |
28 ms |
47900 KB |
Output is correct |
58 |
Correct |
32 ms |
48448 KB |
Output is correct |
59 |
Correct |
59 ms |
50012 KB |
Output is correct |
60 |
Correct |
58 ms |
50000 KB |
Output is correct |
61 |
Correct |
65 ms |
50004 KB |
Output is correct |
62 |
Correct |
60 ms |
50008 KB |
Output is correct |
63 |
Correct |
65 ms |
50004 KB |
Output is correct |
64 |
Correct |
62 ms |
50000 KB |
Output is correct |
65 |
Correct |
40 ms |
48608 KB |
Output is correct |
66 |
Correct |
52 ms |
49744 KB |
Output is correct |
67 |
Correct |
45 ms |
48836 KB |
Output is correct |
68 |
Correct |
53 ms |
49692 KB |
Output is correct |
69 |
Correct |
61 ms |
50116 KB |
Output is correct |
70 |
Correct |
66 ms |
50120 KB |
Output is correct |
71 |
Correct |
56 ms |
49244 KB |
Output is correct |
72 |
Correct |
62 ms |
50264 KB |
Output is correct |
73 |
Correct |
56 ms |
47956 KB |
Output is correct |
74 |
Correct |
60 ms |
50060 KB |
Output is correct |
75 |
Correct |
66 ms |
48416 KB |
Output is correct |
76 |
Correct |
46 ms |
48900 KB |
Output is correct |
77 |
Correct |
55 ms |
49420 KB |
Output is correct |
78 |
Correct |
70 ms |
50076 KB |
Output is correct |
79 |
Correct |
36 ms |
48324 KB |
Output is correct |
80 |
Correct |
36 ms |
48432 KB |
Output is correct |
81 |
Correct |
46 ms |
49340 KB |
Output is correct |
82 |
Correct |
41 ms |
48572 KB |
Output is correct |
83 |
Correct |
55 ms |
49744 KB |
Output is correct |
84 |
Correct |
53 ms |
49732 KB |
Output is correct |
85 |
Correct |
59 ms |
50064 KB |
Output is correct |
86 |
Correct |
64 ms |
50436 KB |
Output is correct |
87 |
Correct |
58 ms |
50052 KB |
Output is correct |
88 |
Correct |
62 ms |
50516 KB |
Output is correct |
89 |
Correct |
43 ms |
48976 KB |
Output is correct |
90 |
Correct |
64 ms |
50516 KB |
Output is correct |
91 |
Correct |
51 ms |
49488 KB |
Output is correct |
92 |
Correct |
50 ms |
49492 KB |
Output is correct |
93 |
Correct |
65 ms |
50356 KB |
Output is correct |
94 |
Correct |
73 ms |
50772 KB |
Output is correct |
95 |
Correct |
61 ms |
50256 KB |
Output is correct |
96 |
Correct |
66 ms |
50616 KB |
Output is correct |
97 |
Correct |
64 ms |
50520 KB |
Output is correct |
98 |
Correct |
55 ms |
49800 KB |
Output is correct |
99 |
Correct |
44 ms |
49168 KB |
Output is correct |
100 |
Correct |
48 ms |
49192 KB |
Output is correct |
101 |
Correct |
56 ms |
50212 KB |
Output is correct |
102 |
Correct |
55 ms |
50768 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
43612 KB |
Output is correct |
2 |
Correct |
10 ms |
43756 KB |
Output is correct |
3 |
Correct |
10 ms |
43612 KB |
Output is correct |
4 |
Correct |
10 ms |
43752 KB |
Output is correct |
5 |
Correct |
9 ms |
43612 KB |
Output is correct |
6 |
Correct |
9 ms |
43612 KB |
Output is correct |
7 |
Correct |
9 ms |
43612 KB |
Output is correct |
8 |
Correct |
10 ms |
43728 KB |
Output is correct |
9 |
Correct |
12 ms |
43612 KB |
Output is correct |
10 |
Correct |
11 ms |
43764 KB |
Output is correct |
11 |
Correct |
10 ms |
43612 KB |
Output is correct |
12 |
Correct |
11 ms |
43612 KB |
Output is correct |
13 |
Correct |
9 ms |
43740 KB |
Output is correct |
14 |
Correct |
10 ms |
43612 KB |
Output is correct |
15 |
Correct |
10 ms |
43508 KB |
Output is correct |
16 |
Correct |
10 ms |
43632 KB |
Output is correct |
17 |
Correct |
10 ms |
43612 KB |
Output is correct |
18 |
Correct |
10 ms |
43512 KB |
Output is correct |
19 |
Correct |
10 ms |
43612 KB |
Output is correct |
20 |
Correct |
11 ms |
43612 KB |
Output is correct |
21 |
Correct |
10 ms |
43608 KB |
Output is correct |
22 |
Correct |
10 ms |
43864 KB |
Output is correct |
23 |
Correct |
10 ms |
43508 KB |
Output is correct |
24 |
Correct |
10 ms |
43700 KB |
Output is correct |
25 |
Correct |
9 ms |
43612 KB |
Output is correct |
26 |
Correct |
11 ms |
43756 KB |
Output is correct |
27 |
Correct |
10 ms |
43632 KB |
Output is correct |
28 |
Correct |
10 ms |
43772 KB |
Output is correct |
29 |
Correct |
10 ms |
43612 KB |
Output is correct |
30 |
Correct |
10 ms |
43776 KB |
Output is correct |
31 |
Correct |
10 ms |
43748 KB |
Output is correct |
32 |
Correct |
10 ms |
43864 KB |
Output is correct |
33 |
Correct |
10 ms |
43716 KB |
Output is correct |
34 |
Correct |
10 ms |
43612 KB |
Output is correct |
35 |
Correct |
10 ms |
43612 KB |
Output is correct |
36 |
Correct |
10 ms |
43612 KB |
Output is correct |
37 |
Correct |
10 ms |
43720 KB |
Output is correct |
38 |
Correct |
10 ms |
43556 KB |
Output is correct |
39 |
Correct |
64 ms |
50004 KB |
Output is correct |
40 |
Correct |
60 ms |
50256 KB |
Output is correct |
41 |
Correct |
68 ms |
48716 KB |
Output is correct |
42 |
Correct |
60 ms |
50348 KB |
Output is correct |
43 |
Correct |
61 ms |
50268 KB |
Output is correct |
44 |
Correct |
60 ms |
50076 KB |
Output is correct |
45 |
Correct |
31 ms |
48176 KB |
Output is correct |
46 |
Correct |
33 ms |
48340 KB |
Output is correct |
47 |
Correct |
59 ms |
50256 KB |
Output is correct |
48 |
Correct |
59 ms |
50260 KB |
Output is correct |
49 |
Correct |
59 ms |
48460 KB |
Output is correct |
50 |
Correct |
61 ms |
50260 KB |
Output is correct |
51 |
Correct |
51 ms |
49448 KB |
Output is correct |
52 |
Correct |
63 ms |
50004 KB |
Output is correct |
53 |
Correct |
57 ms |
50152 KB |
Output is correct |
54 |
Correct |
59 ms |
50568 KB |
Output is correct |
55 |
Correct |
292 ms |
69460 KB |
Output is correct |
56 |
Correct |
223 ms |
65800 KB |
Output is correct |
57 |
Correct |
321 ms |
71128 KB |
Output is correct |
58 |
Correct |
222 ms |
66472 KB |
Output is correct |
59 |
Correct |
217 ms |
66384 KB |
Output is correct |
60 |
Correct |
307 ms |
71712 KB |
Output is correct |
61 |
Correct |
117 ms |
64104 KB |
Output is correct |
62 |
Correct |
124 ms |
64524 KB |
Output is correct |
63 |
Correct |
283 ms |
69972 KB |
Output is correct |
64 |
Correct |
290 ms |
69968 KB |
Output is correct |
65 |
Correct |
293 ms |
70572 KB |
Output is correct |
66 |
Correct |
301 ms |
71760 KB |
Output is correct |
67 |
Correct |
294 ms |
70996 KB |
Output is correct |
68 |
Correct |
301 ms |
71512 KB |
Output is correct |
69 |
Correct |
311 ms |
71376 KB |
Output is correct |
70 |
Correct |
315 ms |
71500 KB |
Output is correct |
71 |
Correct |
313 ms |
71544 KB |
Output is correct |
72 |
Correct |
298 ms |
70956 KB |
Output is correct |
73 |
Correct |
336 ms |
71624 KB |
Output is correct |
74 |
Correct |
314 ms |
71252 KB |
Output is correct |
75 |
Correct |
315 ms |
71508 KB |
Output is correct |
76 |
Correct |
311 ms |
71604 KB |
Output is correct |
77 |
Correct |
318 ms |
71508 KB |
Output is correct |
78 |
Correct |
313 ms |
71476 KB |
Output is correct |
79 |
Correct |
223 ms |
69720 KB |
Output is correct |
80 |
Correct |
229 ms |
70532 KB |
Output is correct |
81 |
Correct |
244 ms |
72272 KB |
Output is correct |
82 |
Correct |
56 ms |
49368 KB |
Output is correct |
83 |
Correct |
49 ms |
49276 KB |
Output is correct |
84 |
Correct |
28 ms |
47900 KB |
Output is correct |
85 |
Correct |
32 ms |
48448 KB |
Output is correct |
86 |
Correct |
59 ms |
50012 KB |
Output is correct |
87 |
Correct |
58 ms |
50000 KB |
Output is correct |
88 |
Correct |
65 ms |
50004 KB |
Output is correct |
89 |
Correct |
60 ms |
50008 KB |
Output is correct |
90 |
Correct |
65 ms |
50004 KB |
Output is correct |
91 |
Correct |
62 ms |
50000 KB |
Output is correct |
92 |
Correct |
40 ms |
48608 KB |
Output is correct |
93 |
Correct |
52 ms |
49744 KB |
Output is correct |
94 |
Correct |
45 ms |
48836 KB |
Output is correct |
95 |
Correct |
53 ms |
49692 KB |
Output is correct |
96 |
Correct |
61 ms |
50116 KB |
Output is correct |
97 |
Correct |
66 ms |
50120 KB |
Output is correct |
98 |
Correct |
56 ms |
49244 KB |
Output is correct |
99 |
Correct |
62 ms |
50264 KB |
Output is correct |
100 |
Correct |
56 ms |
47956 KB |
Output is correct |
101 |
Correct |
60 ms |
50060 KB |
Output is correct |
102 |
Correct |
66 ms |
48416 KB |
Output is correct |
103 |
Correct |
46 ms |
48900 KB |
Output is correct |
104 |
Correct |
55 ms |
49420 KB |
Output is correct |
105 |
Correct |
70 ms |
50076 KB |
Output is correct |
106 |
Correct |
36 ms |
48324 KB |
Output is correct |
107 |
Correct |
36 ms |
48432 KB |
Output is correct |
108 |
Correct |
46 ms |
49340 KB |
Output is correct |
109 |
Correct |
41 ms |
48572 KB |
Output is correct |
110 |
Correct |
55 ms |
49744 KB |
Output is correct |
111 |
Correct |
53 ms |
49732 KB |
Output is correct |
112 |
Correct |
59 ms |
50064 KB |
Output is correct |
113 |
Correct |
64 ms |
50436 KB |
Output is correct |
114 |
Correct |
58 ms |
50052 KB |
Output is correct |
115 |
Correct |
62 ms |
50516 KB |
Output is correct |
116 |
Correct |
43 ms |
48976 KB |
Output is correct |
117 |
Correct |
64 ms |
50516 KB |
Output is correct |
118 |
Correct |
51 ms |
49488 KB |
Output is correct |
119 |
Correct |
50 ms |
49492 KB |
Output is correct |
120 |
Correct |
65 ms |
50356 KB |
Output is correct |
121 |
Correct |
73 ms |
50772 KB |
Output is correct |
122 |
Correct |
61 ms |
50256 KB |
Output is correct |
123 |
Correct |
66 ms |
50616 KB |
Output is correct |
124 |
Correct |
64 ms |
50520 KB |
Output is correct |
125 |
Correct |
55 ms |
49800 KB |
Output is correct |
126 |
Correct |
44 ms |
49168 KB |
Output is correct |
127 |
Correct |
48 ms |
49192 KB |
Output is correct |
128 |
Correct |
56 ms |
50212 KB |
Output is correct |
129 |
Correct |
55 ms |
50768 KB |
Output is correct |
130 |
Correct |
335 ms |
71760 KB |
Output is correct |
131 |
Correct |
223 ms |
66188 KB |
Output is correct |
132 |
Correct |
321 ms |
71764 KB |
Output is correct |
133 |
Correct |
310 ms |
71524 KB |
Output is correct |
134 |
Correct |
273 ms |
69200 KB |
Output is correct |
135 |
Correct |
323 ms |
72532 KB |
Output is correct |
136 |
Correct |
294 ms |
70736 KB |
Output is correct |
137 |
Correct |
307 ms |
70900 KB |
Output is correct |
138 |
Correct |
294 ms |
71252 KB |
Output is correct |
139 |
Correct |
308 ms |
72480 KB |
Output is correct |
140 |
Correct |
311 ms |
71644 KB |
Output is correct |
141 |
Correct |
330 ms |
72312 KB |
Output is correct |
142 |
Correct |
334 ms |
72352 KB |
Output is correct |
143 |
Correct |
341 ms |
72020 KB |
Output is correct |
144 |
Correct |
330 ms |
71744 KB |
Output is correct |
145 |
Correct |
323 ms |
72244 KB |
Output is correct |
146 |
Correct |
327 ms |
72216 KB |
Output is correct |
147 |
Correct |
340 ms |
72020 KB |
Output is correct |
148 |
Correct |
350 ms |
72276 KB |
Output is correct |
149 |
Correct |
347 ms |
72048 KB |
Output is correct |
150 |
Correct |
160 ms |
66700 KB |
Output is correct |
151 |
Correct |
245 ms |
70744 KB |
Output is correct |
152 |
Correct |
238 ms |
70996 KB |
Output is correct |
153 |
Correct |
269 ms |
73448 KB |
Output is correct |