# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1013690 |
2024-07-03T20:45:32 Z |
ttamx |
Fish 2 (JOI22_fish2) |
C++17 |
|
1399 ms |
192620 KB |
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
const int N=1e5+5;
const int K=1<<18;
const int INF=INT_MAX/2;
const ll LINF=LLONG_MAX/2;
int n,q;
ll a[N];
struct Fenwick{
ll t[N];
void update(int i,ll v){
for(;i<N;i+=i&-i)t[i]+=v;
}
ll query(int i){
ll res=0;
for(;i>0;i-=i&-i)res+=t[i];
return res;
}
ll query(int l,int r){
return query(r)-query(l-1);
}
}fw;
template<class T,class E,T (*tt)(T,T),E (*ee)(E,E),T (*te)(T,E),T (*tu)(),E (*eu)()>
struct LazySegTree{
int n;
T t[K];
E lz[K];
void apply(int i,E v){
t[i]=te(t[i],v);
lz[i]=ee(lz[i],v);
}
void push(int i){
apply(i*2,lz[i]);
apply(i*2+1,lz[i]);
lz[i]=eu();
}
void pull(int i){
t[i]=tt(t[i*2],t[i*2+1]);
}
template<class F>
void build(int l,int r,int i,F f){
if(l==r){
t[i]=f();
lz[i]=eu();
return;
}
int m=(l+r)/2;
build(l,m,i*2,f);
build(m+1,r,i*2+1,f);
pull(i);
}
template<class F>
void build(int _n,F f){
n=_n;
build(1,n,1,f);
}
void build(int _n){
build(_n,[](){return tu();});
}
void modify(int l,int r,int i,int x,T v){
if(r<x||x<l)return;
if(l==r)return void(t[i]=v);
push(i);
int m=(l+r)/2;
modify(l,m,i*2,x,v);
modify(m+1,r,i*2+1,x,v);
pull(i);
}
void modify(int x,T v){
modify(1,n,1,x,v);
}
void update(int l,int r,int i,int x,int y,E v){
if(y<l||r<x)return;
if(x<=l&&r<=y)return apply(i,v);
push(i);
int m=(l+r)/2;
update(l,m,i*2,x,y,v);
update(m+1,r,i*2+1,x,y,v);
pull(i);
}
void update(int l,int r,E v){
update(1,n,1,l,r,v);
}
T query(int l,int r,int i,int x,int y){
if(y<l||r<x)return tu();
if(x<=l&&r<=y)return t[i];
push(i);
int m=(l+r)/2;
return tt(query(l,m,i*2,x,y),query(m+1,r,i*2+1,x,y));
}
T query(int l,int r){
return query(1,n,1,l,r);
}
template<class F>
int find_first(int l,int r,int i,int x,int y,F f){
if(y<l||r<x||!f(t[i]))return n+1;
if(l==r)return l;
push(i);
int m=(l+r)/2;
int res=find_first(l,m,i*2,x,y,f);
if(res!=n+1)return res;
return find_first(m+1,r,i*2+1,x,y,f);
}
template<class F>
int find_first(int l,int r,F f){
return find_first(1,n,1,l,r,f);
}
template<class F>
int find_last(int l,int r,int i,int x,int y,F f){
if(y<l||r<x||!f(t[i]))return 0;
if(l==r)return l;
push(i);
int m=(l+r)/2;
int res=find_last(m+1,r,i*2+1,x,y,f);
if(res!=0)return res;
return find_last(l,m,i*2,x,y,f);
}
template<class F>
int find_last(int l,int r,F f){
return find_last(1,n,1,l,r,f);
}
};
struct Info{
int mn,cnt;
Info():mn(INF),cnt(0){}
Info(int _mn,int _cnt):mn(_mn),cnt(_cnt){}
};
namespace S1{
Info merge_info(Info a,Info b){
if(a.mn<b.mn)return a;
if(b.mn<a.mn)return b;
return Info(a.mn,a.cnt+b.cnt);
}
int merge_tag(int a,int b){return a+b;}
Info apply(Info a,int b){return Info(a.mn+b,a.cnt);}
Info unit_info(){return Info();}
int unit_tag(){return 0;}
LazySegTree<Info,int,merge_info,merge_tag,apply,unit_info,unit_tag> seg;
};
using S1::seg;
namespace S2{
ll merge_info(ll a,ll b){return max(a,b);}
ll merge_tag(ll a,ll b){return a+b;}
ll apply(ll a,ll b){return a+b;}
ll unit_info(){return -LINF;}
ll unit_tag(){return 0;}
LazySegTree<ll,ll,merge_info,merge_tag,apply,unit_info,unit_tag> seg_l,seg_r;
};
using S2::seg_l,S2::seg_r;
struct Interval{
int l,r;
Interval(){}
Interval(int _l,int _r):l(_l),r(_r){}
bool contains(int x){return l<=x&&x<=r;}
};
struct IntervalTree{
stack<Interval> t[K];
void update(int l,int r,int i,Interval v){
int m=(l+r)/2;
if(l==r||(v.contains(m)&&v.contains(m+1)))return void(t[i].emplace(v));
if(v.r<=m)update(l,m,i*2,v);
else update(m+1,r,i*2+1,v);
}
void update(Interval v){
update(1,n,1,v);
}
void query(int l,int r,int i,int x,vector<Interval> &res){
while(!t[i].empty()&&t[i].top().contains(x)){
res.emplace_back(t[i].top());
t[i].pop();
}
if(l==r)return;
int m=(l+r)/2;
if(x<=m)query(l,m,i*2,x,res);
else query(m+1,r,i*2+1,x,res);
}
vector<Interval> query(int x){
vector<Interval> res;
query(1,n,1,x,res);
return res;
}
}ranges;
bool valid(int l,int r){
if(l>r)return false;
ll sum=fw.query(l,r);
return sum<a[l-1]&&sum<a[r+1];
}
vector<Interval> find_ranges(int i){
vector<Interval> res;
vector<int> left{i+1},right{i-1};
ll sum_l=fw.query(i),sum_r=fw.query(i-1);
for(int l=i;l>=1;l=seg_l.find_last(1,l-1,[&](ll x){return x>sum_r;}))left.emplace_back(l);
for(int r=i;r<=n;r=seg_r.find_first(r+1,n,[&](ll x){return x>-sum_l;}))right.emplace_back(r);
for(int l:left)for(int r:right)if(valid(l,r))res.emplace_back(l-1,r+1);
return res;
}
void update(int i,int v){
for(auto [l,r]:ranges.query(i)){
// cerr << "erase " << l << " " << r << "\n";
seg.update(l+1,r-1,-1);
// for(int i=1;i<=n;i++)cerr << seg.query(i,i).mn << " \n"[i==n];
}
int dif=v-a[i];
a[i]=v;
fw.update(i,dif);
seg_l.update(i+1,n,dif);
seg_r.update(i,n,-dif);
// cerr << i+1 << " -> " << a[i]+fw.query(i-1) << "\n";
// cerr << i-1 << " -> " << a[i]-fw.query(i) << "\n";
// cerr << fw.query(i) << "\n";
seg_l.modify(i+1,a[i]+fw.query(i));
seg_r.modify(i-1,a[i]-fw.query(i-1));
for(auto [l,r]:find_ranges(i)){
// cerr << "insert " << l << " " << r << "\n";
seg.update(l+1,r-1,1);
// for(int i=1;i<=n;i++)cerr << seg.query(i,i).mn << " \n"[i==n];
ranges.update(Interval(l,r));
}
// cerr << "------\n";
}
void init(){
for(int i=1;i<=n;i++){
a[i]=1;
fw.update(i,1);
}
a[0]=a[n+1]=LINF;
seg.build(n,[]{return Info(1,1);});
seg_l.build(n);
seg_r.build(n);
ranges.update(Interval(0,n+1));
for(int i=1;i<=n;i++){
seg_l.modify(i,a[i-1]+i-1);
seg_r.modify(i,a[i+1]-i);
}
}
int main(){
cin.tie(nullptr)->sync_with_stdio(false);
cin >> n;
init();
// for(int i=1;i<=n;i++)cerr << seg_l.query(i,i) << " \n"[i==n];
// for(int i=1;i<=n;i++)cerr << seg_r.query(i,i) << " \n"[i==n];
// for(int i=1;i<=n;i++)cerr << seg.query(i,i).mn << " \n"[i==n];
for(int i=1;i<=n;i++){
int x;
cin >> x;
update(i,x);
}
// for(int i=1;i<=n;i++)cerr << seg_l.query(i,i) << " \n"[i==n];
// for(int i=1;i<=n;i++)cerr << seg_r.query(i,i) << " \n"[i==n];
// for(int i=1;i<=n;i++)cerr << seg.query(i,i).mn << " \n"[i==n];
cin >> q;
while(q--){
int t;
cin >> t;
if(t==1){
int x,y;
cin >> x >> y;
update(x,y);
}else{
int l,r;
cin >> l >> r;
ll sum_l=fw.query(l-1),sum_r=fw.query(r);
// cerr << sum_l << " " << sum_r << "\n";
int nl=seg_r.find_last(l,r-1,[&](ll x){return x>-sum_l;})+1;
int nr=seg_l.find_first(l+1,r,[&](ll x){return x>sum_r;})-1;
// cerr << nl << " " << nr << "\n";
nl=max(nl,l);
nr=min(nr,r);
// cerr << nl << " " << nr << "\n";
if(nl>nr)cout << 0 << "\n";
else cout << seg.query(nl,nr).cnt << "\n";
// for(int i=1;i<=n;i++)cerr << seg_l.query(i,i) << " \n"[i==n];
// for(int i=1;i<=n;i++)cerr << seg_r.query(i,i) << " \n"[i==n];
// for(int i=1;i<=n;i++)cerr << seg.query(i,i).mn << " \n"[i==n];
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
97 ms |
180876 KB |
Output is correct |
2 |
Correct |
77 ms |
181076 KB |
Output is correct |
3 |
Correct |
80 ms |
181076 KB |
Output is correct |
4 |
Correct |
76 ms |
181072 KB |
Output is correct |
5 |
Correct |
78 ms |
181072 KB |
Output is correct |
6 |
Correct |
74 ms |
180896 KB |
Output is correct |
7 |
Correct |
72 ms |
181076 KB |
Output is correct |
8 |
Correct |
106 ms |
180932 KB |
Output is correct |
9 |
Correct |
81 ms |
181004 KB |
Output is correct |
10 |
Correct |
77 ms |
181072 KB |
Output is correct |
11 |
Correct |
72 ms |
181076 KB |
Output is correct |
12 |
Correct |
74 ms |
181076 KB |
Output is correct |
13 |
Correct |
73 ms |
180920 KB |
Output is correct |
14 |
Correct |
70 ms |
181076 KB |
Output is correct |
15 |
Correct |
73 ms |
181076 KB |
Output is correct |
16 |
Correct |
77 ms |
181324 KB |
Output is correct |
17 |
Correct |
79 ms |
181072 KB |
Output is correct |
18 |
Correct |
69 ms |
181072 KB |
Output is correct |
19 |
Correct |
73 ms |
181072 KB |
Output is correct |
20 |
Correct |
75 ms |
181076 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
70 ms |
181072 KB |
Output is correct |
2 |
Correct |
286 ms |
190320 KB |
Output is correct |
3 |
Correct |
431 ms |
190032 KB |
Output is correct |
4 |
Correct |
295 ms |
190168 KB |
Output is correct |
5 |
Correct |
364 ms |
189984 KB |
Output is correct |
6 |
Correct |
365 ms |
190548 KB |
Output is correct |
7 |
Correct |
358 ms |
189780 KB |
Output is correct |
8 |
Correct |
296 ms |
190548 KB |
Output is correct |
9 |
Correct |
394 ms |
189836 KB |
Output is correct |
10 |
Correct |
538 ms |
190288 KB |
Output is correct |
11 |
Correct |
616 ms |
190056 KB |
Output is correct |
12 |
Correct |
333 ms |
189952 KB |
Output is correct |
13 |
Correct |
318 ms |
189780 KB |
Output is correct |
14 |
Correct |
365 ms |
190360 KB |
Output is correct |
15 |
Correct |
372 ms |
190208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
97 ms |
180876 KB |
Output is correct |
2 |
Correct |
77 ms |
181076 KB |
Output is correct |
3 |
Correct |
80 ms |
181076 KB |
Output is correct |
4 |
Correct |
76 ms |
181072 KB |
Output is correct |
5 |
Correct |
78 ms |
181072 KB |
Output is correct |
6 |
Correct |
74 ms |
180896 KB |
Output is correct |
7 |
Correct |
72 ms |
181076 KB |
Output is correct |
8 |
Correct |
106 ms |
180932 KB |
Output is correct |
9 |
Correct |
81 ms |
181004 KB |
Output is correct |
10 |
Correct |
77 ms |
181072 KB |
Output is correct |
11 |
Correct |
72 ms |
181076 KB |
Output is correct |
12 |
Correct |
74 ms |
181076 KB |
Output is correct |
13 |
Correct |
73 ms |
180920 KB |
Output is correct |
14 |
Correct |
70 ms |
181076 KB |
Output is correct |
15 |
Correct |
73 ms |
181076 KB |
Output is correct |
16 |
Correct |
77 ms |
181324 KB |
Output is correct |
17 |
Correct |
79 ms |
181072 KB |
Output is correct |
18 |
Correct |
69 ms |
181072 KB |
Output is correct |
19 |
Correct |
73 ms |
181072 KB |
Output is correct |
20 |
Correct |
75 ms |
181076 KB |
Output is correct |
21 |
Correct |
70 ms |
181072 KB |
Output is correct |
22 |
Correct |
286 ms |
190320 KB |
Output is correct |
23 |
Correct |
431 ms |
190032 KB |
Output is correct |
24 |
Correct |
295 ms |
190168 KB |
Output is correct |
25 |
Correct |
364 ms |
189984 KB |
Output is correct |
26 |
Correct |
365 ms |
190548 KB |
Output is correct |
27 |
Correct |
358 ms |
189780 KB |
Output is correct |
28 |
Correct |
296 ms |
190548 KB |
Output is correct |
29 |
Correct |
394 ms |
189836 KB |
Output is correct |
30 |
Correct |
538 ms |
190288 KB |
Output is correct |
31 |
Correct |
616 ms |
190056 KB |
Output is correct |
32 |
Correct |
333 ms |
189952 KB |
Output is correct |
33 |
Correct |
318 ms |
189780 KB |
Output is correct |
34 |
Correct |
365 ms |
190360 KB |
Output is correct |
35 |
Correct |
372 ms |
190208 KB |
Output is correct |
36 |
Correct |
360 ms |
190328 KB |
Output is correct |
37 |
Correct |
409 ms |
190036 KB |
Output is correct |
38 |
Correct |
383 ms |
190032 KB |
Output is correct |
39 |
Correct |
321 ms |
190288 KB |
Output is correct |
40 |
Correct |
380 ms |
190092 KB |
Output is correct |
41 |
Correct |
295 ms |
190704 KB |
Output is correct |
42 |
Correct |
340 ms |
190676 KB |
Output is correct |
43 |
Correct |
360 ms |
190056 KB |
Output is correct |
44 |
Correct |
326 ms |
189780 KB |
Output is correct |
45 |
Correct |
570 ms |
190304 KB |
Output is correct |
46 |
Correct |
552 ms |
190288 KB |
Output is correct |
47 |
Correct |
537 ms |
189852 KB |
Output is correct |
48 |
Correct |
311 ms |
189776 KB |
Output is correct |
49 |
Correct |
289 ms |
190024 KB |
Output is correct |
50 |
Correct |
328 ms |
190408 KB |
Output is correct |
51 |
Correct |
325 ms |
190292 KB |
Output is correct |
52 |
Correct |
336 ms |
190260 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
70 ms |
181072 KB |
Output is correct |
2 |
Correct |
286 ms |
190320 KB |
Output is correct |
3 |
Correct |
431 ms |
190032 KB |
Output is correct |
4 |
Correct |
295 ms |
190168 KB |
Output is correct |
5 |
Correct |
364 ms |
189984 KB |
Output is correct |
6 |
Correct |
365 ms |
190548 KB |
Output is correct |
7 |
Correct |
358 ms |
189780 KB |
Output is correct |
8 |
Correct |
296 ms |
190548 KB |
Output is correct |
9 |
Correct |
394 ms |
189836 KB |
Output is correct |
10 |
Correct |
538 ms |
190288 KB |
Output is correct |
11 |
Correct |
616 ms |
190056 KB |
Output is correct |
12 |
Correct |
333 ms |
189952 KB |
Output is correct |
13 |
Correct |
318 ms |
189780 KB |
Output is correct |
14 |
Correct |
365 ms |
190360 KB |
Output is correct |
15 |
Correct |
372 ms |
190208 KB |
Output is correct |
16 |
Correct |
64 ms |
181072 KB |
Output is correct |
17 |
Correct |
423 ms |
191788 KB |
Output is correct |
18 |
Correct |
398 ms |
192080 KB |
Output is correct |
19 |
Correct |
474 ms |
191840 KB |
Output is correct |
20 |
Correct |
424 ms |
191568 KB |
Output is correct |
21 |
Correct |
486 ms |
191768 KB |
Output is correct |
22 |
Correct |
388 ms |
192080 KB |
Output is correct |
23 |
Correct |
450 ms |
191796 KB |
Output is correct |
24 |
Correct |
448 ms |
191568 KB |
Output is correct |
25 |
Correct |
527 ms |
191784 KB |
Output is correct |
26 |
Correct |
439 ms |
191572 KB |
Output is correct |
27 |
Correct |
456 ms |
192544 KB |
Output is correct |
28 |
Correct |
398 ms |
192592 KB |
Output is correct |
29 |
Correct |
385 ms |
192592 KB |
Output is correct |
30 |
Correct |
427 ms |
191568 KB |
Output is correct |
31 |
Correct |
494 ms |
191312 KB |
Output is correct |
32 |
Correct |
589 ms |
191456 KB |
Output is correct |
33 |
Correct |
666 ms |
192060 KB |
Output is correct |
34 |
Correct |
619 ms |
191568 KB |
Output is correct |
35 |
Correct |
575 ms |
191504 KB |
Output is correct |
36 |
Correct |
672 ms |
191936 KB |
Output is correct |
37 |
Correct |
432 ms |
191380 KB |
Output is correct |
38 |
Correct |
388 ms |
191572 KB |
Output is correct |
39 |
Correct |
414 ms |
192084 KB |
Output is correct |
40 |
Correct |
418 ms |
192076 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
70 ms |
181072 KB |
Output is correct |
2 |
Correct |
286 ms |
190320 KB |
Output is correct |
3 |
Correct |
431 ms |
190032 KB |
Output is correct |
4 |
Correct |
295 ms |
190168 KB |
Output is correct |
5 |
Correct |
364 ms |
189984 KB |
Output is correct |
6 |
Correct |
365 ms |
190548 KB |
Output is correct |
7 |
Correct |
358 ms |
189780 KB |
Output is correct |
8 |
Correct |
296 ms |
190548 KB |
Output is correct |
9 |
Correct |
394 ms |
189836 KB |
Output is correct |
10 |
Correct |
538 ms |
190288 KB |
Output is correct |
11 |
Correct |
616 ms |
190056 KB |
Output is correct |
12 |
Correct |
333 ms |
189952 KB |
Output is correct |
13 |
Correct |
318 ms |
189780 KB |
Output is correct |
14 |
Correct |
365 ms |
190360 KB |
Output is correct |
15 |
Correct |
372 ms |
190208 KB |
Output is correct |
16 |
Correct |
68 ms |
181072 KB |
Output is correct |
17 |
Correct |
1273 ms |
191312 KB |
Output is correct |
18 |
Correct |
882 ms |
191780 KB |
Output is correct |
19 |
Correct |
1016 ms |
191152 KB |
Output is correct |
20 |
Correct |
770 ms |
191572 KB |
Output is correct |
21 |
Correct |
1399 ms |
191204 KB |
Output is correct |
22 |
Correct |
910 ms |
191676 KB |
Output is correct |
23 |
Correct |
1154 ms |
191156 KB |
Output is correct |
24 |
Correct |
859 ms |
191556 KB |
Output is correct |
25 |
Correct |
1111 ms |
191184 KB |
Output is correct |
26 |
Correct |
712 ms |
192340 KB |
Output is correct |
27 |
Correct |
644 ms |
192236 KB |
Output is correct |
28 |
Correct |
788 ms |
191628 KB |
Output is correct |
29 |
Correct |
596 ms |
192344 KB |
Output is correct |
30 |
Correct |
622 ms |
192588 KB |
Output is correct |
31 |
Correct |
915 ms |
191664 KB |
Output is correct |
32 |
Correct |
1098 ms |
191572 KB |
Output is correct |
33 |
Correct |
1027 ms |
191188 KB |
Output is correct |
34 |
Correct |
1097 ms |
191852 KB |
Output is correct |
35 |
Correct |
884 ms |
191572 KB |
Output is correct |
36 |
Correct |
1060 ms |
191736 KB |
Output is correct |
37 |
Correct |
708 ms |
191312 KB |
Output is correct |
38 |
Correct |
607 ms |
191280 KB |
Output is correct |
39 |
Correct |
654 ms |
192088 KB |
Output is correct |
40 |
Correct |
577 ms |
192000 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
97 ms |
180876 KB |
Output is correct |
2 |
Correct |
77 ms |
181076 KB |
Output is correct |
3 |
Correct |
80 ms |
181076 KB |
Output is correct |
4 |
Correct |
76 ms |
181072 KB |
Output is correct |
5 |
Correct |
78 ms |
181072 KB |
Output is correct |
6 |
Correct |
74 ms |
180896 KB |
Output is correct |
7 |
Correct |
72 ms |
181076 KB |
Output is correct |
8 |
Correct |
106 ms |
180932 KB |
Output is correct |
9 |
Correct |
81 ms |
181004 KB |
Output is correct |
10 |
Correct |
77 ms |
181072 KB |
Output is correct |
11 |
Correct |
72 ms |
181076 KB |
Output is correct |
12 |
Correct |
74 ms |
181076 KB |
Output is correct |
13 |
Correct |
73 ms |
180920 KB |
Output is correct |
14 |
Correct |
70 ms |
181076 KB |
Output is correct |
15 |
Correct |
73 ms |
181076 KB |
Output is correct |
16 |
Correct |
77 ms |
181324 KB |
Output is correct |
17 |
Correct |
79 ms |
181072 KB |
Output is correct |
18 |
Correct |
69 ms |
181072 KB |
Output is correct |
19 |
Correct |
73 ms |
181072 KB |
Output is correct |
20 |
Correct |
75 ms |
181076 KB |
Output is correct |
21 |
Correct |
70 ms |
181072 KB |
Output is correct |
22 |
Correct |
286 ms |
190320 KB |
Output is correct |
23 |
Correct |
431 ms |
190032 KB |
Output is correct |
24 |
Correct |
295 ms |
190168 KB |
Output is correct |
25 |
Correct |
364 ms |
189984 KB |
Output is correct |
26 |
Correct |
365 ms |
190548 KB |
Output is correct |
27 |
Correct |
358 ms |
189780 KB |
Output is correct |
28 |
Correct |
296 ms |
190548 KB |
Output is correct |
29 |
Correct |
394 ms |
189836 KB |
Output is correct |
30 |
Correct |
538 ms |
190288 KB |
Output is correct |
31 |
Correct |
616 ms |
190056 KB |
Output is correct |
32 |
Correct |
333 ms |
189952 KB |
Output is correct |
33 |
Correct |
318 ms |
189780 KB |
Output is correct |
34 |
Correct |
365 ms |
190360 KB |
Output is correct |
35 |
Correct |
372 ms |
190208 KB |
Output is correct |
36 |
Correct |
360 ms |
190328 KB |
Output is correct |
37 |
Correct |
409 ms |
190036 KB |
Output is correct |
38 |
Correct |
383 ms |
190032 KB |
Output is correct |
39 |
Correct |
321 ms |
190288 KB |
Output is correct |
40 |
Correct |
380 ms |
190092 KB |
Output is correct |
41 |
Correct |
295 ms |
190704 KB |
Output is correct |
42 |
Correct |
340 ms |
190676 KB |
Output is correct |
43 |
Correct |
360 ms |
190056 KB |
Output is correct |
44 |
Correct |
326 ms |
189780 KB |
Output is correct |
45 |
Correct |
570 ms |
190304 KB |
Output is correct |
46 |
Correct |
552 ms |
190288 KB |
Output is correct |
47 |
Correct |
537 ms |
189852 KB |
Output is correct |
48 |
Correct |
311 ms |
189776 KB |
Output is correct |
49 |
Correct |
289 ms |
190024 KB |
Output is correct |
50 |
Correct |
328 ms |
190408 KB |
Output is correct |
51 |
Correct |
325 ms |
190292 KB |
Output is correct |
52 |
Correct |
336 ms |
190260 KB |
Output is correct |
53 |
Correct |
64 ms |
181072 KB |
Output is correct |
54 |
Correct |
423 ms |
191788 KB |
Output is correct |
55 |
Correct |
398 ms |
192080 KB |
Output is correct |
56 |
Correct |
474 ms |
191840 KB |
Output is correct |
57 |
Correct |
424 ms |
191568 KB |
Output is correct |
58 |
Correct |
486 ms |
191768 KB |
Output is correct |
59 |
Correct |
388 ms |
192080 KB |
Output is correct |
60 |
Correct |
450 ms |
191796 KB |
Output is correct |
61 |
Correct |
448 ms |
191568 KB |
Output is correct |
62 |
Correct |
527 ms |
191784 KB |
Output is correct |
63 |
Correct |
439 ms |
191572 KB |
Output is correct |
64 |
Correct |
456 ms |
192544 KB |
Output is correct |
65 |
Correct |
398 ms |
192592 KB |
Output is correct |
66 |
Correct |
385 ms |
192592 KB |
Output is correct |
67 |
Correct |
427 ms |
191568 KB |
Output is correct |
68 |
Correct |
494 ms |
191312 KB |
Output is correct |
69 |
Correct |
589 ms |
191456 KB |
Output is correct |
70 |
Correct |
666 ms |
192060 KB |
Output is correct |
71 |
Correct |
619 ms |
191568 KB |
Output is correct |
72 |
Correct |
575 ms |
191504 KB |
Output is correct |
73 |
Correct |
672 ms |
191936 KB |
Output is correct |
74 |
Correct |
432 ms |
191380 KB |
Output is correct |
75 |
Correct |
388 ms |
191572 KB |
Output is correct |
76 |
Correct |
414 ms |
192084 KB |
Output is correct |
77 |
Correct |
418 ms |
192076 KB |
Output is correct |
78 |
Correct |
68 ms |
181072 KB |
Output is correct |
79 |
Correct |
1273 ms |
191312 KB |
Output is correct |
80 |
Correct |
882 ms |
191780 KB |
Output is correct |
81 |
Correct |
1016 ms |
191152 KB |
Output is correct |
82 |
Correct |
770 ms |
191572 KB |
Output is correct |
83 |
Correct |
1399 ms |
191204 KB |
Output is correct |
84 |
Correct |
910 ms |
191676 KB |
Output is correct |
85 |
Correct |
1154 ms |
191156 KB |
Output is correct |
86 |
Correct |
859 ms |
191556 KB |
Output is correct |
87 |
Correct |
1111 ms |
191184 KB |
Output is correct |
88 |
Correct |
712 ms |
192340 KB |
Output is correct |
89 |
Correct |
644 ms |
192236 KB |
Output is correct |
90 |
Correct |
788 ms |
191628 KB |
Output is correct |
91 |
Correct |
596 ms |
192344 KB |
Output is correct |
92 |
Correct |
622 ms |
192588 KB |
Output is correct |
93 |
Correct |
915 ms |
191664 KB |
Output is correct |
94 |
Correct |
1098 ms |
191572 KB |
Output is correct |
95 |
Correct |
1027 ms |
191188 KB |
Output is correct |
96 |
Correct |
1097 ms |
191852 KB |
Output is correct |
97 |
Correct |
884 ms |
191572 KB |
Output is correct |
98 |
Correct |
1060 ms |
191736 KB |
Output is correct |
99 |
Correct |
708 ms |
191312 KB |
Output is correct |
100 |
Correct |
607 ms |
191280 KB |
Output is correct |
101 |
Correct |
654 ms |
192088 KB |
Output is correct |
102 |
Correct |
577 ms |
192000 KB |
Output is correct |
103 |
Correct |
1154 ms |
191060 KB |
Output is correct |
104 |
Correct |
817 ms |
191876 KB |
Output is correct |
105 |
Correct |
642 ms |
191576 KB |
Output is correct |
106 |
Correct |
554 ms |
191680 KB |
Output is correct |
107 |
Correct |
1211 ms |
191056 KB |
Output is correct |
108 |
Correct |
846 ms |
192084 KB |
Output is correct |
109 |
Correct |
749 ms |
191668 KB |
Output is correct |
110 |
Correct |
679 ms |
191828 KB |
Output is correct |
111 |
Correct |
586 ms |
191588 KB |
Output is correct |
112 |
Correct |
583 ms |
191828 KB |
Output is correct |
113 |
Correct |
598 ms |
192620 KB |
Output is correct |
114 |
Correct |
440 ms |
192600 KB |
Output is correct |
115 |
Correct |
762 ms |
191572 KB |
Output is correct |
116 |
Correct |
635 ms |
191568 KB |
Output is correct |
117 |
Correct |
484 ms |
192364 KB |
Output is correct |
118 |
Correct |
500 ms |
191572 KB |
Output is correct |
119 |
Correct |
593 ms |
192336 KB |
Output is correct |
120 |
Correct |
773 ms |
191592 KB |
Output is correct |
121 |
Correct |
664 ms |
191708 KB |
Output is correct |
122 |
Correct |
1022 ms |
191568 KB |
Output is correct |
123 |
Correct |
813 ms |
191312 KB |
Output is correct |
124 |
Correct |
795 ms |
191736 KB |
Output is correct |
125 |
Correct |
704 ms |
191528 KB |
Output is correct |
126 |
Correct |
753 ms |
191780 KB |
Output is correct |
127 |
Correct |
704 ms |
191412 KB |
Output is correct |
128 |
Correct |
429 ms |
191572 KB |
Output is correct |
129 |
Correct |
600 ms |
192232 KB |
Output is correct |
130 |
Correct |
550 ms |
192084 KB |
Output is correct |