# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
870902 |
2023-11-09T12:27:14 Z |
willychan |
Fish 2 (JOI22_fish2) |
C++14 |
|
1795 ms |
33548 KB |
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
//#include<bits/extc++.h>
//__gnu_pbds
vector<ll> A;
struct SegTree {
vector<pair<int,int> > arr;
vector<int> tag;
int n;
void built(int ind,int L,int R){
arr[ind].second = (R-L+1);
if(L==R) return;
int M = (L+R)/2;
built(2*ind,L,M);
built(2*ind+1,M+1,R);
}
void init(int _n) {
n =_n;
arr.resize(4*n);
tag.resize(4*n);
built(1,1,n);
}
void push(int ind) {
if(2*ind+1>4*n) return;
if(tag[ind]) {
arr[2*ind].first+=tag[ind];
arr[2*ind+1].first+=tag[ind];
tag[2*ind]+=tag[ind];
tag[2*ind+1]+=tag[ind];
tag[ind]=0;
}
}
inline pair<int,int> merge(const pair<int,int> a,const pair<int,int> b) {
if(a.first!=b.first) return min(a,b);
return {a.first,a.second+b.second};
}
pair<int,int> query(int ind,int l,int r,int L,int R) {
if(r<l) return {0,0};
if(l==L && r==R) {
return arr[ind];
}
push(ind);
int M = (L+R)/2;
if(r<=M) return query(2*ind,l,r,L,M);
if(l>M) return query(2*ind+1,l,r,M+1,R);
return merge(query(2*ind,l,M,L,M),query(2*ind+1,M+1,r,M+1,R));
}
void modify(int ind,int l,int r,int L,int R,int v) {
//cout<<l<<" "<<r<<"~"<<L<<" "<<R<<"safd"<<endl;
if(l==L && r==R) {
arr[ind].first+=v;
tag[ind]+=v;
return ;
}
push(ind);
int M = (L+R)/2;
if(r<=M) modify(2*ind,l,r,L,M,v);
else if(l>M) modify(2*ind+1,l,r,M+1,R,v);
else {
modify(2*ind,l,M,L,M,v);
modify(2*ind+1,M+1,r,M+1,R,v);
}
arr[ind] = merge(arr[2*ind],arr[2*ind+1]);
}
} segtree;
struct range {
int l,r;
range(int _l,int _r) {
l = _l;
r = _r;
}
bool operator<(const range &rhs) const {
return (r-l)<(rhs.r-rhs.l);
}
};
struct IntTree {
vector<priority_queue<range> > arr;
int n;
void init(int _n) {
n = _n;
arr.resize(4*n);
}
void insert(range a,int ind,int L,int R) {
int M = (L+R)/2;
if(a.l<=M && a.r>=M) {
//cout<<"insert "<<a.l<<" "<<a.r<<"->"<<ind<<"\n";
arr[ind].push(a);
segtree.modify(1,a.l,a.r,1,n,1);
return;
}
if(a.r<=M) insert(a,2*ind,L,M);
else insert(a,2*ind+1,M+1,R);
}
void remove(int x,int ind,int L,int R) {
while(arr[ind].size()) {
range cur = arr[ind].top();
if(cur.l<=x && cur.r>=x) {
segtree.modify(1,cur.l,cur.r,1,n,-1);
arr[ind].pop();
} else {
break;
}
}
int M = (L+R)/2;
if(x==M) return;
if(x<M) remove(x,2*ind,L,M);
if(x>M) remove(x,2*ind+1,M+1,R);
}
void out(int ind,int L,int R){
auto pq = arr[ind];
while(pq.size()){
// cout<<pq.top().l<<" "<<pq.top().r<<"->"<<ind<<"k\n";
pq.pop();
}
if(L==R) return;
int M = (L+R)/2;
out(2*ind,L,M);
out(2*ind+1,M+1,R);
}
} inttree;
struct SegTree2 {
vector< pair<ll,ll> > arr;
// a[i]+A[i]>A[x]
// 2*a[i]-A[i]>-A[x-1]
vector<ll> tag;
int n;
void init(int _n) {
n = _n;
arr.resize(4*n);
tag.resize(4*n);
}
void apply(int ind,ll v) {
arr[ind].first+=v;
arr[ind].second-=v;
tag[ind]+=v;
}
void push(int ind) {
if(2*ind+1>=4*n) return;
if(tag[ind]) {
apply(2*ind,tag[ind]);
apply(2*ind+1,tag[ind]);
tag[ind]=0;
}
}
ll sum(int ind,int x,int L,int R) {
if(L==R && L==x) {
return arr[ind].first-A[x];
}
push(ind);
int M = (L+R)/2;
if(x<=M) return sum(2*ind,x,L,M);
if(x>M) return sum(2*ind+1,x,M+1,R);
assert(1==0);
return 0;
}
void smodify(int ind,int x,int L,int R,ll v) {
if(L==x && R==x) {
arr[ind].first+=v;
arr[ind].second+=2*v;
return;
}
push(ind);
int M = (L+R)/2;
if(x<=M) smodify(2*ind,x,L,M,v);
if(x>M) smodify(2*ind+1,x,M+1,R,v);
arr[ind] = {max(arr[2*ind].first,arr[2*ind+1].first),max(arr[2*ind].second,arr[2*ind+1].second)};
}
void rmodify(int ind,int l,int r,int L,int R,ll v) {
if(l==L && r==R) {
apply(ind,v);
return;
}
push(ind);
int M = (L+R)/2;
if(r<=M) rmodify(2*ind,l,r,L,M,v);
else if(l>M) rmodify(2*ind+1,l,r,M+1,R,v);
else {
rmodify(2*ind,l,M,L,M,v);
rmodify(2*ind+1,M+1,r,M+1,R,v);
}
arr[ind] = {max(arr[2*ind].first,arr[2*ind+1].first),max(arr[2*ind].second,arr[2*ind+1].second)};
}
void update(int ind,ll v) {
ll k = v-A[ind];
smodify(1,ind,1,n,k);
rmodify(1,ind,n,1,n,k);
A[ind]=v;
}
void getr(int ind,ll v,int x,int L,int R,vector<pair<int,ll> > &ret) {
if(R<x) return;
if(arr[ind].second<=v) return;
if(L==R) {
ret.push_back({L,arr[ind].second});
return;
}
push(ind);
int M =(L+R)/2;
getr(2*ind,v,x,L,M,ret);
getr(2*ind+1,v,x,M+1,R,ret);
}
void getl(int ind,ll v,int x,int L,int R,vector<pair<int,ll> > &ret) {
if(L>x) return;
if(arr[ind].first<=v) return;
if(L==R) {
ret.push_back({L,arr[ind].first});
return;
}
push(ind);
int M = (L+R)/2;
getl(2*ind,v,x,L,M,ret);
getl(2*ind+1,v,x,M+1,R,ret);
}
} segtree2;
int n;
void MainUpdate(int ind,ll v) {
inttree.remove(ind,1,1,n);
inttree.remove(ind-1,1,1,n);
inttree.remove(ind+1,1,1,n);
segtree2.update(ind,v);
vector<pair<int,ll> > rcan;
vector<pair<int,ll> > lcan;
ll Ax = segtree2.sum(1,ind,1,n);
segtree2.getr(1,-(Ax),ind,1,n,rcan);
segtree2.getl(1,Ax-A[ind],ind,1,n,lcan);
// a[i]+A[i]>A[x-1]
// 2*a[i]-A[i]>-A[x]
for(auto pr : rcan) {
for(auto pl : lcan) { if(pr.first-1<pl.first+1) continue;
ll sumbet = (A[pr.first]-pr.second)-(pl.second-A[pl.first]);
if(A[pr.first]>sumbet && A[pl.first]>sumbet){
//if(ind==4) cout<<pl.first<<" "<<pr.first<<"gg\n";
inttree.insert(range(pl.first+1,pr.first-1),1,1,n);
}
}
}
}
int main() {
ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
cin>>n;
n+=2;
segtree.init(n);
inttree.init(n);
segtree2.init(n);
A.resize(n+1);
inttree.insert(range(2,n-1),1,1,n);
segtree2.update(1,1e16);
segtree2.update(n,1e16);
for(int i=2; i<n; i++) {
ll v;
cin>>v;
MainUpdate(i,v);
}
int q;
cin>>q;
while(q--) {
int t;
cin>>t;
if(t==1) {
int x,y;
cin>>x>>y;
x++;
// cout<<"t\n";
MainUpdate(x,y);
} else {
int l,r;
cin>>l>>r;
l++;
r++;
int rl = l;
int rr = r;
vector<pair<int,ll> > rcan;
ll Ax = segtree2.sum(1,l,1,n);
segtree2.getr(1,-(Ax-A[l]),l,1,n,rcan);
for(auto i : rcan) if(i.first<=r) rl = max(rl,i.first);
vector<pair<int,ll> > lcan;
Ax = segtree2.sum(1,r,1,n);
segtree2.getl(1,Ax,r,1,n,lcan);
for(auto i : lcan) if(i.first>=l) rr = min(rr,i.first);
pair<int,int> ans = segtree.query(1,rl,rr,1,n);
cout<<ans.second<<"\n";
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
3 ms |
348 KB |
Output is correct |
6 |
Correct |
2 ms |
348 KB |
Output is correct |
7 |
Correct |
3 ms |
348 KB |
Output is correct |
8 |
Correct |
4 ms |
348 KB |
Output is correct |
9 |
Correct |
2 ms |
348 KB |
Output is correct |
10 |
Correct |
3 ms |
348 KB |
Output is correct |
11 |
Correct |
2 ms |
348 KB |
Output is correct |
12 |
Correct |
3 ms |
604 KB |
Output is correct |
13 |
Correct |
3 ms |
604 KB |
Output is correct |
14 |
Correct |
3 ms |
348 KB |
Output is correct |
15 |
Correct |
4 ms |
604 KB |
Output is correct |
16 |
Correct |
4 ms |
424 KB |
Output is correct |
17 |
Correct |
3 ms |
604 KB |
Output is correct |
18 |
Correct |
2 ms |
600 KB |
Output is correct |
19 |
Correct |
2 ms |
604 KB |
Output is correct |
20 |
Correct |
2 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
382 ms |
28996 KB |
Output is correct |
3 |
Correct |
548 ms |
29008 KB |
Output is correct |
4 |
Correct |
381 ms |
28984 KB |
Output is correct |
5 |
Correct |
559 ms |
29012 KB |
Output is correct |
6 |
Correct |
350 ms |
29012 KB |
Output is correct |
7 |
Correct |
599 ms |
28644 KB |
Output is correct |
8 |
Correct |
352 ms |
28996 KB |
Output is correct |
9 |
Correct |
603 ms |
28424 KB |
Output is correct |
10 |
Correct |
896 ms |
28568 KB |
Output is correct |
11 |
Correct |
1049 ms |
28392 KB |
Output is correct |
12 |
Correct |
473 ms |
29112 KB |
Output is correct |
13 |
Correct |
450 ms |
28756 KB |
Output is correct |
14 |
Correct |
401 ms |
29744 KB |
Output is correct |
15 |
Correct |
414 ms |
29316 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
3 ms |
348 KB |
Output is correct |
6 |
Correct |
2 ms |
348 KB |
Output is correct |
7 |
Correct |
3 ms |
348 KB |
Output is correct |
8 |
Correct |
4 ms |
348 KB |
Output is correct |
9 |
Correct |
2 ms |
348 KB |
Output is correct |
10 |
Correct |
3 ms |
348 KB |
Output is correct |
11 |
Correct |
2 ms |
348 KB |
Output is correct |
12 |
Correct |
3 ms |
604 KB |
Output is correct |
13 |
Correct |
3 ms |
604 KB |
Output is correct |
14 |
Correct |
3 ms |
348 KB |
Output is correct |
15 |
Correct |
4 ms |
604 KB |
Output is correct |
16 |
Correct |
4 ms |
424 KB |
Output is correct |
17 |
Correct |
3 ms |
604 KB |
Output is correct |
18 |
Correct |
2 ms |
600 KB |
Output is correct |
19 |
Correct |
2 ms |
604 KB |
Output is correct |
20 |
Correct |
2 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
382 ms |
28996 KB |
Output is correct |
23 |
Correct |
548 ms |
29008 KB |
Output is correct |
24 |
Correct |
381 ms |
28984 KB |
Output is correct |
25 |
Correct |
559 ms |
29012 KB |
Output is correct |
26 |
Correct |
350 ms |
29012 KB |
Output is correct |
27 |
Correct |
599 ms |
28644 KB |
Output is correct |
28 |
Correct |
352 ms |
28996 KB |
Output is correct |
29 |
Correct |
603 ms |
28424 KB |
Output is correct |
30 |
Correct |
896 ms |
28568 KB |
Output is correct |
31 |
Correct |
1049 ms |
28392 KB |
Output is correct |
32 |
Correct |
473 ms |
29112 KB |
Output is correct |
33 |
Correct |
450 ms |
28756 KB |
Output is correct |
34 |
Correct |
401 ms |
29744 KB |
Output is correct |
35 |
Correct |
414 ms |
29316 KB |
Output is correct |
36 |
Correct |
390 ms |
28944 KB |
Output is correct |
37 |
Correct |
563 ms |
29524 KB |
Output is correct |
38 |
Correct |
552 ms |
28976 KB |
Output is correct |
39 |
Correct |
393 ms |
29012 KB |
Output is correct |
40 |
Correct |
540 ms |
29268 KB |
Output is correct |
41 |
Correct |
366 ms |
29008 KB |
Output is correct |
42 |
Correct |
369 ms |
29312 KB |
Output is correct |
43 |
Correct |
580 ms |
28496 KB |
Output is correct |
44 |
Correct |
543 ms |
28384 KB |
Output is correct |
45 |
Correct |
937 ms |
28396 KB |
Output is correct |
46 |
Correct |
916 ms |
28392 KB |
Output is correct |
47 |
Correct |
1050 ms |
28392 KB |
Output is correct |
48 |
Correct |
455 ms |
28796 KB |
Output is correct |
49 |
Correct |
422 ms |
28808 KB |
Output is correct |
50 |
Correct |
406 ms |
29564 KB |
Output is correct |
51 |
Correct |
412 ms |
29268 KB |
Output is correct |
52 |
Correct |
410 ms |
29520 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
382 ms |
28996 KB |
Output is correct |
3 |
Correct |
548 ms |
29008 KB |
Output is correct |
4 |
Correct |
381 ms |
28984 KB |
Output is correct |
5 |
Correct |
559 ms |
29012 KB |
Output is correct |
6 |
Correct |
350 ms |
29012 KB |
Output is correct |
7 |
Correct |
599 ms |
28644 KB |
Output is correct |
8 |
Correct |
352 ms |
28996 KB |
Output is correct |
9 |
Correct |
603 ms |
28424 KB |
Output is correct |
10 |
Correct |
896 ms |
28568 KB |
Output is correct |
11 |
Correct |
1049 ms |
28392 KB |
Output is correct |
12 |
Correct |
473 ms |
29112 KB |
Output is correct |
13 |
Correct |
450 ms |
28756 KB |
Output is correct |
14 |
Correct |
401 ms |
29744 KB |
Output is correct |
15 |
Correct |
414 ms |
29316 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
759 ms |
29656 KB |
Output is correct |
18 |
Correct |
564 ms |
31704 KB |
Output is correct |
19 |
Correct |
774 ms |
31424 KB |
Output is correct |
20 |
Correct |
782 ms |
31208 KB |
Output is correct |
21 |
Correct |
759 ms |
31204 KB |
Output is correct |
22 |
Correct |
557 ms |
31356 KB |
Output is correct |
23 |
Correct |
748 ms |
31064 KB |
Output is correct |
24 |
Correct |
783 ms |
31008 KB |
Output is correct |
25 |
Correct |
747 ms |
31212 KB |
Output is correct |
26 |
Correct |
768 ms |
31556 KB |
Output is correct |
27 |
Correct |
508 ms |
31804 KB |
Output is correct |
28 |
Correct |
503 ms |
31836 KB |
Output is correct |
29 |
Correct |
507 ms |
31876 KB |
Output is correct |
30 |
Correct |
856 ms |
30268 KB |
Output is correct |
31 |
Correct |
800 ms |
30392 KB |
Output is correct |
32 |
Correct |
1278 ms |
30524 KB |
Output is correct |
33 |
Correct |
1072 ms |
30768 KB |
Output is correct |
34 |
Correct |
1274 ms |
30288 KB |
Output is correct |
35 |
Correct |
1249 ms |
30028 KB |
Output is correct |
36 |
Correct |
1131 ms |
30716 KB |
Output is correct |
37 |
Correct |
584 ms |
30544 KB |
Output is correct |
38 |
Correct |
600 ms |
30672 KB |
Output is correct |
39 |
Correct |
563 ms |
32120 KB |
Output is correct |
40 |
Correct |
548 ms |
31624 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
382 ms |
28996 KB |
Output is correct |
3 |
Correct |
548 ms |
29008 KB |
Output is correct |
4 |
Correct |
381 ms |
28984 KB |
Output is correct |
5 |
Correct |
559 ms |
29012 KB |
Output is correct |
6 |
Correct |
350 ms |
29012 KB |
Output is correct |
7 |
Correct |
599 ms |
28644 KB |
Output is correct |
8 |
Correct |
352 ms |
28996 KB |
Output is correct |
9 |
Correct |
603 ms |
28424 KB |
Output is correct |
10 |
Correct |
896 ms |
28568 KB |
Output is correct |
11 |
Correct |
1049 ms |
28392 KB |
Output is correct |
12 |
Correct |
473 ms |
29112 KB |
Output is correct |
13 |
Correct |
450 ms |
28756 KB |
Output is correct |
14 |
Correct |
401 ms |
29744 KB |
Output is correct |
15 |
Correct |
414 ms |
29316 KB |
Output is correct |
16 |
Correct |
0 ms |
344 KB |
Output is correct |
17 |
Correct |
1153 ms |
29264 KB |
Output is correct |
18 |
Correct |
1106 ms |
31020 KB |
Output is correct |
19 |
Correct |
1181 ms |
29292 KB |
Output is correct |
20 |
Correct |
1004 ms |
30744 KB |
Output is correct |
21 |
Correct |
1095 ms |
29524 KB |
Output is correct |
22 |
Correct |
1145 ms |
31112 KB |
Output is correct |
23 |
Correct |
1238 ms |
29272 KB |
Output is correct |
24 |
Correct |
1082 ms |
30972 KB |
Output is correct |
25 |
Correct |
1184 ms |
29268 KB |
Output is correct |
26 |
Correct |
655 ms |
29832 KB |
Output is correct |
27 |
Correct |
727 ms |
29788 KB |
Output is correct |
28 |
Correct |
1008 ms |
30064 KB |
Output is correct |
29 |
Correct |
694 ms |
30000 KB |
Output is correct |
30 |
Correct |
733 ms |
30032 KB |
Output is correct |
31 |
Correct |
1172 ms |
30328 KB |
Output is correct |
32 |
Correct |
1605 ms |
30368 KB |
Output is correct |
33 |
Correct |
1371 ms |
28484 KB |
Output is correct |
34 |
Correct |
1433 ms |
30636 KB |
Output is correct |
35 |
Correct |
1175 ms |
28400 KB |
Output is correct |
36 |
Correct |
1552 ms |
30416 KB |
Output is correct |
37 |
Correct |
900 ms |
30160 KB |
Output is correct |
38 |
Correct |
781 ms |
30052 KB |
Output is correct |
39 |
Correct |
755 ms |
30280 KB |
Output is correct |
40 |
Correct |
588 ms |
30048 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
3 ms |
348 KB |
Output is correct |
6 |
Correct |
2 ms |
348 KB |
Output is correct |
7 |
Correct |
3 ms |
348 KB |
Output is correct |
8 |
Correct |
4 ms |
348 KB |
Output is correct |
9 |
Correct |
2 ms |
348 KB |
Output is correct |
10 |
Correct |
3 ms |
348 KB |
Output is correct |
11 |
Correct |
2 ms |
348 KB |
Output is correct |
12 |
Correct |
3 ms |
604 KB |
Output is correct |
13 |
Correct |
3 ms |
604 KB |
Output is correct |
14 |
Correct |
3 ms |
348 KB |
Output is correct |
15 |
Correct |
4 ms |
604 KB |
Output is correct |
16 |
Correct |
4 ms |
424 KB |
Output is correct |
17 |
Correct |
3 ms |
604 KB |
Output is correct |
18 |
Correct |
2 ms |
600 KB |
Output is correct |
19 |
Correct |
2 ms |
604 KB |
Output is correct |
20 |
Correct |
2 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
382 ms |
28996 KB |
Output is correct |
23 |
Correct |
548 ms |
29008 KB |
Output is correct |
24 |
Correct |
381 ms |
28984 KB |
Output is correct |
25 |
Correct |
559 ms |
29012 KB |
Output is correct |
26 |
Correct |
350 ms |
29012 KB |
Output is correct |
27 |
Correct |
599 ms |
28644 KB |
Output is correct |
28 |
Correct |
352 ms |
28996 KB |
Output is correct |
29 |
Correct |
603 ms |
28424 KB |
Output is correct |
30 |
Correct |
896 ms |
28568 KB |
Output is correct |
31 |
Correct |
1049 ms |
28392 KB |
Output is correct |
32 |
Correct |
473 ms |
29112 KB |
Output is correct |
33 |
Correct |
450 ms |
28756 KB |
Output is correct |
34 |
Correct |
401 ms |
29744 KB |
Output is correct |
35 |
Correct |
414 ms |
29316 KB |
Output is correct |
36 |
Correct |
390 ms |
28944 KB |
Output is correct |
37 |
Correct |
563 ms |
29524 KB |
Output is correct |
38 |
Correct |
552 ms |
28976 KB |
Output is correct |
39 |
Correct |
393 ms |
29012 KB |
Output is correct |
40 |
Correct |
540 ms |
29268 KB |
Output is correct |
41 |
Correct |
366 ms |
29008 KB |
Output is correct |
42 |
Correct |
369 ms |
29312 KB |
Output is correct |
43 |
Correct |
580 ms |
28496 KB |
Output is correct |
44 |
Correct |
543 ms |
28384 KB |
Output is correct |
45 |
Correct |
937 ms |
28396 KB |
Output is correct |
46 |
Correct |
916 ms |
28392 KB |
Output is correct |
47 |
Correct |
1050 ms |
28392 KB |
Output is correct |
48 |
Correct |
455 ms |
28796 KB |
Output is correct |
49 |
Correct |
422 ms |
28808 KB |
Output is correct |
50 |
Correct |
406 ms |
29564 KB |
Output is correct |
51 |
Correct |
412 ms |
29268 KB |
Output is correct |
52 |
Correct |
410 ms |
29520 KB |
Output is correct |
53 |
Correct |
0 ms |
348 KB |
Output is correct |
54 |
Correct |
759 ms |
29656 KB |
Output is correct |
55 |
Correct |
564 ms |
31704 KB |
Output is correct |
56 |
Correct |
774 ms |
31424 KB |
Output is correct |
57 |
Correct |
782 ms |
31208 KB |
Output is correct |
58 |
Correct |
759 ms |
31204 KB |
Output is correct |
59 |
Correct |
557 ms |
31356 KB |
Output is correct |
60 |
Correct |
748 ms |
31064 KB |
Output is correct |
61 |
Correct |
783 ms |
31008 KB |
Output is correct |
62 |
Correct |
747 ms |
31212 KB |
Output is correct |
63 |
Correct |
768 ms |
31556 KB |
Output is correct |
64 |
Correct |
508 ms |
31804 KB |
Output is correct |
65 |
Correct |
503 ms |
31836 KB |
Output is correct |
66 |
Correct |
507 ms |
31876 KB |
Output is correct |
67 |
Correct |
856 ms |
30268 KB |
Output is correct |
68 |
Correct |
800 ms |
30392 KB |
Output is correct |
69 |
Correct |
1278 ms |
30524 KB |
Output is correct |
70 |
Correct |
1072 ms |
30768 KB |
Output is correct |
71 |
Correct |
1274 ms |
30288 KB |
Output is correct |
72 |
Correct |
1249 ms |
30028 KB |
Output is correct |
73 |
Correct |
1131 ms |
30716 KB |
Output is correct |
74 |
Correct |
584 ms |
30544 KB |
Output is correct |
75 |
Correct |
600 ms |
30672 KB |
Output is correct |
76 |
Correct |
563 ms |
32120 KB |
Output is correct |
77 |
Correct |
548 ms |
31624 KB |
Output is correct |
78 |
Correct |
0 ms |
344 KB |
Output is correct |
79 |
Correct |
1153 ms |
29264 KB |
Output is correct |
80 |
Correct |
1106 ms |
31020 KB |
Output is correct |
81 |
Correct |
1181 ms |
29292 KB |
Output is correct |
82 |
Correct |
1004 ms |
30744 KB |
Output is correct |
83 |
Correct |
1095 ms |
29524 KB |
Output is correct |
84 |
Correct |
1145 ms |
31112 KB |
Output is correct |
85 |
Correct |
1238 ms |
29272 KB |
Output is correct |
86 |
Correct |
1082 ms |
30972 KB |
Output is correct |
87 |
Correct |
1184 ms |
29268 KB |
Output is correct |
88 |
Correct |
655 ms |
29832 KB |
Output is correct |
89 |
Correct |
727 ms |
29788 KB |
Output is correct |
90 |
Correct |
1008 ms |
30064 KB |
Output is correct |
91 |
Correct |
694 ms |
30000 KB |
Output is correct |
92 |
Correct |
733 ms |
30032 KB |
Output is correct |
93 |
Correct |
1172 ms |
30328 KB |
Output is correct |
94 |
Correct |
1605 ms |
30368 KB |
Output is correct |
95 |
Correct |
1371 ms |
28484 KB |
Output is correct |
96 |
Correct |
1433 ms |
30636 KB |
Output is correct |
97 |
Correct |
1175 ms |
28400 KB |
Output is correct |
98 |
Correct |
1552 ms |
30416 KB |
Output is correct |
99 |
Correct |
900 ms |
30160 KB |
Output is correct |
100 |
Correct |
781 ms |
30052 KB |
Output is correct |
101 |
Correct |
755 ms |
30280 KB |
Output is correct |
102 |
Correct |
588 ms |
30048 KB |
Output is correct |
103 |
Correct |
1420 ms |
30248 KB |
Output is correct |
104 |
Correct |
967 ms |
33548 KB |
Output is correct |
105 |
Correct |
832 ms |
31200 KB |
Output is correct |
106 |
Correct |
826 ms |
31824 KB |
Output is correct |
107 |
Correct |
1219 ms |
30372 KB |
Output is correct |
108 |
Correct |
984 ms |
33472 KB |
Output is correct |
109 |
Correct |
941 ms |
30772 KB |
Output is correct |
110 |
Correct |
964 ms |
32632 KB |
Output is correct |
111 |
Correct |
873 ms |
31112 KB |
Output is correct |
112 |
Correct |
961 ms |
31712 KB |
Output is correct |
113 |
Correct |
771 ms |
32420 KB |
Output is correct |
114 |
Correct |
586 ms |
31876 KB |
Output is correct |
115 |
Correct |
1207 ms |
32004 KB |
Output is correct |
116 |
Correct |
987 ms |
31468 KB |
Output is correct |
117 |
Correct |
624 ms |
31956 KB |
Output is correct |
118 |
Correct |
901 ms |
30824 KB |
Output is correct |
119 |
Correct |
824 ms |
32404 KB |
Output is correct |
120 |
Correct |
1205 ms |
31728 KB |
Output is correct |
121 |
Correct |
1025 ms |
31272 KB |
Output is correct |
122 |
Correct |
1795 ms |
32524 KB |
Output is correct |
123 |
Correct |
1467 ms |
30016 KB |
Output is correct |
124 |
Correct |
1552 ms |
31180 KB |
Output is correct |
125 |
Correct |
1415 ms |
30128 KB |
Output is correct |
126 |
Correct |
1494 ms |
30848 KB |
Output is correct |
127 |
Correct |
987 ms |
31524 KB |
Output is correct |
128 |
Correct |
669 ms |
30972 KB |
Output is correct |
129 |
Correct |
850 ms |
32628 KB |
Output is correct |
130 |
Correct |
638 ms |
31828 KB |
Output is correct |