# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1062104 |
2024-08-16T19:04:46 Z |
new_acc |
Fish 2 (JOI22_fish2) |
C++14 |
|
919 ms |
9812 KB |
#include<bits/stdc++.h>
#define fi first
#define se second
#define pitem item*
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vl;
const int N=1e5+10;
const int SS=1<<17;
const int INFi=2e9;
const ll INFl=1e16;
const ll mod2=998244353;
const ll mod=1e9+7;
const ll mod3=2027865967;
const ll p=70032301;
const ull p2=913;
const int L=20;
int t[N],n,q,seg[SS*2+10],lazy[SS*2+10],il[SS*2+10],seg3[SS*2+10];
ll seg2[SS*2+10];
vi prz;
bool deb;
void push(int v){
seg[v*2]+=lazy[v],seg[v*2+1]+=lazy[v];
lazy[v*2]+=lazy[v],lazy[v*2+1]+=lazy[v];
lazy[v]=0;
}
void upd(int a,int b,int x,int p=0,int k=SS-1,int v=1){
if(k<a or p>b) return;
if(p>=a and k<=b){
seg[v]+=x;
lazy[v]+=x;
return;
}
push(v);
int sr=(p+k)/2;
upd(a,b,x,p,sr,v*2);
upd(a,b,x,sr+1,k,v*2+1);
if(seg[v*2]<=seg[v*2+1]){
seg[v]=seg[v*2];
il[v]=il[v*2];
}else il[v]=0;
if(seg[v*2+1]<=seg[v*2]){
seg[v]=seg[v*2+1];
il[v]+=il[v*2+1];
}
}
pair<int,int> Query(int a,int b,int p=0,int k=SS-1,int v=1){
if(p>b or k<a) return {INFi,0};
if(p>=a and k<=b) return {seg[v],il[v]};
int sr=(p+k)/2;
pair<int,int> x1=Query(a,b,p,sr,v*2);
pair<int,int> x2=Query(a,b,sr+1,k,v*2+1);
if(x1.fi>x2.fi) swap(x1,x2);
if(x2.fi==x1.fi) x1.se+=x2.se;
x1.fi+=lazy[v];
return x1;
}
void upd2(int a,int b){
for(a+=SS;a>0;a/=2) seg2[a]+=b;
}
ll Query2(int a,int b){
ll res=0;
for(a+=SS-1,b+=SS+1;a/2!=b/2;a/=2,b/=2){
if(a%2==0) res+=seg2[a+1];
if(b%2) res+=seg2[b-1];
}
return res;
}
void upd3(int a,int b){
for(seg3[a+=SS]=b,a/=2;a>0;a/=2){
seg3[a]=max(seg3[a*2],seg3[a*2+1]);
}
}
void uzu(int v){
if(v>=SS){
il[v]=1;
if(v-SS>0 and v-SS<=n){
seg3[v]=t[v-SS];
seg2[v]=t[v-SS];
}
return;
}
uzu(v*2),uzu(v*2+1);
il[v]=il[v*2]+il[v*2+1];
seg2[v]=seg2[v*2]+seg2[v*2+1];
seg3[v]=max(seg3[v*2],seg3[v*2+1]);
}
int prawy(int v,int x){
if(v>=SS) return v-SS;
if(seg3[v*2+1]>=x){
return prawy(v*2+1,x);
}return prawy(v*2,x);
}
int lewy(int v,int x){
if(v>=SS) return v-SS;
if(seg3[v*2]>=x){
return lewy(v*2,x);
}return lewy(v*2+1,x);
}
int findr(int a,ll x){
int b=SS-1;
int g1=0,g2=0;
for(a+=SS-1,b+=SS+1;a/2!=b/2;a/=2,b/=2){
if(a%2==0){
if(seg3[a+1]>=x){
g1=a+1;
break;
}
}
if(b%2==1){
if(seg3[b-1]>=x){
g2=b-1;
}
}
}
if(g1) return lewy(g1,x);
if(g2) return lewy(g2,x);
return -1;
}
int findl(int a,ll x){
int b=a;
a=0;
int res=-1;
int g1=0,g2=0;
for(a+=SS-1,b+=SS+1;a/2!=b/2;a/=2,b/=2){
if(a%2==0){
if(seg3[a+1]>=x){
g1=a+1;
}
}
if(b%2==1){
if(seg3[b-1]>=x){
g2=b-1;
break;
}
}
}
if(g2) return prawy(g2,x);
if(g1) return prawy(g1,x);
return -1;
}
vi prawo(int a){
vi res;
res.push_back(a);
ll curr=t[a];
while(1){
int xd=findr(a+1,curr);
if(xd==-1) break;
curr+=Query2(a+1,xd);
if(t[xd]>curr-t[xd])
res.push_back(xd);
a=xd;
}
return res;
}
vi lewo(int a){
vi res;
res.push_back(a);
ll curr=t[a];
while(1){
int xd=findl(a-1,curr);
if(xd==-1) break;
curr+=Query2(xd,a-1);
if(t[xd]>curr-t[xd])
res.push_back(xd);
a=xd;
}
return res;
}
bool check(int a,int b){
if(b-a<=1) return 0;
ll xd=Query2(a+1,b-1);
return (t[a]>xd and t[b]>xd);
}
void dod(int a,int b,int x){
vi l;
l.push_back(a);
vi r;
r.push_back(b);
if(b!=n){
vi xdd=prawo(b+1);
for(auto u:xdd) r.push_back(u);
}
if(a!=1){
vi xdd=lewo(a-1);
for(auto u:xdd) l.push_back(u);
}
vl kol;
kol.push_back(0);
for(int i=1;i<r.size();i++){
kol.push_back(Query2(r[i-1],r[i]-1));
}
ll curr=Query2(a+1,b-1);
for(int i=0;i<l.size();i++){
ll curr2=0;
for(int i2=0;i2<r.size();i2++){
curr2+=kol[i2];
if(a==b and i==0 and i2==1){
curr2-=t[a];
}
if(r[i2]-l[i]>1 and t[r[i2]]>curr+curr2 and t[l[i]]>curr+curr2){
upd(l[i]+1,r[i2]-1,x);
}
}
if(i!=l.size()-1){
curr+=Query2(l[i+1]+1,l[i]);
}
if(a==b and i==0) curr-=t[a];
}
}
void zm(int a,int b){
dod(a,a,-1);
upd2(a,b-t[a]);
t[a]=b;
upd3(a,t[a]);
//deb=1;
dod(a,a,1);
}
int ans(int a,int b){
int a2=a,b2=b;
int res=0;
if(a>1 and b<n){
dod(a-1,b+1,-1);
}
vi r=prawo(a);
for(int i=r.size()-1;i>=0;i--){
if(r[i]-a<1) continue;
ll sum=Query2(a,r[i]-1);
if(t[r[i]]>sum and r[i]<=b){
a=r[i];
break;
}
}
vi l=lewo(b);
for(int i=l.size()-1;i>=0;i--){
if(b-l[i]<1) continue;
ll sum=Query2(l[i]+1,b);
if(t[l[i]]>sum and l[i]>=a){
b=l[i];
break;
}
}
if(a<=b){
pair<int,int> xd=Query(a,b);
if(xd.fi==0) res+=xd.se;
}
if(a2>1 and b2<n){
dod(a2-1,b2+1,1);
}
return res;
}
int wint(){
bool m=0;
int res=0;
char c;
c=getchar();
while(1){
if(c=='-'){
m=1;
break;
}
if(int(c)-48>=0 and int(c)-48<=9){
res+=int(c)-48;
break;
}
c=getchar();
}
while(1){
c=getchar();
if(int(c)-48<0 or int(c)-48>9) break;
res=res*10+int(c)-48;
}
if(m) return -res;
return res;
}
void solve(){
//cin>>n;
n=wint();
for(int i=1;i<=n;i++){
//cin>>t[i];
t[i]=wint();
}
uzu(1);
for(int i=1;i<=n-1;i++){
vi pr=prawo(i+1);
for(int i2=1;i2<pr.size();i2++){
if(check(i,pr[i2])){
upd(i+1,pr[i2]-1,1);
}
}
}
//cin>>q;
q=wint();
for(int i=1;i<=q;i++){
int xd;
//cin>>xd;
int a,b;
xd=wint();
a=wint(),b=wint();
if(xd==1){
zm(a,b);
}else{
cout<<ans(a,b)<<"\n";
}
}
}
int main(){
int tt=1;
while(tt--) solve();
}
Compilation message
fish2.cpp: In function 'int findl(int, ll)':
fish2.cpp:125:9: warning: unused variable 'res' [-Wunused-variable]
125 | int res=-1;
| ^~~
fish2.cpp: In function 'void dod(int, int, int)':
fish2.cpp:192:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
192 | for(int i=1;i<r.size();i++){
| ~^~~~~~~~~
fish2.cpp:196:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
196 | for(int i=0;i<l.size();i++){
| ~^~~~~~~~~
fish2.cpp:198:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
198 | for(int i2=0;i2<r.size();i2++){
| ~~^~~~~~~~~
fish2.cpp:207:13: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
207 | if(i!=l.size()-1){
| ~^~~~~~~~~~~~
fish2.cpp: In function 'void solve()':
fish2.cpp:288:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
288 | for(int i2=1;i2<pr.size();i2++){
| ~~^~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
6744 KB |
Output is correct |
2 |
Correct |
2 ms |
6716 KB |
Output is correct |
3 |
Correct |
2 ms |
6748 KB |
Output is correct |
4 |
Correct |
2 ms |
6748 KB |
Output is correct |
5 |
Correct |
4 ms |
6748 KB |
Output is correct |
6 |
Correct |
3 ms |
6748 KB |
Output is correct |
7 |
Correct |
6 ms |
6748 KB |
Output is correct |
8 |
Correct |
5 ms |
6784 KB |
Output is correct |
9 |
Correct |
4 ms |
6772 KB |
Output is correct |
10 |
Correct |
3 ms |
6748 KB |
Output is correct |
11 |
Correct |
3 ms |
6748 KB |
Output is correct |
12 |
Correct |
3 ms |
6748 KB |
Output is correct |
13 |
Correct |
3 ms |
6748 KB |
Output is correct |
14 |
Correct |
3 ms |
6748 KB |
Output is correct |
15 |
Correct |
3 ms |
6748 KB |
Output is correct |
16 |
Correct |
3 ms |
6748 KB |
Output is correct |
17 |
Correct |
3 ms |
6748 KB |
Output is correct |
18 |
Correct |
3 ms |
6596 KB |
Output is correct |
19 |
Correct |
3 ms |
6748 KB |
Output is correct |
20 |
Correct |
3 ms |
6748 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
6748 KB |
Output is correct |
2 |
Correct |
82 ms |
7516 KB |
Output is correct |
3 |
Correct |
136 ms |
7256 KB |
Output is correct |
4 |
Correct |
80 ms |
7512 KB |
Output is correct |
5 |
Correct |
134 ms |
7260 KB |
Output is correct |
6 |
Correct |
27 ms |
7720 KB |
Output is correct |
7 |
Correct |
78 ms |
7000 KB |
Output is correct |
8 |
Correct |
26 ms |
7772 KB |
Output is correct |
9 |
Correct |
74 ms |
7168 KB |
Output is correct |
10 |
Correct |
73 ms |
7368 KB |
Output is correct |
11 |
Correct |
109 ms |
7260 KB |
Output is correct |
12 |
Correct |
39 ms |
7004 KB |
Output is correct |
13 |
Correct |
53 ms |
7000 KB |
Output is correct |
14 |
Correct |
33 ms |
7516 KB |
Output is correct |
15 |
Correct |
37 ms |
7512 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
6744 KB |
Output is correct |
2 |
Correct |
2 ms |
6716 KB |
Output is correct |
3 |
Correct |
2 ms |
6748 KB |
Output is correct |
4 |
Correct |
2 ms |
6748 KB |
Output is correct |
5 |
Correct |
4 ms |
6748 KB |
Output is correct |
6 |
Correct |
3 ms |
6748 KB |
Output is correct |
7 |
Correct |
6 ms |
6748 KB |
Output is correct |
8 |
Correct |
5 ms |
6784 KB |
Output is correct |
9 |
Correct |
4 ms |
6772 KB |
Output is correct |
10 |
Correct |
3 ms |
6748 KB |
Output is correct |
11 |
Correct |
3 ms |
6748 KB |
Output is correct |
12 |
Correct |
3 ms |
6748 KB |
Output is correct |
13 |
Correct |
3 ms |
6748 KB |
Output is correct |
14 |
Correct |
3 ms |
6748 KB |
Output is correct |
15 |
Correct |
3 ms |
6748 KB |
Output is correct |
16 |
Correct |
3 ms |
6748 KB |
Output is correct |
17 |
Correct |
3 ms |
6748 KB |
Output is correct |
18 |
Correct |
3 ms |
6596 KB |
Output is correct |
19 |
Correct |
3 ms |
6748 KB |
Output is correct |
20 |
Correct |
3 ms |
6748 KB |
Output is correct |
21 |
Correct |
2 ms |
6748 KB |
Output is correct |
22 |
Correct |
82 ms |
7516 KB |
Output is correct |
23 |
Correct |
136 ms |
7256 KB |
Output is correct |
24 |
Correct |
80 ms |
7512 KB |
Output is correct |
25 |
Correct |
134 ms |
7260 KB |
Output is correct |
26 |
Correct |
27 ms |
7720 KB |
Output is correct |
27 |
Correct |
78 ms |
7000 KB |
Output is correct |
28 |
Correct |
26 ms |
7772 KB |
Output is correct |
29 |
Correct |
74 ms |
7168 KB |
Output is correct |
30 |
Correct |
73 ms |
7368 KB |
Output is correct |
31 |
Correct |
109 ms |
7260 KB |
Output is correct |
32 |
Correct |
39 ms |
7004 KB |
Output is correct |
33 |
Correct |
53 ms |
7000 KB |
Output is correct |
34 |
Correct |
33 ms |
7516 KB |
Output is correct |
35 |
Correct |
37 ms |
7512 KB |
Output is correct |
36 |
Correct |
86 ms |
7512 KB |
Output is correct |
37 |
Correct |
146 ms |
7256 KB |
Output is correct |
38 |
Correct |
140 ms |
7308 KB |
Output is correct |
39 |
Correct |
91 ms |
7516 KB |
Output is correct |
40 |
Correct |
140 ms |
7260 KB |
Output is correct |
41 |
Correct |
29 ms |
7944 KB |
Output is correct |
42 |
Correct |
32 ms |
7772 KB |
Output is correct |
43 |
Correct |
79 ms |
7004 KB |
Output is correct |
44 |
Correct |
108 ms |
7004 KB |
Output is correct |
45 |
Correct |
76 ms |
7544 KB |
Output is correct |
46 |
Correct |
73 ms |
7548 KB |
Output is correct |
47 |
Correct |
112 ms |
7256 KB |
Output is correct |
48 |
Correct |
44 ms |
7000 KB |
Output is correct |
49 |
Correct |
50 ms |
7004 KB |
Output is correct |
50 |
Correct |
35 ms |
7516 KB |
Output is correct |
51 |
Correct |
38 ms |
7512 KB |
Output is correct |
52 |
Correct |
34 ms |
7516 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
6748 KB |
Output is correct |
2 |
Correct |
82 ms |
7516 KB |
Output is correct |
3 |
Correct |
136 ms |
7256 KB |
Output is correct |
4 |
Correct |
80 ms |
7512 KB |
Output is correct |
5 |
Correct |
134 ms |
7260 KB |
Output is correct |
6 |
Correct |
27 ms |
7720 KB |
Output is correct |
7 |
Correct |
78 ms |
7000 KB |
Output is correct |
8 |
Correct |
26 ms |
7772 KB |
Output is correct |
9 |
Correct |
74 ms |
7168 KB |
Output is correct |
10 |
Correct |
73 ms |
7368 KB |
Output is correct |
11 |
Correct |
109 ms |
7260 KB |
Output is correct |
12 |
Correct |
39 ms |
7004 KB |
Output is correct |
13 |
Correct |
53 ms |
7000 KB |
Output is correct |
14 |
Correct |
33 ms |
7516 KB |
Output is correct |
15 |
Correct |
37 ms |
7512 KB |
Output is correct |
16 |
Correct |
2 ms |
6744 KB |
Output is correct |
17 |
Correct |
676 ms |
8992 KB |
Output is correct |
18 |
Correct |
413 ms |
9300 KB |
Output is correct |
19 |
Correct |
648 ms |
8788 KB |
Output is correct |
20 |
Correct |
780 ms |
8752 KB |
Output is correct |
21 |
Correct |
657 ms |
8796 KB |
Output is correct |
22 |
Correct |
410 ms |
9296 KB |
Output is correct |
23 |
Correct |
640 ms |
8992 KB |
Output is correct |
24 |
Correct |
725 ms |
8784 KB |
Output is correct |
25 |
Correct |
699 ms |
8784 KB |
Output is correct |
26 |
Correct |
743 ms |
8788 KB |
Output is correct |
27 |
Correct |
229 ms |
9812 KB |
Output is correct |
28 |
Correct |
228 ms |
9644 KB |
Output is correct |
29 |
Correct |
238 ms |
9812 KB |
Output is correct |
30 |
Correct |
736 ms |
8532 KB |
Output is correct |
31 |
Correct |
919 ms |
8532 KB |
Output is correct |
32 |
Correct |
906 ms |
8788 KB |
Output is correct |
33 |
Correct |
402 ms |
9296 KB |
Output is correct |
34 |
Correct |
896 ms |
8808 KB |
Output is correct |
35 |
Correct |
660 ms |
8852 KB |
Output is correct |
36 |
Correct |
532 ms |
9252 KB |
Output is correct |
37 |
Correct |
371 ms |
8748 KB |
Output is correct |
38 |
Correct |
330 ms |
8764 KB |
Output is correct |
39 |
Correct |
270 ms |
9296 KB |
Output is correct |
40 |
Correct |
280 ms |
9300 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
6748 KB |
Output is correct |
2 |
Correct |
82 ms |
7516 KB |
Output is correct |
3 |
Correct |
136 ms |
7256 KB |
Output is correct |
4 |
Correct |
80 ms |
7512 KB |
Output is correct |
5 |
Correct |
134 ms |
7260 KB |
Output is correct |
6 |
Correct |
27 ms |
7720 KB |
Output is correct |
7 |
Correct |
78 ms |
7000 KB |
Output is correct |
8 |
Correct |
26 ms |
7772 KB |
Output is correct |
9 |
Correct |
74 ms |
7168 KB |
Output is correct |
10 |
Correct |
73 ms |
7368 KB |
Output is correct |
11 |
Correct |
109 ms |
7260 KB |
Output is correct |
12 |
Correct |
39 ms |
7004 KB |
Output is correct |
13 |
Correct |
53 ms |
7000 KB |
Output is correct |
14 |
Correct |
33 ms |
7516 KB |
Output is correct |
15 |
Correct |
37 ms |
7512 KB |
Output is correct |
16 |
Correct |
2 ms |
6744 KB |
Output is correct |
17 |
Correct |
404 ms |
8528 KB |
Output is correct |
18 |
Correct |
483 ms |
9008 KB |
Output is correct |
19 |
Correct |
452 ms |
8496 KB |
Output is correct |
20 |
Correct |
423 ms |
8788 KB |
Output is correct |
21 |
Correct |
587 ms |
8532 KB |
Output is correct |
22 |
Correct |
467 ms |
8996 KB |
Output is correct |
23 |
Correct |
577 ms |
8272 KB |
Output is correct |
24 |
Correct |
494 ms |
8788 KB |
Output is correct |
25 |
Correct |
524 ms |
8236 KB |
Output is correct |
26 |
Correct |
149 ms |
9552 KB |
Output is correct |
27 |
Correct |
182 ms |
9556 KB |
Output is correct |
28 |
Correct |
333 ms |
8788 KB |
Output is correct |
29 |
Correct |
166 ms |
9544 KB |
Output is correct |
30 |
Correct |
182 ms |
9648 KB |
Output is correct |
31 |
Correct |
332 ms |
8868 KB |
Output is correct |
32 |
Correct |
438 ms |
8808 KB |
Output is correct |
33 |
Correct |
347 ms |
8528 KB |
Output is correct |
34 |
Correct |
370 ms |
9044 KB |
Output is correct |
35 |
Correct |
231 ms |
8788 KB |
Output is correct |
36 |
Correct |
401 ms |
8752 KB |
Output is correct |
37 |
Correct |
320 ms |
8536 KB |
Output is correct |
38 |
Correct |
241 ms |
8532 KB |
Output is correct |
39 |
Correct |
191 ms |
9044 KB |
Output is correct |
40 |
Correct |
127 ms |
9164 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
6744 KB |
Output is correct |
2 |
Correct |
2 ms |
6716 KB |
Output is correct |
3 |
Correct |
2 ms |
6748 KB |
Output is correct |
4 |
Correct |
2 ms |
6748 KB |
Output is correct |
5 |
Correct |
4 ms |
6748 KB |
Output is correct |
6 |
Correct |
3 ms |
6748 KB |
Output is correct |
7 |
Correct |
6 ms |
6748 KB |
Output is correct |
8 |
Correct |
5 ms |
6784 KB |
Output is correct |
9 |
Correct |
4 ms |
6772 KB |
Output is correct |
10 |
Correct |
3 ms |
6748 KB |
Output is correct |
11 |
Correct |
3 ms |
6748 KB |
Output is correct |
12 |
Correct |
3 ms |
6748 KB |
Output is correct |
13 |
Correct |
3 ms |
6748 KB |
Output is correct |
14 |
Correct |
3 ms |
6748 KB |
Output is correct |
15 |
Correct |
3 ms |
6748 KB |
Output is correct |
16 |
Correct |
3 ms |
6748 KB |
Output is correct |
17 |
Correct |
3 ms |
6748 KB |
Output is correct |
18 |
Correct |
3 ms |
6596 KB |
Output is correct |
19 |
Correct |
3 ms |
6748 KB |
Output is correct |
20 |
Correct |
3 ms |
6748 KB |
Output is correct |
21 |
Correct |
2 ms |
6748 KB |
Output is correct |
22 |
Correct |
82 ms |
7516 KB |
Output is correct |
23 |
Correct |
136 ms |
7256 KB |
Output is correct |
24 |
Correct |
80 ms |
7512 KB |
Output is correct |
25 |
Correct |
134 ms |
7260 KB |
Output is correct |
26 |
Correct |
27 ms |
7720 KB |
Output is correct |
27 |
Correct |
78 ms |
7000 KB |
Output is correct |
28 |
Correct |
26 ms |
7772 KB |
Output is correct |
29 |
Correct |
74 ms |
7168 KB |
Output is correct |
30 |
Correct |
73 ms |
7368 KB |
Output is correct |
31 |
Correct |
109 ms |
7260 KB |
Output is correct |
32 |
Correct |
39 ms |
7004 KB |
Output is correct |
33 |
Correct |
53 ms |
7000 KB |
Output is correct |
34 |
Correct |
33 ms |
7516 KB |
Output is correct |
35 |
Correct |
37 ms |
7512 KB |
Output is correct |
36 |
Correct |
86 ms |
7512 KB |
Output is correct |
37 |
Correct |
146 ms |
7256 KB |
Output is correct |
38 |
Correct |
140 ms |
7308 KB |
Output is correct |
39 |
Correct |
91 ms |
7516 KB |
Output is correct |
40 |
Correct |
140 ms |
7260 KB |
Output is correct |
41 |
Correct |
29 ms |
7944 KB |
Output is correct |
42 |
Correct |
32 ms |
7772 KB |
Output is correct |
43 |
Correct |
79 ms |
7004 KB |
Output is correct |
44 |
Correct |
108 ms |
7004 KB |
Output is correct |
45 |
Correct |
76 ms |
7544 KB |
Output is correct |
46 |
Correct |
73 ms |
7548 KB |
Output is correct |
47 |
Correct |
112 ms |
7256 KB |
Output is correct |
48 |
Correct |
44 ms |
7000 KB |
Output is correct |
49 |
Correct |
50 ms |
7004 KB |
Output is correct |
50 |
Correct |
35 ms |
7516 KB |
Output is correct |
51 |
Correct |
38 ms |
7512 KB |
Output is correct |
52 |
Correct |
34 ms |
7516 KB |
Output is correct |
53 |
Correct |
2 ms |
6744 KB |
Output is correct |
54 |
Correct |
676 ms |
8992 KB |
Output is correct |
55 |
Correct |
413 ms |
9300 KB |
Output is correct |
56 |
Correct |
648 ms |
8788 KB |
Output is correct |
57 |
Correct |
780 ms |
8752 KB |
Output is correct |
58 |
Correct |
657 ms |
8796 KB |
Output is correct |
59 |
Correct |
410 ms |
9296 KB |
Output is correct |
60 |
Correct |
640 ms |
8992 KB |
Output is correct |
61 |
Correct |
725 ms |
8784 KB |
Output is correct |
62 |
Correct |
699 ms |
8784 KB |
Output is correct |
63 |
Correct |
743 ms |
8788 KB |
Output is correct |
64 |
Correct |
229 ms |
9812 KB |
Output is correct |
65 |
Correct |
228 ms |
9644 KB |
Output is correct |
66 |
Correct |
238 ms |
9812 KB |
Output is correct |
67 |
Correct |
736 ms |
8532 KB |
Output is correct |
68 |
Correct |
919 ms |
8532 KB |
Output is correct |
69 |
Correct |
906 ms |
8788 KB |
Output is correct |
70 |
Correct |
402 ms |
9296 KB |
Output is correct |
71 |
Correct |
896 ms |
8808 KB |
Output is correct |
72 |
Correct |
660 ms |
8852 KB |
Output is correct |
73 |
Correct |
532 ms |
9252 KB |
Output is correct |
74 |
Correct |
371 ms |
8748 KB |
Output is correct |
75 |
Correct |
330 ms |
8764 KB |
Output is correct |
76 |
Correct |
270 ms |
9296 KB |
Output is correct |
77 |
Correct |
280 ms |
9300 KB |
Output is correct |
78 |
Correct |
2 ms |
6744 KB |
Output is correct |
79 |
Correct |
404 ms |
8528 KB |
Output is correct |
80 |
Correct |
483 ms |
9008 KB |
Output is correct |
81 |
Correct |
452 ms |
8496 KB |
Output is correct |
82 |
Correct |
423 ms |
8788 KB |
Output is correct |
83 |
Correct |
587 ms |
8532 KB |
Output is correct |
84 |
Correct |
467 ms |
8996 KB |
Output is correct |
85 |
Correct |
577 ms |
8272 KB |
Output is correct |
86 |
Correct |
494 ms |
8788 KB |
Output is correct |
87 |
Correct |
524 ms |
8236 KB |
Output is correct |
88 |
Correct |
149 ms |
9552 KB |
Output is correct |
89 |
Correct |
182 ms |
9556 KB |
Output is correct |
90 |
Correct |
333 ms |
8788 KB |
Output is correct |
91 |
Correct |
166 ms |
9544 KB |
Output is correct |
92 |
Correct |
182 ms |
9648 KB |
Output is correct |
93 |
Correct |
332 ms |
8868 KB |
Output is correct |
94 |
Correct |
438 ms |
8808 KB |
Output is correct |
95 |
Correct |
347 ms |
8528 KB |
Output is correct |
96 |
Correct |
370 ms |
9044 KB |
Output is correct |
97 |
Correct |
231 ms |
8788 KB |
Output is correct |
98 |
Correct |
401 ms |
8752 KB |
Output is correct |
99 |
Correct |
320 ms |
8536 KB |
Output is correct |
100 |
Correct |
241 ms |
8532 KB |
Output is correct |
101 |
Correct |
191 ms |
9044 KB |
Output is correct |
102 |
Correct |
127 ms |
9164 KB |
Output is correct |
103 |
Correct |
553 ms |
8240 KB |
Output is correct |
104 |
Correct |
414 ms |
9140 KB |
Output is correct |
105 |
Correct |
741 ms |
8992 KB |
Output is correct |
106 |
Correct |
578 ms |
8880 KB |
Output is correct |
107 |
Correct |
674 ms |
8232 KB |
Output is correct |
108 |
Correct |
420 ms |
9124 KB |
Output is correct |
109 |
Correct |
710 ms |
8788 KB |
Output is correct |
110 |
Correct |
540 ms |
9040 KB |
Output is correct |
111 |
Correct |
726 ms |
8976 KB |
Output is correct |
112 |
Correct |
597 ms |
9020 KB |
Output is correct |
113 |
Correct |
204 ms |
9556 KB |
Output is correct |
114 |
Correct |
227 ms |
9812 KB |
Output is correct |
115 |
Correct |
398 ms |
8784 KB |
Output is correct |
116 |
Correct |
447 ms |
8788 KB |
Output is correct |
117 |
Correct |
231 ms |
9556 KB |
Output is correct |
118 |
Correct |
544 ms |
8868 KB |
Output is correct |
119 |
Correct |
200 ms |
9556 KB |
Output is correct |
120 |
Correct |
411 ms |
8940 KB |
Output is correct |
121 |
Correct |
445 ms |
8864 KB |
Output is correct |
122 |
Correct |
478 ms |
8788 KB |
Output is correct |
123 |
Correct |
415 ms |
8500 KB |
Output is correct |
124 |
Correct |
559 ms |
8788 KB |
Output is correct |
125 |
Correct |
627 ms |
8784 KB |
Output is correct |
126 |
Correct |
609 ms |
8788 KB |
Output is correct |
127 |
Correct |
393 ms |
8532 KB |
Output is correct |
128 |
Correct |
383 ms |
8892 KB |
Output is correct |
129 |
Correct |
264 ms |
9296 KB |
Output is correct |
130 |
Correct |
291 ms |
9396 KB |
Output is correct |