#include<bits/stdc++.h>
using namespace std;
#define all(fl) fl.begin(),fl.end()
#define pb push_back
#define fi first
#define se second
#define for1(i,j,k) for(int i=j;i<=k;i++)
#define for2(i,j,k) for(int i=j;i>=k;i--)
#define for3(i,j,k,l) for(int i=j;i<=k;i+=l)
#define lb lower_bound
#define ub upper_bound
#define sz(a) (int)a.size()
#define pii pair<int,int>
#define pli pair<long long,int>
#define gcd __gcd
#define lcm(x,y) x*y/__gcd(x,y)
#define pil pair<int,long long>
const int maxn=2e5+5e4+9;
struct node{
long long mx,lazy;
bool mxup;
node(){
mx=0;
mxup=0;
lazy=0;
}
}st[maxn*4];
void push(int id){
if (st[id].mxup){
if (!st[id*2].mxup){
st[id*2].mxup=1;
st[id*2].mx=st[id].mx;
st[id*2].lazy+=st[id].lazy;
}
else {
st[id*2].mx=max(st[id*2].mx+st[id].lazy,st[id].mx);
st[id*2].lazy+=st[id].lazy;
}
if (!st[id*2+1].mxup){
st[id*2+1].mxup=1;
st[id*2+1].mx=st[id].mx;
st[id*2+1].lazy+=st[id].lazy;
}
else {
st[id*2+1].mx=max(st[id*2+1].mx+st[id].lazy,st[id].mx);
st[id*2+1].lazy+=st[id].lazy;
}
st[id].mx=0;
st[id].lazy=0;
st[id].mxup=0;
}
else {
if (!st[id*2].mxup){
st[id*2].lazy+=st[id].lazy;
}
else {
st[id*2].mx+=st[id].lazy;
st[id*2].lazy+=st[id].lazy;
}
if (!st[id*2+1].mxup){
st[id*2+1].lazy+=st[id].lazy;
}
else {
st[id*2+1].mx+=st[id].lazy;
st[id*2+1].lazy+=st[id].lazy;
}
st[id].lazy=0;
}
}
void update(int id,int l,int r,int u,int v,long long val){
if (l>v||r<u||u>v)return;
if (u<=l&&r<=v){
if (!st[id].mxup){
st[id].lazy+=val;
}
else {
st[id].mx+=val;
st[id].lazy+=val;
}
return;
}
int mid=(l+r)/2;
push(id);
update(id*2,l,mid,u,v,val);
update(id*2+1,mid+1,r,u,v,val);
}
void update2(int id,int l,int r,int u,int v,long long val){
if (l>v||r<u||u>v)return;
if (u<=l&&r<=v){
if (!st[id].mxup){
st[id].mxup=1;
st[id].mx=val;
}
else st[id].mx=max(st[id].mx,val);
return;
}
int mid=(l+r)/2;
push(id);
update2(id*2,l,mid,u,v,val);
update2(id*2+1,mid+1,r,u,v,val);
}
long long get(int id,int l,int r,int u){
while (true){
if (l==r){
return st[id].mx;
}
push(id);
int mid=(l+r)/2;
if (mid>=u){
r=mid;
id=id*2;
}
else {
l=mid+1;
id=id*2+1;
}
}
}
long long bit[maxn];
long long shop[maxn];
long long tk[maxn];
int n,m,q;
void add(int pos,long long val){
for(;pos<=q;pos+=(pos-(pos&(pos-1))))bit[pos]+=val;
}
long long get(int pos){
long long sum=0;
for(;pos>=1;pos-=(pos-(pos&(pos-1))))sum+=bit[pos];
return sum;
}
long long get(int l,int r){
return get(r)-get(l-1);
}
struct range{
int l,r,c;
long long k;
}b[maxn];
vector<int>ad[maxn],dl[maxn];
vector<int>qr[maxn];
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
//freopen("temp.INP","r",stdin);
//freopen("temp.OUT","w",stdout);
cin>>n>>m>>q;
for1(i,1,n)update2(1,1,n,i,i,0);
for1(i,1,q){
int t;
cin>>t;
shop[i]=-1;
if (t==3){
int x;
long long y;
cin>>x>>y;
qr[x].pb(i);
tk[i]=y;
shop[i]=get(1,1,n,x);
}
if (t==2){
int l,r;
long long k;
cin>>l>>r>>k;
update(1,1,n,l,r,-k);
update2(1,1,n,l,r,0);
}
if (t==1){
int l,r,c;
long long k;
cin>>l>>r>>c>>k;
ad[l].pb(i);
dl[r].pb(i);
b[i]={l,r,c,k};
update(1,1,n,l,r,k);
}
}
for1(i,1,n){
for (auto v:ad[i]){
add(v,b[v].k);
}
for (auto v:qr[i]){
//long long haveicecream=tk[v];
if (shop[v]<tk[v]){
shop[v]=0;
continue;
}
long long diff=shop[v]-tk[v]+1;
int l=1,r=v-1,asn=v;
while (l<=r){
int mid=(l+r)/2;
if (get(mid,v)>=diff){
asn=mid;
l=mid+1;
}
else r=mid-1;
}
shop[v]=b[asn].c;
}
for (auto v:dl[i]){
add(v,-b[v].k);
}
}
for1(i,1,q){
if (tk[i]){
cout<<shop[i]<<'\n';
}
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
17 ms |
41548 KB |
Output is correct |
2 |
Correct |
20 ms |
41568 KB |
Output is correct |
3 |
Correct |
18 ms |
41532 KB |
Output is correct |
4 |
Correct |
19 ms |
41588 KB |
Output is correct |
5 |
Correct |
17 ms |
41556 KB |
Output is correct |
6 |
Correct |
17 ms |
41440 KB |
Output is correct |
7 |
Correct |
22 ms |
41620 KB |
Output is correct |
8 |
Correct |
19 ms |
41588 KB |
Output is correct |
9 |
Correct |
23 ms |
41556 KB |
Output is correct |
10 |
Correct |
19 ms |
41604 KB |
Output is correct |
11 |
Correct |
19 ms |
41500 KB |
Output is correct |
12 |
Correct |
18 ms |
41548 KB |
Output is correct |
13 |
Correct |
17 ms |
41568 KB |
Output is correct |
14 |
Correct |
16 ms |
41568 KB |
Output is correct |
15 |
Correct |
18 ms |
41436 KB |
Output is correct |
16 |
Correct |
18 ms |
41568 KB |
Output is correct |
17 |
Correct |
18 ms |
41556 KB |
Output is correct |
18 |
Correct |
18 ms |
41564 KB |
Output is correct |
19 |
Correct |
18 ms |
41568 KB |
Output is correct |
20 |
Correct |
22 ms |
41648 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
17 ms |
41548 KB |
Output is correct |
2 |
Correct |
20 ms |
41568 KB |
Output is correct |
3 |
Correct |
18 ms |
41532 KB |
Output is correct |
4 |
Correct |
19 ms |
41588 KB |
Output is correct |
5 |
Correct |
17 ms |
41556 KB |
Output is correct |
6 |
Correct |
17 ms |
41440 KB |
Output is correct |
7 |
Correct |
22 ms |
41620 KB |
Output is correct |
8 |
Correct |
19 ms |
41588 KB |
Output is correct |
9 |
Correct |
23 ms |
41556 KB |
Output is correct |
10 |
Correct |
19 ms |
41604 KB |
Output is correct |
11 |
Correct |
19 ms |
41500 KB |
Output is correct |
12 |
Correct |
18 ms |
41548 KB |
Output is correct |
13 |
Correct |
17 ms |
41568 KB |
Output is correct |
14 |
Correct |
16 ms |
41568 KB |
Output is correct |
15 |
Correct |
18 ms |
41436 KB |
Output is correct |
16 |
Correct |
18 ms |
41568 KB |
Output is correct |
17 |
Correct |
18 ms |
41556 KB |
Output is correct |
18 |
Correct |
18 ms |
41564 KB |
Output is correct |
19 |
Correct |
18 ms |
41568 KB |
Output is correct |
20 |
Correct |
22 ms |
41648 KB |
Output is correct |
21 |
Correct |
18 ms |
41568 KB |
Output is correct |
22 |
Correct |
19 ms |
41556 KB |
Output is correct |
23 |
Correct |
19 ms |
41616 KB |
Output is correct |
24 |
Correct |
19 ms |
41564 KB |
Output is correct |
25 |
Correct |
17 ms |
41492 KB |
Output is correct |
26 |
Correct |
17 ms |
41556 KB |
Output is correct |
27 |
Correct |
18 ms |
41504 KB |
Output is correct |
28 |
Correct |
18 ms |
41556 KB |
Output is correct |
29 |
Correct |
19 ms |
41636 KB |
Output is correct |
30 |
Correct |
19 ms |
41560 KB |
Output is correct |
31 |
Correct |
20 ms |
41568 KB |
Output is correct |
32 |
Correct |
19 ms |
41548 KB |
Output is correct |
33 |
Correct |
17 ms |
41568 KB |
Output is correct |
34 |
Correct |
21 ms |
41564 KB |
Output is correct |
35 |
Correct |
19 ms |
41500 KB |
Output is correct |
36 |
Correct |
18 ms |
41556 KB |
Output is correct |
37 |
Correct |
21 ms |
41564 KB |
Output is correct |
38 |
Correct |
18 ms |
41556 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
91 ms |
46148 KB |
Output is correct |
2 |
Correct |
86 ms |
46536 KB |
Output is correct |
3 |
Correct |
84 ms |
46240 KB |
Output is correct |
4 |
Correct |
101 ms |
46156 KB |
Output is correct |
5 |
Correct |
86 ms |
46484 KB |
Output is correct |
6 |
Correct |
86 ms |
46464 KB |
Output is correct |
7 |
Correct |
33 ms |
44748 KB |
Output is correct |
8 |
Correct |
35 ms |
44792 KB |
Output is correct |
9 |
Correct |
87 ms |
45328 KB |
Output is correct |
10 |
Correct |
99 ms |
46192 KB |
Output is correct |
11 |
Correct |
87 ms |
45720 KB |
Output is correct |
12 |
Correct |
94 ms |
46132 KB |
Output is correct |
13 |
Correct |
73 ms |
45948 KB |
Output is correct |
14 |
Correct |
86 ms |
47696 KB |
Output is correct |
15 |
Correct |
99 ms |
47856 KB |
Output is correct |
16 |
Correct |
81 ms |
48212 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
397 ms |
58216 KB |
Output is correct |
2 |
Correct |
334 ms |
59100 KB |
Output is correct |
3 |
Correct |
435 ms |
65660 KB |
Output is correct |
4 |
Correct |
339 ms |
59824 KB |
Output is correct |
5 |
Correct |
339 ms |
59892 KB |
Output is correct |
6 |
Correct |
500 ms |
66492 KB |
Output is correct |
7 |
Correct |
104 ms |
58500 KB |
Output is correct |
8 |
Correct |
111 ms |
58640 KB |
Output is correct |
9 |
Correct |
465 ms |
67716 KB |
Output is correct |
10 |
Correct |
480 ms |
67660 KB |
Output is correct |
11 |
Correct |
408 ms |
61540 KB |
Output is correct |
12 |
Correct |
453 ms |
65432 KB |
Output is correct |
13 |
Correct |
421 ms |
61628 KB |
Output is correct |
14 |
Correct |
451 ms |
65340 KB |
Output is correct |
15 |
Correct |
502 ms |
65252 KB |
Output is correct |
16 |
Correct |
439 ms |
65216 KB |
Output is correct |
17 |
Correct |
440 ms |
65280 KB |
Output is correct |
18 |
Correct |
428 ms |
63444 KB |
Output is correct |
19 |
Correct |
452 ms |
65272 KB |
Output is correct |
20 |
Correct |
444 ms |
63544 KB |
Output is correct |
21 |
Correct |
444 ms |
65296 KB |
Output is correct |
22 |
Correct |
448 ms |
65284 KB |
Output is correct |
23 |
Correct |
464 ms |
65188 KB |
Output is correct |
24 |
Correct |
461 ms |
65276 KB |
Output is correct |
25 |
Correct |
334 ms |
61900 KB |
Output is correct |
26 |
Correct |
355 ms |
62328 KB |
Output is correct |
27 |
Correct |
334 ms |
68240 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
17 ms |
41548 KB |
Output is correct |
2 |
Correct |
20 ms |
41568 KB |
Output is correct |
3 |
Correct |
18 ms |
41532 KB |
Output is correct |
4 |
Correct |
19 ms |
41588 KB |
Output is correct |
5 |
Correct |
17 ms |
41556 KB |
Output is correct |
6 |
Correct |
17 ms |
41440 KB |
Output is correct |
7 |
Correct |
22 ms |
41620 KB |
Output is correct |
8 |
Correct |
19 ms |
41588 KB |
Output is correct |
9 |
Correct |
23 ms |
41556 KB |
Output is correct |
10 |
Correct |
19 ms |
41604 KB |
Output is correct |
11 |
Correct |
19 ms |
41500 KB |
Output is correct |
12 |
Correct |
18 ms |
41548 KB |
Output is correct |
13 |
Correct |
17 ms |
41568 KB |
Output is correct |
14 |
Correct |
16 ms |
41568 KB |
Output is correct |
15 |
Correct |
18 ms |
41436 KB |
Output is correct |
16 |
Correct |
18 ms |
41568 KB |
Output is correct |
17 |
Correct |
18 ms |
41556 KB |
Output is correct |
18 |
Correct |
18 ms |
41564 KB |
Output is correct |
19 |
Correct |
18 ms |
41568 KB |
Output is correct |
20 |
Correct |
22 ms |
41648 KB |
Output is correct |
21 |
Correct |
91 ms |
46148 KB |
Output is correct |
22 |
Correct |
86 ms |
46536 KB |
Output is correct |
23 |
Correct |
84 ms |
46240 KB |
Output is correct |
24 |
Correct |
101 ms |
46156 KB |
Output is correct |
25 |
Correct |
86 ms |
46484 KB |
Output is correct |
26 |
Correct |
86 ms |
46464 KB |
Output is correct |
27 |
Correct |
33 ms |
44748 KB |
Output is correct |
28 |
Correct |
35 ms |
44792 KB |
Output is correct |
29 |
Correct |
87 ms |
45328 KB |
Output is correct |
30 |
Correct |
99 ms |
46192 KB |
Output is correct |
31 |
Correct |
87 ms |
45720 KB |
Output is correct |
32 |
Correct |
94 ms |
46132 KB |
Output is correct |
33 |
Correct |
73 ms |
45948 KB |
Output is correct |
34 |
Correct |
86 ms |
47696 KB |
Output is correct |
35 |
Correct |
99 ms |
47856 KB |
Output is correct |
36 |
Correct |
81 ms |
48212 KB |
Output is correct |
37 |
Correct |
99 ms |
46672 KB |
Output is correct |
38 |
Correct |
86 ms |
46188 KB |
Output is correct |
39 |
Correct |
33 ms |
44916 KB |
Output is correct |
40 |
Correct |
36 ms |
45396 KB |
Output is correct |
41 |
Correct |
91 ms |
46156 KB |
Output is correct |
42 |
Correct |
100 ms |
47180 KB |
Output is correct |
43 |
Correct |
104 ms |
47128 KB |
Output is correct |
44 |
Correct |
96 ms |
46604 KB |
Output is correct |
45 |
Correct |
98 ms |
47128 KB |
Output is correct |
46 |
Correct |
113 ms |
47148 KB |
Output is correct |
47 |
Correct |
56 ms |
46228 KB |
Output is correct |
48 |
Correct |
88 ms |
46344 KB |
Output is correct |
49 |
Correct |
74 ms |
45392 KB |
Output is correct |
50 |
Correct |
102 ms |
46324 KB |
Output is correct |
51 |
Correct |
110 ms |
47180 KB |
Output is correct |
52 |
Correct |
108 ms |
47236 KB |
Output is correct |
53 |
Correct |
69 ms |
46816 KB |
Output is correct |
54 |
Correct |
83 ms |
48264 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
91 ms |
47020 KB |
Output is correct |
2 |
Correct |
132 ms |
47432 KB |
Output is correct |
3 |
Correct |
97 ms |
47708 KB |
Output is correct |
4 |
Correct |
75 ms |
46220 KB |
Output is correct |
5 |
Correct |
85 ms |
46984 KB |
Output is correct |
6 |
Correct |
129 ms |
47592 KB |
Output is correct |
7 |
Correct |
53 ms |
45704 KB |
Output is correct |
8 |
Correct |
43 ms |
45496 KB |
Output is correct |
9 |
Correct |
77 ms |
46540 KB |
Output is correct |
10 |
Correct |
63 ms |
45340 KB |
Output is correct |
11 |
Correct |
92 ms |
46692 KB |
Output is correct |
12 |
Correct |
97 ms |
46628 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
17 ms |
41548 KB |
Output is correct |
2 |
Correct |
20 ms |
41568 KB |
Output is correct |
3 |
Correct |
18 ms |
41532 KB |
Output is correct |
4 |
Correct |
19 ms |
41588 KB |
Output is correct |
5 |
Correct |
17 ms |
41556 KB |
Output is correct |
6 |
Correct |
17 ms |
41440 KB |
Output is correct |
7 |
Correct |
22 ms |
41620 KB |
Output is correct |
8 |
Correct |
19 ms |
41588 KB |
Output is correct |
9 |
Correct |
23 ms |
41556 KB |
Output is correct |
10 |
Correct |
19 ms |
41604 KB |
Output is correct |
11 |
Correct |
19 ms |
41500 KB |
Output is correct |
12 |
Correct |
18 ms |
41548 KB |
Output is correct |
13 |
Correct |
17 ms |
41568 KB |
Output is correct |
14 |
Correct |
16 ms |
41568 KB |
Output is correct |
15 |
Correct |
18 ms |
41436 KB |
Output is correct |
16 |
Correct |
18 ms |
41568 KB |
Output is correct |
17 |
Correct |
18 ms |
41556 KB |
Output is correct |
18 |
Correct |
18 ms |
41564 KB |
Output is correct |
19 |
Correct |
18 ms |
41568 KB |
Output is correct |
20 |
Correct |
22 ms |
41648 KB |
Output is correct |
21 |
Correct |
18 ms |
41568 KB |
Output is correct |
22 |
Correct |
19 ms |
41556 KB |
Output is correct |
23 |
Correct |
19 ms |
41616 KB |
Output is correct |
24 |
Correct |
19 ms |
41564 KB |
Output is correct |
25 |
Correct |
17 ms |
41492 KB |
Output is correct |
26 |
Correct |
17 ms |
41556 KB |
Output is correct |
27 |
Correct |
18 ms |
41504 KB |
Output is correct |
28 |
Correct |
18 ms |
41556 KB |
Output is correct |
29 |
Correct |
19 ms |
41636 KB |
Output is correct |
30 |
Correct |
19 ms |
41560 KB |
Output is correct |
31 |
Correct |
20 ms |
41568 KB |
Output is correct |
32 |
Correct |
19 ms |
41548 KB |
Output is correct |
33 |
Correct |
17 ms |
41568 KB |
Output is correct |
34 |
Correct |
21 ms |
41564 KB |
Output is correct |
35 |
Correct |
19 ms |
41500 KB |
Output is correct |
36 |
Correct |
18 ms |
41556 KB |
Output is correct |
37 |
Correct |
21 ms |
41564 KB |
Output is correct |
38 |
Correct |
18 ms |
41556 KB |
Output is correct |
39 |
Correct |
91 ms |
46148 KB |
Output is correct |
40 |
Correct |
86 ms |
46536 KB |
Output is correct |
41 |
Correct |
84 ms |
46240 KB |
Output is correct |
42 |
Correct |
101 ms |
46156 KB |
Output is correct |
43 |
Correct |
86 ms |
46484 KB |
Output is correct |
44 |
Correct |
86 ms |
46464 KB |
Output is correct |
45 |
Correct |
33 ms |
44748 KB |
Output is correct |
46 |
Correct |
35 ms |
44792 KB |
Output is correct |
47 |
Correct |
87 ms |
45328 KB |
Output is correct |
48 |
Correct |
99 ms |
46192 KB |
Output is correct |
49 |
Correct |
87 ms |
45720 KB |
Output is correct |
50 |
Correct |
94 ms |
46132 KB |
Output is correct |
51 |
Correct |
73 ms |
45948 KB |
Output is correct |
52 |
Correct |
86 ms |
47696 KB |
Output is correct |
53 |
Correct |
99 ms |
47856 KB |
Output is correct |
54 |
Correct |
81 ms |
48212 KB |
Output is correct |
55 |
Correct |
99 ms |
46672 KB |
Output is correct |
56 |
Correct |
86 ms |
46188 KB |
Output is correct |
57 |
Correct |
33 ms |
44916 KB |
Output is correct |
58 |
Correct |
36 ms |
45396 KB |
Output is correct |
59 |
Correct |
91 ms |
46156 KB |
Output is correct |
60 |
Correct |
100 ms |
47180 KB |
Output is correct |
61 |
Correct |
104 ms |
47128 KB |
Output is correct |
62 |
Correct |
96 ms |
46604 KB |
Output is correct |
63 |
Correct |
98 ms |
47128 KB |
Output is correct |
64 |
Correct |
113 ms |
47148 KB |
Output is correct |
65 |
Correct |
56 ms |
46228 KB |
Output is correct |
66 |
Correct |
88 ms |
46344 KB |
Output is correct |
67 |
Correct |
74 ms |
45392 KB |
Output is correct |
68 |
Correct |
102 ms |
46324 KB |
Output is correct |
69 |
Correct |
110 ms |
47180 KB |
Output is correct |
70 |
Correct |
108 ms |
47236 KB |
Output is correct |
71 |
Correct |
69 ms |
46816 KB |
Output is correct |
72 |
Correct |
83 ms |
48264 KB |
Output is correct |
73 |
Correct |
91 ms |
47020 KB |
Output is correct |
74 |
Correct |
132 ms |
47432 KB |
Output is correct |
75 |
Correct |
97 ms |
47708 KB |
Output is correct |
76 |
Correct |
75 ms |
46220 KB |
Output is correct |
77 |
Correct |
85 ms |
46984 KB |
Output is correct |
78 |
Correct |
129 ms |
47592 KB |
Output is correct |
79 |
Correct |
53 ms |
45704 KB |
Output is correct |
80 |
Correct |
43 ms |
45496 KB |
Output is correct |
81 |
Correct |
77 ms |
46540 KB |
Output is correct |
82 |
Correct |
63 ms |
45340 KB |
Output is correct |
83 |
Correct |
92 ms |
46692 KB |
Output is correct |
84 |
Correct |
97 ms |
46628 KB |
Output is correct |
85 |
Correct |
109 ms |
47092 KB |
Output is correct |
86 |
Correct |
127 ms |
47720 KB |
Output is correct |
87 |
Correct |
118 ms |
47132 KB |
Output is correct |
88 |
Correct |
123 ms |
48020 KB |
Output is correct |
89 |
Correct |
87 ms |
45036 KB |
Output is correct |
90 |
Correct |
112 ms |
47616 KB |
Output is correct |
91 |
Correct |
91 ms |
46496 KB |
Output is correct |
92 |
Correct |
115 ms |
46284 KB |
Output is correct |
93 |
Correct |
105 ms |
47632 KB |
Output is correct |
94 |
Correct |
109 ms |
47144 KB |
Output is correct |
95 |
Correct |
112 ms |
47456 KB |
Output is correct |
96 |
Correct |
115 ms |
47676 KB |
Output is correct |
97 |
Correct |
112 ms |
47708 KB |
Output is correct |
98 |
Correct |
89 ms |
46688 KB |
Output is correct |
99 |
Correct |
69 ms |
46676 KB |
Output is correct |
100 |
Correct |
93 ms |
46084 KB |
Output is correct |
101 |
Correct |
93 ms |
46872 KB |
Output is correct |
102 |
Correct |
98 ms |
48520 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
17 ms |
41548 KB |
Output is correct |
2 |
Correct |
20 ms |
41568 KB |
Output is correct |
3 |
Correct |
18 ms |
41532 KB |
Output is correct |
4 |
Correct |
19 ms |
41588 KB |
Output is correct |
5 |
Correct |
17 ms |
41556 KB |
Output is correct |
6 |
Correct |
17 ms |
41440 KB |
Output is correct |
7 |
Correct |
22 ms |
41620 KB |
Output is correct |
8 |
Correct |
19 ms |
41588 KB |
Output is correct |
9 |
Correct |
23 ms |
41556 KB |
Output is correct |
10 |
Correct |
19 ms |
41604 KB |
Output is correct |
11 |
Correct |
19 ms |
41500 KB |
Output is correct |
12 |
Correct |
18 ms |
41548 KB |
Output is correct |
13 |
Correct |
17 ms |
41568 KB |
Output is correct |
14 |
Correct |
16 ms |
41568 KB |
Output is correct |
15 |
Correct |
18 ms |
41436 KB |
Output is correct |
16 |
Correct |
18 ms |
41568 KB |
Output is correct |
17 |
Correct |
18 ms |
41556 KB |
Output is correct |
18 |
Correct |
18 ms |
41564 KB |
Output is correct |
19 |
Correct |
18 ms |
41568 KB |
Output is correct |
20 |
Correct |
22 ms |
41648 KB |
Output is correct |
21 |
Correct |
18 ms |
41568 KB |
Output is correct |
22 |
Correct |
19 ms |
41556 KB |
Output is correct |
23 |
Correct |
19 ms |
41616 KB |
Output is correct |
24 |
Correct |
19 ms |
41564 KB |
Output is correct |
25 |
Correct |
17 ms |
41492 KB |
Output is correct |
26 |
Correct |
17 ms |
41556 KB |
Output is correct |
27 |
Correct |
18 ms |
41504 KB |
Output is correct |
28 |
Correct |
18 ms |
41556 KB |
Output is correct |
29 |
Correct |
19 ms |
41636 KB |
Output is correct |
30 |
Correct |
19 ms |
41560 KB |
Output is correct |
31 |
Correct |
20 ms |
41568 KB |
Output is correct |
32 |
Correct |
19 ms |
41548 KB |
Output is correct |
33 |
Correct |
17 ms |
41568 KB |
Output is correct |
34 |
Correct |
21 ms |
41564 KB |
Output is correct |
35 |
Correct |
19 ms |
41500 KB |
Output is correct |
36 |
Correct |
18 ms |
41556 KB |
Output is correct |
37 |
Correct |
21 ms |
41564 KB |
Output is correct |
38 |
Correct |
18 ms |
41556 KB |
Output is correct |
39 |
Correct |
91 ms |
46148 KB |
Output is correct |
40 |
Correct |
86 ms |
46536 KB |
Output is correct |
41 |
Correct |
84 ms |
46240 KB |
Output is correct |
42 |
Correct |
101 ms |
46156 KB |
Output is correct |
43 |
Correct |
86 ms |
46484 KB |
Output is correct |
44 |
Correct |
86 ms |
46464 KB |
Output is correct |
45 |
Correct |
33 ms |
44748 KB |
Output is correct |
46 |
Correct |
35 ms |
44792 KB |
Output is correct |
47 |
Correct |
87 ms |
45328 KB |
Output is correct |
48 |
Correct |
99 ms |
46192 KB |
Output is correct |
49 |
Correct |
87 ms |
45720 KB |
Output is correct |
50 |
Correct |
94 ms |
46132 KB |
Output is correct |
51 |
Correct |
73 ms |
45948 KB |
Output is correct |
52 |
Correct |
86 ms |
47696 KB |
Output is correct |
53 |
Correct |
99 ms |
47856 KB |
Output is correct |
54 |
Correct |
81 ms |
48212 KB |
Output is correct |
55 |
Correct |
397 ms |
58216 KB |
Output is correct |
56 |
Correct |
334 ms |
59100 KB |
Output is correct |
57 |
Correct |
435 ms |
65660 KB |
Output is correct |
58 |
Correct |
339 ms |
59824 KB |
Output is correct |
59 |
Correct |
339 ms |
59892 KB |
Output is correct |
60 |
Correct |
500 ms |
66492 KB |
Output is correct |
61 |
Correct |
104 ms |
58500 KB |
Output is correct |
62 |
Correct |
111 ms |
58640 KB |
Output is correct |
63 |
Correct |
465 ms |
67716 KB |
Output is correct |
64 |
Correct |
480 ms |
67660 KB |
Output is correct |
65 |
Correct |
408 ms |
61540 KB |
Output is correct |
66 |
Correct |
453 ms |
65432 KB |
Output is correct |
67 |
Correct |
421 ms |
61628 KB |
Output is correct |
68 |
Correct |
451 ms |
65340 KB |
Output is correct |
69 |
Correct |
502 ms |
65252 KB |
Output is correct |
70 |
Correct |
439 ms |
65216 KB |
Output is correct |
71 |
Correct |
440 ms |
65280 KB |
Output is correct |
72 |
Correct |
428 ms |
63444 KB |
Output is correct |
73 |
Correct |
452 ms |
65272 KB |
Output is correct |
74 |
Correct |
444 ms |
63544 KB |
Output is correct |
75 |
Correct |
444 ms |
65296 KB |
Output is correct |
76 |
Correct |
448 ms |
65284 KB |
Output is correct |
77 |
Correct |
464 ms |
65188 KB |
Output is correct |
78 |
Correct |
461 ms |
65276 KB |
Output is correct |
79 |
Correct |
334 ms |
61900 KB |
Output is correct |
80 |
Correct |
355 ms |
62328 KB |
Output is correct |
81 |
Correct |
334 ms |
68240 KB |
Output is correct |
82 |
Correct |
99 ms |
46672 KB |
Output is correct |
83 |
Correct |
86 ms |
46188 KB |
Output is correct |
84 |
Correct |
33 ms |
44916 KB |
Output is correct |
85 |
Correct |
36 ms |
45396 KB |
Output is correct |
86 |
Correct |
91 ms |
46156 KB |
Output is correct |
87 |
Correct |
100 ms |
47180 KB |
Output is correct |
88 |
Correct |
104 ms |
47128 KB |
Output is correct |
89 |
Correct |
96 ms |
46604 KB |
Output is correct |
90 |
Correct |
98 ms |
47128 KB |
Output is correct |
91 |
Correct |
113 ms |
47148 KB |
Output is correct |
92 |
Correct |
56 ms |
46228 KB |
Output is correct |
93 |
Correct |
88 ms |
46344 KB |
Output is correct |
94 |
Correct |
74 ms |
45392 KB |
Output is correct |
95 |
Correct |
102 ms |
46324 KB |
Output is correct |
96 |
Correct |
110 ms |
47180 KB |
Output is correct |
97 |
Correct |
108 ms |
47236 KB |
Output is correct |
98 |
Correct |
69 ms |
46816 KB |
Output is correct |
99 |
Correct |
83 ms |
48264 KB |
Output is correct |
100 |
Correct |
91 ms |
47020 KB |
Output is correct |
101 |
Correct |
132 ms |
47432 KB |
Output is correct |
102 |
Correct |
97 ms |
47708 KB |
Output is correct |
103 |
Correct |
75 ms |
46220 KB |
Output is correct |
104 |
Correct |
85 ms |
46984 KB |
Output is correct |
105 |
Correct |
129 ms |
47592 KB |
Output is correct |
106 |
Correct |
53 ms |
45704 KB |
Output is correct |
107 |
Correct |
43 ms |
45496 KB |
Output is correct |
108 |
Correct |
77 ms |
46540 KB |
Output is correct |
109 |
Correct |
63 ms |
45340 KB |
Output is correct |
110 |
Correct |
92 ms |
46692 KB |
Output is correct |
111 |
Correct |
97 ms |
46628 KB |
Output is correct |
112 |
Correct |
109 ms |
47092 KB |
Output is correct |
113 |
Correct |
127 ms |
47720 KB |
Output is correct |
114 |
Correct |
118 ms |
47132 KB |
Output is correct |
115 |
Correct |
123 ms |
48020 KB |
Output is correct |
116 |
Correct |
87 ms |
45036 KB |
Output is correct |
117 |
Correct |
112 ms |
47616 KB |
Output is correct |
118 |
Correct |
91 ms |
46496 KB |
Output is correct |
119 |
Correct |
115 ms |
46284 KB |
Output is correct |
120 |
Correct |
105 ms |
47632 KB |
Output is correct |
121 |
Correct |
109 ms |
47144 KB |
Output is correct |
122 |
Correct |
112 ms |
47456 KB |
Output is correct |
123 |
Correct |
115 ms |
47676 KB |
Output is correct |
124 |
Correct |
112 ms |
47708 KB |
Output is correct |
125 |
Correct |
89 ms |
46688 KB |
Output is correct |
126 |
Correct |
69 ms |
46676 KB |
Output is correct |
127 |
Correct |
93 ms |
46084 KB |
Output is correct |
128 |
Correct |
93 ms |
46872 KB |
Output is correct |
129 |
Correct |
98 ms |
48520 KB |
Output is correct |
130 |
Correct |
472 ms |
66236 KB |
Output is correct |
131 |
Correct |
391 ms |
59468 KB |
Output is correct |
132 |
Correct |
470 ms |
66256 KB |
Output is correct |
133 |
Correct |
482 ms |
66012 KB |
Output is correct |
134 |
Correct |
399 ms |
63484 KB |
Output is correct |
135 |
Correct |
487 ms |
67188 KB |
Output is correct |
136 |
Correct |
466 ms |
68600 KB |
Output is correct |
137 |
Correct |
454 ms |
68536 KB |
Output is correct |
138 |
Correct |
426 ms |
62088 KB |
Output is correct |
139 |
Correct |
447 ms |
65908 KB |
Output is correct |
140 |
Correct |
465 ms |
62476 KB |
Output is correct |
141 |
Correct |
452 ms |
65864 KB |
Output is correct |
142 |
Correct |
481 ms |
65816 KB |
Output is correct |
143 |
Correct |
444 ms |
65844 KB |
Output is correct |
144 |
Correct |
443 ms |
63984 KB |
Output is correct |
145 |
Correct |
462 ms |
65872 KB |
Output is correct |
146 |
Correct |
440 ms |
64308 KB |
Output is correct |
147 |
Correct |
454 ms |
65828 KB |
Output is correct |
148 |
Correct |
467 ms |
65840 KB |
Output is correct |
149 |
Correct |
444 ms |
65848 KB |
Output is correct |
150 |
Correct |
233 ms |
62136 KB |
Output is correct |
151 |
Correct |
362 ms |
62940 KB |
Output is correct |
152 |
Correct |
371 ms |
62996 KB |
Output is correct |
153 |
Correct |
325 ms |
68988 KB |
Output is correct |