# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
834893 |
2023-08-22T22:46:38 Z |
AdamGS |
Fish 2 (JOI22_fish2) |
C++17 |
|
2151 ms |
9036 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]);
}
void baz(int a,int b,int p=0,int k=SS-1,int v=1){
if(p>b or k<a) return;
if(p>=a and k<=b){
prz.push_back(v);
return;
}
int sr=(p+k)/2;
baz(a,b,p,sr,v*2);
baz(a,b,sr+1,k,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){
prz.clear();
baz(a,SS-1);
int res=-1;
for(auto u:prz){
if(seg3[u]>=x){
res=lewy(u,x);
break;
}
}
return res;
}
int findl(int a,ll x){
prz.clear();
baz(0,a);
int res=-1;
for(int i=prz.size()-1;i>=0;i--){
int u=prz[i];
if(seg3[u]>=x){
res=prawy(u,x);
break;
}
}
return res;
}
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 'void dod(int, int, int)':
fish2.cpp:185:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
185 | for(int i=1;i<r.size();i++){
| ~^~~~~~~~~
fish2.cpp:189:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
189 | for(int i=0;i<l.size();i++){
| ~^~~~~~~~~
fish2.cpp:191:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
191 | for(int i2=0;i2<r.size();i2++){
| ~~^~~~~~~~~
fish2.cpp:200:13: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
200 | if(i!=l.size()-1){
| ~^~~~~~~~~~~~
fish2.cpp: In function 'void solve()':
fish2.cpp:281:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
281 | for(int i2=1;i2<pr.size();i2++){
| ~~^~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
2900 KB |
Output is correct |
2 |
Correct |
2 ms |
2900 KB |
Output is correct |
3 |
Correct |
2 ms |
2772 KB |
Output is correct |
4 |
Correct |
2 ms |
2900 KB |
Output is correct |
5 |
Correct |
7 ms |
2900 KB |
Output is correct |
6 |
Correct |
8 ms |
2900 KB |
Output is correct |
7 |
Correct |
8 ms |
2900 KB |
Output is correct |
8 |
Correct |
8 ms |
2872 KB |
Output is correct |
9 |
Correct |
8 ms |
2900 KB |
Output is correct |
10 |
Correct |
4 ms |
2900 KB |
Output is correct |
11 |
Correct |
5 ms |
2900 KB |
Output is correct |
12 |
Correct |
5 ms |
2900 KB |
Output is correct |
13 |
Correct |
6 ms |
2900 KB |
Output is correct |
14 |
Correct |
5 ms |
2900 KB |
Output is correct |
15 |
Correct |
6 ms |
2900 KB |
Output is correct |
16 |
Correct |
5 ms |
2900 KB |
Output is correct |
17 |
Correct |
5 ms |
2900 KB |
Output is correct |
18 |
Correct |
5 ms |
2900 KB |
Output is correct |
19 |
Correct |
4 ms |
2900 KB |
Output is correct |
20 |
Correct |
4 ms |
2900 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
2900 KB |
Output is correct |
2 |
Correct |
233 ms |
6556 KB |
Output is correct |
3 |
Correct |
332 ms |
6288 KB |
Output is correct |
4 |
Correct |
238 ms |
6604 KB |
Output is correct |
5 |
Correct |
327 ms |
6356 KB |
Output is correct |
6 |
Correct |
52 ms |
6988 KB |
Output is correct |
7 |
Correct |
144 ms |
6160 KB |
Output is correct |
8 |
Correct |
49 ms |
6988 KB |
Output is correct |
9 |
Correct |
147 ms |
6212 KB |
Output is correct |
10 |
Correct |
177 ms |
6608 KB |
Output is correct |
11 |
Correct |
238 ms |
6220 KB |
Output is correct |
12 |
Correct |
80 ms |
6280 KB |
Output is correct |
13 |
Correct |
85 ms |
6220 KB |
Output is correct |
14 |
Correct |
67 ms |
6608 KB |
Output is correct |
15 |
Correct |
66 ms |
6604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
2900 KB |
Output is correct |
2 |
Correct |
2 ms |
2900 KB |
Output is correct |
3 |
Correct |
2 ms |
2772 KB |
Output is correct |
4 |
Correct |
2 ms |
2900 KB |
Output is correct |
5 |
Correct |
7 ms |
2900 KB |
Output is correct |
6 |
Correct |
8 ms |
2900 KB |
Output is correct |
7 |
Correct |
8 ms |
2900 KB |
Output is correct |
8 |
Correct |
8 ms |
2872 KB |
Output is correct |
9 |
Correct |
8 ms |
2900 KB |
Output is correct |
10 |
Correct |
4 ms |
2900 KB |
Output is correct |
11 |
Correct |
5 ms |
2900 KB |
Output is correct |
12 |
Correct |
5 ms |
2900 KB |
Output is correct |
13 |
Correct |
6 ms |
2900 KB |
Output is correct |
14 |
Correct |
5 ms |
2900 KB |
Output is correct |
15 |
Correct |
6 ms |
2900 KB |
Output is correct |
16 |
Correct |
5 ms |
2900 KB |
Output is correct |
17 |
Correct |
5 ms |
2900 KB |
Output is correct |
18 |
Correct |
5 ms |
2900 KB |
Output is correct |
19 |
Correct |
4 ms |
2900 KB |
Output is correct |
20 |
Correct |
4 ms |
2900 KB |
Output is correct |
21 |
Correct |
3 ms |
2900 KB |
Output is correct |
22 |
Correct |
233 ms |
6556 KB |
Output is correct |
23 |
Correct |
332 ms |
6288 KB |
Output is correct |
24 |
Correct |
238 ms |
6604 KB |
Output is correct |
25 |
Correct |
327 ms |
6356 KB |
Output is correct |
26 |
Correct |
52 ms |
6988 KB |
Output is correct |
27 |
Correct |
144 ms |
6160 KB |
Output is correct |
28 |
Correct |
49 ms |
6988 KB |
Output is correct |
29 |
Correct |
147 ms |
6212 KB |
Output is correct |
30 |
Correct |
177 ms |
6608 KB |
Output is correct |
31 |
Correct |
238 ms |
6220 KB |
Output is correct |
32 |
Correct |
80 ms |
6280 KB |
Output is correct |
33 |
Correct |
85 ms |
6220 KB |
Output is correct |
34 |
Correct |
67 ms |
6608 KB |
Output is correct |
35 |
Correct |
66 ms |
6604 KB |
Output is correct |
36 |
Correct |
241 ms |
6608 KB |
Output is correct |
37 |
Correct |
357 ms |
6396 KB |
Output is correct |
38 |
Correct |
333 ms |
6292 KB |
Output is correct |
39 |
Correct |
249 ms |
6604 KB |
Output is correct |
40 |
Correct |
343 ms |
6368 KB |
Output is correct |
41 |
Correct |
53 ms |
6988 KB |
Output is correct |
42 |
Correct |
53 ms |
7012 KB |
Output is correct |
43 |
Correct |
150 ms |
6216 KB |
Output is correct |
44 |
Correct |
185 ms |
6144 KB |
Output is correct |
45 |
Correct |
195 ms |
6620 KB |
Output is correct |
46 |
Correct |
183 ms |
6728 KB |
Output is correct |
47 |
Correct |
276 ms |
6248 KB |
Output is correct |
48 |
Correct |
76 ms |
6232 KB |
Output is correct |
49 |
Correct |
94 ms |
6220 KB |
Output is correct |
50 |
Correct |
69 ms |
6556 KB |
Output is correct |
51 |
Correct |
72 ms |
6756 KB |
Output is correct |
52 |
Correct |
68 ms |
6732 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
2900 KB |
Output is correct |
2 |
Correct |
233 ms |
6556 KB |
Output is correct |
3 |
Correct |
332 ms |
6288 KB |
Output is correct |
4 |
Correct |
238 ms |
6604 KB |
Output is correct |
5 |
Correct |
327 ms |
6356 KB |
Output is correct |
6 |
Correct |
52 ms |
6988 KB |
Output is correct |
7 |
Correct |
144 ms |
6160 KB |
Output is correct |
8 |
Correct |
49 ms |
6988 KB |
Output is correct |
9 |
Correct |
147 ms |
6212 KB |
Output is correct |
10 |
Correct |
177 ms |
6608 KB |
Output is correct |
11 |
Correct |
238 ms |
6220 KB |
Output is correct |
12 |
Correct |
80 ms |
6280 KB |
Output is correct |
13 |
Correct |
85 ms |
6220 KB |
Output is correct |
14 |
Correct |
67 ms |
6608 KB |
Output is correct |
15 |
Correct |
66 ms |
6604 KB |
Output is correct |
16 |
Correct |
2 ms |
2772 KB |
Output is correct |
17 |
Correct |
1566 ms |
8124 KB |
Output is correct |
18 |
Correct |
1275 ms |
8380 KB |
Output is correct |
19 |
Correct |
1629 ms |
7976 KB |
Output is correct |
20 |
Correct |
1614 ms |
7964 KB |
Output is correct |
21 |
Correct |
1479 ms |
8132 KB |
Output is correct |
22 |
Correct |
1244 ms |
8336 KB |
Output is correct |
23 |
Correct |
1405 ms |
8156 KB |
Output is correct |
24 |
Correct |
1702 ms |
8060 KB |
Output is correct |
25 |
Correct |
1480 ms |
8056 KB |
Output is correct |
26 |
Correct |
1706 ms |
8256 KB |
Output is correct |
27 |
Correct |
440 ms |
8836 KB |
Output is correct |
28 |
Correct |
440 ms |
9036 KB |
Output is correct |
29 |
Correct |
437 ms |
8824 KB |
Output is correct |
30 |
Correct |
1409 ms |
7924 KB |
Output is correct |
31 |
Correct |
1578 ms |
7800 KB |
Output is correct |
32 |
Correct |
2109 ms |
7948 KB |
Output is correct |
33 |
Correct |
948 ms |
8412 KB |
Output is correct |
34 |
Correct |
2151 ms |
7976 KB |
Output is correct |
35 |
Correct |
1382 ms |
7960 KB |
Output is correct |
36 |
Correct |
1555 ms |
8412 KB |
Output is correct |
37 |
Correct |
724 ms |
7820 KB |
Output is correct |
38 |
Correct |
628 ms |
7808 KB |
Output is correct |
39 |
Correct |
558 ms |
8488 KB |
Output is correct |
40 |
Correct |
593 ms |
8436 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
2900 KB |
Output is correct |
2 |
Correct |
233 ms |
6556 KB |
Output is correct |
3 |
Correct |
332 ms |
6288 KB |
Output is correct |
4 |
Correct |
238 ms |
6604 KB |
Output is correct |
5 |
Correct |
327 ms |
6356 KB |
Output is correct |
6 |
Correct |
52 ms |
6988 KB |
Output is correct |
7 |
Correct |
144 ms |
6160 KB |
Output is correct |
8 |
Correct |
49 ms |
6988 KB |
Output is correct |
9 |
Correct |
147 ms |
6212 KB |
Output is correct |
10 |
Correct |
177 ms |
6608 KB |
Output is correct |
11 |
Correct |
238 ms |
6220 KB |
Output is correct |
12 |
Correct |
80 ms |
6280 KB |
Output is correct |
13 |
Correct |
85 ms |
6220 KB |
Output is correct |
14 |
Correct |
67 ms |
6608 KB |
Output is correct |
15 |
Correct |
66 ms |
6604 KB |
Output is correct |
16 |
Correct |
3 ms |
2900 KB |
Output is correct |
17 |
Correct |
1078 ms |
7628 KB |
Output is correct |
18 |
Correct |
868 ms |
8140 KB |
Output is correct |
19 |
Correct |
1055 ms |
7596 KB |
Output is correct |
20 |
Correct |
808 ms |
7988 KB |
Output is correct |
21 |
Correct |
1243 ms |
7580 KB |
Output is correct |
22 |
Correct |
869 ms |
8012 KB |
Output is correct |
23 |
Correct |
1191 ms |
7584 KB |
Output is correct |
24 |
Correct |
847 ms |
8052 KB |
Output is correct |
25 |
Correct |
1163 ms |
7504 KB |
Output is correct |
26 |
Correct |
262 ms |
8652 KB |
Output is correct |
27 |
Correct |
318 ms |
8660 KB |
Output is correct |
28 |
Correct |
561 ms |
7944 KB |
Output is correct |
29 |
Correct |
286 ms |
8656 KB |
Output is correct |
30 |
Correct |
327 ms |
8652 KB |
Output is correct |
31 |
Correct |
599 ms |
7920 KB |
Output is correct |
32 |
Correct |
780 ms |
8072 KB |
Output is correct |
33 |
Correct |
594 ms |
7612 KB |
Output is correct |
34 |
Correct |
670 ms |
8336 KB |
Output is correct |
35 |
Correct |
528 ms |
7968 KB |
Output is correct |
36 |
Correct |
690 ms |
7956 KB |
Output is correct |
37 |
Correct |
540 ms |
7684 KB |
Output is correct |
38 |
Correct |
419 ms |
7780 KB |
Output is correct |
39 |
Correct |
357 ms |
8340 KB |
Output is correct |
40 |
Correct |
242 ms |
8316 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
2900 KB |
Output is correct |
2 |
Correct |
2 ms |
2900 KB |
Output is correct |
3 |
Correct |
2 ms |
2772 KB |
Output is correct |
4 |
Correct |
2 ms |
2900 KB |
Output is correct |
5 |
Correct |
7 ms |
2900 KB |
Output is correct |
6 |
Correct |
8 ms |
2900 KB |
Output is correct |
7 |
Correct |
8 ms |
2900 KB |
Output is correct |
8 |
Correct |
8 ms |
2872 KB |
Output is correct |
9 |
Correct |
8 ms |
2900 KB |
Output is correct |
10 |
Correct |
4 ms |
2900 KB |
Output is correct |
11 |
Correct |
5 ms |
2900 KB |
Output is correct |
12 |
Correct |
5 ms |
2900 KB |
Output is correct |
13 |
Correct |
6 ms |
2900 KB |
Output is correct |
14 |
Correct |
5 ms |
2900 KB |
Output is correct |
15 |
Correct |
6 ms |
2900 KB |
Output is correct |
16 |
Correct |
5 ms |
2900 KB |
Output is correct |
17 |
Correct |
5 ms |
2900 KB |
Output is correct |
18 |
Correct |
5 ms |
2900 KB |
Output is correct |
19 |
Correct |
4 ms |
2900 KB |
Output is correct |
20 |
Correct |
4 ms |
2900 KB |
Output is correct |
21 |
Correct |
3 ms |
2900 KB |
Output is correct |
22 |
Correct |
233 ms |
6556 KB |
Output is correct |
23 |
Correct |
332 ms |
6288 KB |
Output is correct |
24 |
Correct |
238 ms |
6604 KB |
Output is correct |
25 |
Correct |
327 ms |
6356 KB |
Output is correct |
26 |
Correct |
52 ms |
6988 KB |
Output is correct |
27 |
Correct |
144 ms |
6160 KB |
Output is correct |
28 |
Correct |
49 ms |
6988 KB |
Output is correct |
29 |
Correct |
147 ms |
6212 KB |
Output is correct |
30 |
Correct |
177 ms |
6608 KB |
Output is correct |
31 |
Correct |
238 ms |
6220 KB |
Output is correct |
32 |
Correct |
80 ms |
6280 KB |
Output is correct |
33 |
Correct |
85 ms |
6220 KB |
Output is correct |
34 |
Correct |
67 ms |
6608 KB |
Output is correct |
35 |
Correct |
66 ms |
6604 KB |
Output is correct |
36 |
Correct |
241 ms |
6608 KB |
Output is correct |
37 |
Correct |
357 ms |
6396 KB |
Output is correct |
38 |
Correct |
333 ms |
6292 KB |
Output is correct |
39 |
Correct |
249 ms |
6604 KB |
Output is correct |
40 |
Correct |
343 ms |
6368 KB |
Output is correct |
41 |
Correct |
53 ms |
6988 KB |
Output is correct |
42 |
Correct |
53 ms |
7012 KB |
Output is correct |
43 |
Correct |
150 ms |
6216 KB |
Output is correct |
44 |
Correct |
185 ms |
6144 KB |
Output is correct |
45 |
Correct |
195 ms |
6620 KB |
Output is correct |
46 |
Correct |
183 ms |
6728 KB |
Output is correct |
47 |
Correct |
276 ms |
6248 KB |
Output is correct |
48 |
Correct |
76 ms |
6232 KB |
Output is correct |
49 |
Correct |
94 ms |
6220 KB |
Output is correct |
50 |
Correct |
69 ms |
6556 KB |
Output is correct |
51 |
Correct |
72 ms |
6756 KB |
Output is correct |
52 |
Correct |
68 ms |
6732 KB |
Output is correct |
53 |
Correct |
2 ms |
2772 KB |
Output is correct |
54 |
Correct |
1566 ms |
8124 KB |
Output is correct |
55 |
Correct |
1275 ms |
8380 KB |
Output is correct |
56 |
Correct |
1629 ms |
7976 KB |
Output is correct |
57 |
Correct |
1614 ms |
7964 KB |
Output is correct |
58 |
Correct |
1479 ms |
8132 KB |
Output is correct |
59 |
Correct |
1244 ms |
8336 KB |
Output is correct |
60 |
Correct |
1405 ms |
8156 KB |
Output is correct |
61 |
Correct |
1702 ms |
8060 KB |
Output is correct |
62 |
Correct |
1480 ms |
8056 KB |
Output is correct |
63 |
Correct |
1706 ms |
8256 KB |
Output is correct |
64 |
Correct |
440 ms |
8836 KB |
Output is correct |
65 |
Correct |
440 ms |
9036 KB |
Output is correct |
66 |
Correct |
437 ms |
8824 KB |
Output is correct |
67 |
Correct |
1409 ms |
7924 KB |
Output is correct |
68 |
Correct |
1578 ms |
7800 KB |
Output is correct |
69 |
Correct |
2109 ms |
7948 KB |
Output is correct |
70 |
Correct |
948 ms |
8412 KB |
Output is correct |
71 |
Correct |
2151 ms |
7976 KB |
Output is correct |
72 |
Correct |
1382 ms |
7960 KB |
Output is correct |
73 |
Correct |
1555 ms |
8412 KB |
Output is correct |
74 |
Correct |
724 ms |
7820 KB |
Output is correct |
75 |
Correct |
628 ms |
7808 KB |
Output is correct |
76 |
Correct |
558 ms |
8488 KB |
Output is correct |
77 |
Correct |
593 ms |
8436 KB |
Output is correct |
78 |
Correct |
3 ms |
2900 KB |
Output is correct |
79 |
Correct |
1078 ms |
7628 KB |
Output is correct |
80 |
Correct |
868 ms |
8140 KB |
Output is correct |
81 |
Correct |
1055 ms |
7596 KB |
Output is correct |
82 |
Correct |
808 ms |
7988 KB |
Output is correct |
83 |
Correct |
1243 ms |
7580 KB |
Output is correct |
84 |
Correct |
869 ms |
8012 KB |
Output is correct |
85 |
Correct |
1191 ms |
7584 KB |
Output is correct |
86 |
Correct |
847 ms |
8052 KB |
Output is correct |
87 |
Correct |
1163 ms |
7504 KB |
Output is correct |
88 |
Correct |
262 ms |
8652 KB |
Output is correct |
89 |
Correct |
318 ms |
8660 KB |
Output is correct |
90 |
Correct |
561 ms |
7944 KB |
Output is correct |
91 |
Correct |
286 ms |
8656 KB |
Output is correct |
92 |
Correct |
327 ms |
8652 KB |
Output is correct |
93 |
Correct |
599 ms |
7920 KB |
Output is correct |
94 |
Correct |
780 ms |
8072 KB |
Output is correct |
95 |
Correct |
594 ms |
7612 KB |
Output is correct |
96 |
Correct |
670 ms |
8336 KB |
Output is correct |
97 |
Correct |
528 ms |
7968 KB |
Output is correct |
98 |
Correct |
690 ms |
7956 KB |
Output is correct |
99 |
Correct |
540 ms |
7684 KB |
Output is correct |
100 |
Correct |
419 ms |
7780 KB |
Output is correct |
101 |
Correct |
357 ms |
8340 KB |
Output is correct |
102 |
Correct |
242 ms |
8316 KB |
Output is correct |
103 |
Correct |
1179 ms |
7324 KB |
Output is correct |
104 |
Correct |
864 ms |
8248 KB |
Output is correct |
105 |
Correct |
1652 ms |
8052 KB |
Output is correct |
106 |
Correct |
1301 ms |
8128 KB |
Output is correct |
107 |
Correct |
1345 ms |
7460 KB |
Output is correct |
108 |
Correct |
805 ms |
8276 KB |
Output is correct |
109 |
Correct |
1420 ms |
8096 KB |
Output is correct |
110 |
Correct |
1104 ms |
8124 KB |
Output is correct |
111 |
Correct |
1627 ms |
8236 KB |
Output is correct |
112 |
Correct |
1307 ms |
8116 KB |
Output is correct |
113 |
Correct |
370 ms |
8748 KB |
Output is correct |
114 |
Correct |
427 ms |
8960 KB |
Output is correct |
115 |
Correct |
707 ms |
7972 KB |
Output is correct |
116 |
Correct |
795 ms |
7960 KB |
Output is correct |
117 |
Correct |
447 ms |
8780 KB |
Output is correct |
118 |
Correct |
1037 ms |
8012 KB |
Output is correct |
119 |
Correct |
347 ms |
8764 KB |
Output is correct |
120 |
Correct |
726 ms |
7952 KB |
Output is correct |
121 |
Correct |
843 ms |
7976 KB |
Output is correct |
122 |
Correct |
821 ms |
8080 KB |
Output is correct |
123 |
Correct |
870 ms |
7832 KB |
Output is correct |
124 |
Correct |
1159 ms |
8000 KB |
Output is correct |
125 |
Correct |
1307 ms |
7916 KB |
Output is correct |
126 |
Correct |
1250 ms |
8088 KB |
Output is correct |
127 |
Correct |
658 ms |
7756 KB |
Output is correct |
128 |
Correct |
734 ms |
8016 KB |
Output is correct |
129 |
Correct |
503 ms |
8364 KB |
Output is correct |
130 |
Correct |
536 ms |
8480 KB |
Output is correct |