# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1058093 |
2024-08-14T08:23:51 Z |
vjudge1 |
Fish 2 (JOI22_fish2) |
C++17 |
|
574 ms |
17020 KB |
#include<bits/stdc++.h>
using namespace std;
#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 bit(n,i) ((n>>i)&1)
#define all(x) x.begin(),x.end()
#define int long long
typedef long long ll;
typedef pair<int,int> pii;
typedef double ld;
typedef pair<ld,ld> pdd;
typedef pair<ll,ll> pll;
const ll maxn=1e5+69;
const ll offset=2e5;
const ll inf=1e9+3;
const int base=350;
const ll mod=998244353;
int n,a[maxn],q;
struct fentree
{
int st[maxn];
void Update(int u,int v)
{
u+=1;
for(;u<=n+3;u+=u&-u) st[u]+=v;
}
int Get1(int u)
{
u+=1;
int r=0;
for(;u>0;u-=u&-u) r+=st[u];
return r;
}
int Get(int l,int r) {return Get1(r)-Get1(l-1);}
}tree2;
struct segtree1
{
int mx[maxn*4];
void Update(int u,int v,int id=1,int l=0,int r=n+1)
{
// cerr<<u<<' ' << id<<' '<<l<<' '<<r<<'\n';
if (l==r)
{
mx[id]=v;
return;
}
int mid=l+r>>1;
if (u<=mid) Update(u,v,id*2,l,mid);
else Update(u,v,id*2+1,mid+1,r);
mx[id]=max(mx[id*2],mx[id*2+1]);
}
int Lwalk(int u,int val,int id=1,int l=0,int r=n+1)
{
if (l==r)
{
if (mx[id]<=val) return-1;
return l;
}
int mid=l+r>>1;
if (u<=mid) return Lwalk(u,val,id*2,l,mid);
int c=-1;
if (mx[id*2+1]>val) c=Lwalk(u,val,id*2+1,mid+1,r);
if (c!=-1) return c;
if (mx[id*2] > val) return Lwalk(u,val,id*2,l,mid);
else return -1;
}
int Rwalk(int u,int val,int id=1,int l=0,int r=n+1)
{
// if (u==5 && val==3) cerr<< id<<' '<<l<<' '<<r<<'\n';
if (l==r)
{
if (mx[id]<=val) return-1;
return l;
}
int mid=l+r>>1;
if (u>mid) return Rwalk(u,val,id*2+1,mid+1,r);
int c=-1;
// if (u==5 && val==3) cerr<<id<<' '<<mx[id*2]<<' '<<l<<' '<<mid<< " oday\n";
if (mx[id*2] > val) c=Rwalk(u,val,id*2,l,mid);
if (c!=-1) return c;
if (mx[id*2+1] > val) return Rwalk(u,val,id*2+1,mid+1,r);
else return -1;
}
}tree1;
struct segtree2
{
int mn[maxn*4],st[maxn*4],lazy[maxn*4];
void push(int id)
{
int& x= lazy[id];
mn[id<<1]+=x;
lazy[id<<1]+=x;
mn[id<<1|1]+=x;
lazy[id<<1|1]+=x;
x=0;
}
pii Merge(pii l,pii r)
{
if (l.fi==r.fi) return {l.fi,l.se+r.se};
if (l.fi<r.fi) return {l.fi,l.se};
return {r.fi,r.se};
}
void Build(int id=1,int l=1,int r=n)
{
if (l==r)
{
mn[id]=0;
st[id]=1;
return;
}
int mid=l+r>>1;
Build(id*2,l,mid);
Build(id*2+1,mid+1,r);
pii x=Merge({mn[id*2],st[id*2]},{mn[id*2+1],st[id*2+1]});
mn[id]=x.fi,st[id]=x.se;
}
void Update(int u,int v,int val,int id=1,int l=1,int r=n)
{
if (u>r || v<l) return;
if (u<=l && r<=v)
{
mn[id]+=val;
lazy[id]+=val;
return;
}
if (lazy[id]!=0) push(id);
int mid=l+r>>1;
Update(u,v,val,id<<1,l,mid);
Update(u,v,val,id<<1|1,mid+1,r);
pii x=Merge({mn[id*2],st[id*2]},{mn[id*2+1],st[id*2+1]});
mn[id]=x.fi,st[id]=x.se;
}
pii Get(int u,int v,int id=1,int l=1,int r=n)
{
if (u>r || v<l) return {inf,0};
if (u<=l && r<=v) return {mn[id],st[id]};
if (lazy[id]!=0) push(id);
int mid=l+r>>1;
return Merge(Get(u,v,id<<1,l,mid),Get(u,v,id<<1|1,mid+1,r));
}
}tree3;
vector<int> L,R;
void Lget(int u)
{
L.clear();
L.pb(u-1);
if (u==1) return;
int id=u-2;
while (id!=-1)
{
int sum=tree2.Get(id+1,u-1);
if (a[id]>sum) L.pb(id);
sum+=a[id];
id=tree1.Lwalk(id-1,sum);
}
}
void Rget(int u)
{
R.clear();
R.pb(u+1);
if (u==n) return;
int id=u+2;
while (id!=-1)
{
int sum=tree2.Get(u+1,id-1);
if (a[id]>sum) R.pb(id);
sum+=a[id];
id=tree1.Rwalk(id+1,sum);
}
}
void Add(int i,int val)
{
Rget(i);
Lget(i);
for(int j:R)
{
if (j==i+1) continue;
if (a[i]>tree2.Get(i+1,j-1))
{
// cerr<< i<<' '<<j<<' '<<val<<'\n';
tree3.Update(i+1,j-1,val);
}
}
for(int j:L)
{
if (j==i-1) continue;
if (a[i]>tree2.Get(j+1,i-1))
{
// cerr<< j<<' '<<i<<' '<<val<<'\n';
tree3.Update(j+1,i-1,val);
}
}
int k,sum,last=0;
for(int j:R)
{
for1(kk,last,L.size()-1)
{
k=L[kk];
sum=tree2.Get(k+1,j-1);
if (sum>=a[j]) break;
if (sum<a[j] && sum<a[k])
{
// cerr<< k<<' '<<j<<' '<<val<<'\n';
last=kk;
tree3.Update(k+1,j-1,val);
}
}
}
}
void sol()
{
cin >> n;
for1(i,1,n) cin >> a[i];
a[0]=a[n+1]=inf;
for1(i,0,n+1)
{
tree1.Update(i,a[i]);
tree2.Update(i,a[i]);
}
tree3.Build();
for1(i,0,n-1)
{
Rget(i);
for(int j:R)
{
if (j==i+1) continue;
if (a[i]>tree2.Get(i+1,j-1))
{
// cerr<< i<<' '<<j<<" +1"<<'\n';
tree3.Update(i+1,j-1,1);
}
}
}
cin >> q;
for1(_,1,q)
{
int t,l,r;cin >>t>>l>>r;
if (t==1)
{
Add(l,-1);
tree1.Update(l,r);
tree2.Update(l,-a[l]+r);
a[l]=r;
Add(l,1);
}
else
{
Rget(l-1);
Lget(r+1);
int i=upper_bound(all(R),r)-R.begin()-1;
i=R[i];
int j=upper_bound(all(L),l,greater<int>())-L.begin()-1;
j=L[j];
cout << tree3.Get(i,j).se<<'\n';
}
}
}
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
// freopen("fish2.inp","r",stdin);
// freopen("fish2.out","w",stdout);
int t=1;//cin >> t;
while (t--) {
sol();
}
}
/*
4 12
1 2 3
1 3
2 3
2 1
1 2
1 2
1 4
1 1
1 1
2 4
2 3
1 1
3 4
*/
Compilation message
fish2.cpp: In member function 'void segtree1::Update(long long int, long long int, long long int, long long int, long long int)':
fish2.cpp:54:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
54 | int mid=l+r>>1;
| ~^~
fish2.cpp: In member function 'long long int segtree1::Lwalk(long long int, long long int, long long int, long long int, long long int)':
fish2.cpp:66:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
66 | int mid=l+r>>1;
| ~^~
fish2.cpp: In member function 'long long int segtree1::Rwalk(long long int, long long int, long long int, long long int, long long int)':
fish2.cpp:82:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
82 | int mid=l+r>>1;
| ~^~
fish2.cpp: In member function 'void segtree2::Build(long long int, long long int, long long int)':
fish2.cpp:119:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
119 | int mid=l+r>>1;
| ~^~
fish2.cpp: In member function 'void segtree2::Update(long long int, long long int, long long int, long long int, long long int, long long int)':
fish2.cpp:135:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
135 | int mid=l+r>>1;
| ~^~
fish2.cpp: In member function 'pii segtree2::Get(long long int, long long int, long long int, long long int, long long int)':
fish2.cpp:146:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
146 | int mid=l+r>>1;
| ~^~
fish2.cpp: In function 'void Add(long long int, long long int)':
fish2.cpp:8:34: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
8 | #define for1(i,j,k) for(int i=j;i<=k;i++)
......
204 | for1(kk,last,L.size()-1)
| ~~~~~~~~~~~~~~~~~~
fish2.cpp:204:9: note: in expansion of macro 'for1'
204 | for1(kk,last,L.size()-1)
| ^~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
0 ms |
4444 KB |
Output is correct |
3 |
Correct |
1 ms |
4444 KB |
Output is correct |
4 |
Correct |
0 ms |
4444 KB |
Output is correct |
5 |
Correct |
2 ms |
4444 KB |
Output is correct |
6 |
Correct |
1 ms |
4444 KB |
Output is correct |
7 |
Correct |
2 ms |
4444 KB |
Output is correct |
8 |
Correct |
2 ms |
4620 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
1 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
4444 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
1 ms |
4444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
88 ms |
14424 KB |
Output is correct |
3 |
Correct |
93 ms |
14412 KB |
Output is correct |
4 |
Correct |
83 ms |
14420 KB |
Output is correct |
5 |
Correct |
97 ms |
14420 KB |
Output is correct |
6 |
Correct |
25 ms |
14164 KB |
Output is correct |
7 |
Correct |
47 ms |
14420 KB |
Output is correct |
8 |
Correct |
25 ms |
14172 KB |
Output is correct |
9 |
Correct |
47 ms |
14384 KB |
Output is correct |
10 |
Correct |
60 ms |
14420 KB |
Output is correct |
11 |
Correct |
65 ms |
14416 KB |
Output is correct |
12 |
Correct |
32 ms |
14416 KB |
Output is correct |
13 |
Correct |
33 ms |
14420 KB |
Output is correct |
14 |
Correct |
36 ms |
14164 KB |
Output is correct |
15 |
Correct |
35 ms |
14188 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
0 ms |
4444 KB |
Output is correct |
3 |
Correct |
1 ms |
4444 KB |
Output is correct |
4 |
Correct |
0 ms |
4444 KB |
Output is correct |
5 |
Correct |
2 ms |
4444 KB |
Output is correct |
6 |
Correct |
1 ms |
4444 KB |
Output is correct |
7 |
Correct |
2 ms |
4444 KB |
Output is correct |
8 |
Correct |
2 ms |
4620 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
1 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
4444 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
1 ms |
4444 KB |
Output is correct |
21 |
Correct |
1 ms |
4444 KB |
Output is correct |
22 |
Correct |
88 ms |
14424 KB |
Output is correct |
23 |
Correct |
93 ms |
14412 KB |
Output is correct |
24 |
Correct |
83 ms |
14420 KB |
Output is correct |
25 |
Correct |
97 ms |
14420 KB |
Output is correct |
26 |
Correct |
25 ms |
14164 KB |
Output is correct |
27 |
Correct |
47 ms |
14420 KB |
Output is correct |
28 |
Correct |
25 ms |
14172 KB |
Output is correct |
29 |
Correct |
47 ms |
14384 KB |
Output is correct |
30 |
Correct |
60 ms |
14420 KB |
Output is correct |
31 |
Correct |
65 ms |
14416 KB |
Output is correct |
32 |
Correct |
32 ms |
14416 KB |
Output is correct |
33 |
Correct |
33 ms |
14420 KB |
Output is correct |
34 |
Correct |
36 ms |
14164 KB |
Output is correct |
35 |
Correct |
35 ms |
14188 KB |
Output is correct |
36 |
Correct |
86 ms |
14932 KB |
Output is correct |
37 |
Correct |
95 ms |
14680 KB |
Output is correct |
38 |
Correct |
106 ms |
14596 KB |
Output is correct |
39 |
Correct |
93 ms |
14932 KB |
Output is correct |
40 |
Correct |
93 ms |
14672 KB |
Output is correct |
41 |
Correct |
26 ms |
15220 KB |
Output is correct |
42 |
Correct |
25 ms |
15228 KB |
Output is correct |
43 |
Correct |
49 ms |
14560 KB |
Output is correct |
44 |
Correct |
52 ms |
14528 KB |
Output is correct |
45 |
Correct |
68 ms |
14952 KB |
Output is correct |
46 |
Correct |
64 ms |
14968 KB |
Output is correct |
47 |
Correct |
64 ms |
14688 KB |
Output is correct |
48 |
Correct |
34 ms |
14676 KB |
Output is correct |
49 |
Correct |
36 ms |
14548 KB |
Output is correct |
50 |
Correct |
34 ms |
14936 KB |
Output is correct |
51 |
Correct |
36 ms |
15068 KB |
Output is correct |
52 |
Correct |
33 ms |
15184 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
88 ms |
14424 KB |
Output is correct |
3 |
Correct |
93 ms |
14412 KB |
Output is correct |
4 |
Correct |
83 ms |
14420 KB |
Output is correct |
5 |
Correct |
97 ms |
14420 KB |
Output is correct |
6 |
Correct |
25 ms |
14164 KB |
Output is correct |
7 |
Correct |
47 ms |
14420 KB |
Output is correct |
8 |
Correct |
25 ms |
14172 KB |
Output is correct |
9 |
Correct |
47 ms |
14384 KB |
Output is correct |
10 |
Correct |
60 ms |
14420 KB |
Output is correct |
11 |
Correct |
65 ms |
14416 KB |
Output is correct |
12 |
Correct |
32 ms |
14416 KB |
Output is correct |
13 |
Correct |
33 ms |
14420 KB |
Output is correct |
14 |
Correct |
36 ms |
14164 KB |
Output is correct |
15 |
Correct |
35 ms |
14188 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
282 ms |
14552 KB |
Output is correct |
18 |
Correct |
273 ms |
14752 KB |
Output is correct |
19 |
Correct |
252 ms |
14588 KB |
Output is correct |
20 |
Correct |
259 ms |
14620 KB |
Output is correct |
21 |
Correct |
255 ms |
14676 KB |
Output is correct |
22 |
Correct |
223 ms |
14676 KB |
Output is correct |
23 |
Correct |
245 ms |
14672 KB |
Output is correct |
24 |
Correct |
273 ms |
14672 KB |
Output is correct |
25 |
Correct |
249 ms |
14584 KB |
Output is correct |
26 |
Correct |
278 ms |
14760 KB |
Output is correct |
27 |
Correct |
84 ms |
14720 KB |
Output is correct |
28 |
Correct |
85 ms |
14672 KB |
Output is correct |
29 |
Correct |
84 ms |
14648 KB |
Output is correct |
30 |
Correct |
214 ms |
14416 KB |
Output is correct |
31 |
Correct |
206 ms |
14416 KB |
Output is correct |
32 |
Correct |
289 ms |
14676 KB |
Output is correct |
33 |
Correct |
175 ms |
14656 KB |
Output is correct |
34 |
Correct |
291 ms |
14564 KB |
Output is correct |
35 |
Correct |
199 ms |
14672 KB |
Output is correct |
36 |
Correct |
251 ms |
14672 KB |
Output is correct |
37 |
Correct |
101 ms |
14676 KB |
Output is correct |
38 |
Correct |
95 ms |
14676 KB |
Output is correct |
39 |
Correct |
117 ms |
14676 KB |
Output is correct |
40 |
Correct |
108 ms |
14928 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
88 ms |
14424 KB |
Output is correct |
3 |
Correct |
93 ms |
14412 KB |
Output is correct |
4 |
Correct |
83 ms |
14420 KB |
Output is correct |
5 |
Correct |
97 ms |
14420 KB |
Output is correct |
6 |
Correct |
25 ms |
14164 KB |
Output is correct |
7 |
Correct |
47 ms |
14420 KB |
Output is correct |
8 |
Correct |
25 ms |
14172 KB |
Output is correct |
9 |
Correct |
47 ms |
14384 KB |
Output is correct |
10 |
Correct |
60 ms |
14420 KB |
Output is correct |
11 |
Correct |
65 ms |
14416 KB |
Output is correct |
12 |
Correct |
32 ms |
14416 KB |
Output is correct |
13 |
Correct |
33 ms |
14420 KB |
Output is correct |
14 |
Correct |
36 ms |
14164 KB |
Output is correct |
15 |
Correct |
35 ms |
14188 KB |
Output is correct |
16 |
Correct |
1 ms |
4440 KB |
Output is correct |
17 |
Correct |
548 ms |
14268 KB |
Output is correct |
18 |
Correct |
379 ms |
16424 KB |
Output is correct |
19 |
Correct |
459 ms |
15960 KB |
Output is correct |
20 |
Correct |
355 ms |
16208 KB |
Output is correct |
21 |
Correct |
512 ms |
15976 KB |
Output is correct |
22 |
Correct |
375 ms |
16444 KB |
Output is correct |
23 |
Correct |
491 ms |
15696 KB |
Output is correct |
24 |
Correct |
371 ms |
16208 KB |
Output is correct |
25 |
Correct |
455 ms |
15700 KB |
Output is correct |
26 |
Correct |
118 ms |
16720 KB |
Output is correct |
27 |
Correct |
133 ms |
16724 KB |
Output is correct |
28 |
Correct |
231 ms |
16260 KB |
Output is correct |
29 |
Correct |
124 ms |
16804 KB |
Output is correct |
30 |
Correct |
143 ms |
16768 KB |
Output is correct |
31 |
Correct |
266 ms |
16304 KB |
Output is correct |
32 |
Correct |
356 ms |
16368 KB |
Output is correct |
33 |
Correct |
211 ms |
15900 KB |
Output is correct |
34 |
Correct |
323 ms |
16512 KB |
Output is correct |
35 |
Correct |
179 ms |
16216 KB |
Output is correct |
36 |
Correct |
347 ms |
16352 KB |
Output is correct |
37 |
Correct |
271 ms |
16052 KB |
Output is correct |
38 |
Correct |
198 ms |
16068 KB |
Output is correct |
39 |
Correct |
187 ms |
16484 KB |
Output is correct |
40 |
Correct |
108 ms |
16640 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
0 ms |
4444 KB |
Output is correct |
3 |
Correct |
1 ms |
4444 KB |
Output is correct |
4 |
Correct |
0 ms |
4444 KB |
Output is correct |
5 |
Correct |
2 ms |
4444 KB |
Output is correct |
6 |
Correct |
1 ms |
4444 KB |
Output is correct |
7 |
Correct |
2 ms |
4444 KB |
Output is correct |
8 |
Correct |
2 ms |
4620 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
1 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
4444 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
1 ms |
4444 KB |
Output is correct |
21 |
Correct |
1 ms |
4444 KB |
Output is correct |
22 |
Correct |
88 ms |
14424 KB |
Output is correct |
23 |
Correct |
93 ms |
14412 KB |
Output is correct |
24 |
Correct |
83 ms |
14420 KB |
Output is correct |
25 |
Correct |
97 ms |
14420 KB |
Output is correct |
26 |
Correct |
25 ms |
14164 KB |
Output is correct |
27 |
Correct |
47 ms |
14420 KB |
Output is correct |
28 |
Correct |
25 ms |
14172 KB |
Output is correct |
29 |
Correct |
47 ms |
14384 KB |
Output is correct |
30 |
Correct |
60 ms |
14420 KB |
Output is correct |
31 |
Correct |
65 ms |
14416 KB |
Output is correct |
32 |
Correct |
32 ms |
14416 KB |
Output is correct |
33 |
Correct |
33 ms |
14420 KB |
Output is correct |
34 |
Correct |
36 ms |
14164 KB |
Output is correct |
35 |
Correct |
35 ms |
14188 KB |
Output is correct |
36 |
Correct |
86 ms |
14932 KB |
Output is correct |
37 |
Correct |
95 ms |
14680 KB |
Output is correct |
38 |
Correct |
106 ms |
14596 KB |
Output is correct |
39 |
Correct |
93 ms |
14932 KB |
Output is correct |
40 |
Correct |
93 ms |
14672 KB |
Output is correct |
41 |
Correct |
26 ms |
15220 KB |
Output is correct |
42 |
Correct |
25 ms |
15228 KB |
Output is correct |
43 |
Correct |
49 ms |
14560 KB |
Output is correct |
44 |
Correct |
52 ms |
14528 KB |
Output is correct |
45 |
Correct |
68 ms |
14952 KB |
Output is correct |
46 |
Correct |
64 ms |
14968 KB |
Output is correct |
47 |
Correct |
64 ms |
14688 KB |
Output is correct |
48 |
Correct |
34 ms |
14676 KB |
Output is correct |
49 |
Correct |
36 ms |
14548 KB |
Output is correct |
50 |
Correct |
34 ms |
14936 KB |
Output is correct |
51 |
Correct |
36 ms |
15068 KB |
Output is correct |
52 |
Correct |
33 ms |
15184 KB |
Output is correct |
53 |
Correct |
1 ms |
4444 KB |
Output is correct |
54 |
Correct |
282 ms |
14552 KB |
Output is correct |
55 |
Correct |
273 ms |
14752 KB |
Output is correct |
56 |
Correct |
252 ms |
14588 KB |
Output is correct |
57 |
Correct |
259 ms |
14620 KB |
Output is correct |
58 |
Correct |
255 ms |
14676 KB |
Output is correct |
59 |
Correct |
223 ms |
14676 KB |
Output is correct |
60 |
Correct |
245 ms |
14672 KB |
Output is correct |
61 |
Correct |
273 ms |
14672 KB |
Output is correct |
62 |
Correct |
249 ms |
14584 KB |
Output is correct |
63 |
Correct |
278 ms |
14760 KB |
Output is correct |
64 |
Correct |
84 ms |
14720 KB |
Output is correct |
65 |
Correct |
85 ms |
14672 KB |
Output is correct |
66 |
Correct |
84 ms |
14648 KB |
Output is correct |
67 |
Correct |
214 ms |
14416 KB |
Output is correct |
68 |
Correct |
206 ms |
14416 KB |
Output is correct |
69 |
Correct |
289 ms |
14676 KB |
Output is correct |
70 |
Correct |
175 ms |
14656 KB |
Output is correct |
71 |
Correct |
291 ms |
14564 KB |
Output is correct |
72 |
Correct |
199 ms |
14672 KB |
Output is correct |
73 |
Correct |
251 ms |
14672 KB |
Output is correct |
74 |
Correct |
101 ms |
14676 KB |
Output is correct |
75 |
Correct |
95 ms |
14676 KB |
Output is correct |
76 |
Correct |
117 ms |
14676 KB |
Output is correct |
77 |
Correct |
108 ms |
14928 KB |
Output is correct |
78 |
Correct |
1 ms |
4440 KB |
Output is correct |
79 |
Correct |
548 ms |
14268 KB |
Output is correct |
80 |
Correct |
379 ms |
16424 KB |
Output is correct |
81 |
Correct |
459 ms |
15960 KB |
Output is correct |
82 |
Correct |
355 ms |
16208 KB |
Output is correct |
83 |
Correct |
512 ms |
15976 KB |
Output is correct |
84 |
Correct |
375 ms |
16444 KB |
Output is correct |
85 |
Correct |
491 ms |
15696 KB |
Output is correct |
86 |
Correct |
371 ms |
16208 KB |
Output is correct |
87 |
Correct |
455 ms |
15700 KB |
Output is correct |
88 |
Correct |
118 ms |
16720 KB |
Output is correct |
89 |
Correct |
133 ms |
16724 KB |
Output is correct |
90 |
Correct |
231 ms |
16260 KB |
Output is correct |
91 |
Correct |
124 ms |
16804 KB |
Output is correct |
92 |
Correct |
143 ms |
16768 KB |
Output is correct |
93 |
Correct |
266 ms |
16304 KB |
Output is correct |
94 |
Correct |
356 ms |
16368 KB |
Output is correct |
95 |
Correct |
211 ms |
15900 KB |
Output is correct |
96 |
Correct |
323 ms |
16512 KB |
Output is correct |
97 |
Correct |
179 ms |
16216 KB |
Output is correct |
98 |
Correct |
347 ms |
16352 KB |
Output is correct |
99 |
Correct |
271 ms |
16052 KB |
Output is correct |
100 |
Correct |
198 ms |
16068 KB |
Output is correct |
101 |
Correct |
187 ms |
16484 KB |
Output is correct |
102 |
Correct |
108 ms |
16640 KB |
Output is correct |
103 |
Correct |
574 ms |
15696 KB |
Output is correct |
104 |
Correct |
353 ms |
16724 KB |
Output is correct |
105 |
Correct |
317 ms |
16468 KB |
Output is correct |
106 |
Correct |
312 ms |
16400 KB |
Output is correct |
107 |
Correct |
559 ms |
15952 KB |
Output is correct |
108 |
Correct |
349 ms |
16520 KB |
Output is correct |
109 |
Correct |
362 ms |
16364 KB |
Output is correct |
110 |
Correct |
344 ms |
16324 KB |
Output is correct |
111 |
Correct |
315 ms |
16456 KB |
Output is correct |
112 |
Correct |
296 ms |
16308 KB |
Output is correct |
113 |
Correct |
144 ms |
16912 KB |
Output is correct |
114 |
Correct |
102 ms |
17016 KB |
Output is correct |
115 |
Correct |
274 ms |
16200 KB |
Output is correct |
116 |
Correct |
231 ms |
16212 KB |
Output is correct |
117 |
Correct |
100 ms |
17020 KB |
Output is correct |
118 |
Correct |
211 ms |
16300 KB |
Output is correct |
119 |
Correct |
160 ms |
16908 KB |
Output is correct |
120 |
Correct |
286 ms |
16384 KB |
Output is correct |
121 |
Correct |
245 ms |
16344 KB |
Output is correct |
122 |
Correct |
360 ms |
16456 KB |
Output is correct |
123 |
Correct |
207 ms |
16080 KB |
Output is correct |
124 |
Correct |
271 ms |
16684 KB |
Output is correct |
125 |
Correct |
223 ms |
16112 KB |
Output is correct |
126 |
Correct |
260 ms |
16460 KB |
Output is correct |
127 |
Correct |
275 ms |
16004 KB |
Output is correct |
128 |
Correct |
174 ms |
16328 KB |
Output is correct |
129 |
Correct |
172 ms |
16720 KB |
Output is correct |
130 |
Correct |
154 ms |
16976 KB |
Output is correct |