# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
987168 |
2024-05-22T07:47:15 Z |
Pyqe |
Radio Towers (IOI22_towers) |
C++17 |
|
1769 ms |
170792 KB |
#include <bits/stdc++.h>
#include "towers.h"
using namespace std;
#define mp make_pair
#define fr first
#define sc second
const long long inf=1e18;
long long n,udn=0,a[100069],uds[100069],sp[17][100069],lg2[100069];
multiset<long long> ms;
multiset<pair<long long,pair<long long,long long>>> rg;
bitset<100069> spc;
struct segtree
{
long long l,r,sm;
pair<long long,long long> mxl,mxr;
segtree *p[2];
void bd(long long lb,long long rb)
{
l=lb;
r=rb;
if(l==r)
{
sm=spc[l];
mxl={spc[l],-l};
mxr={spc[l],l};
}
else
{
long long ii,md=(l+r)/2;
for(ii=0;ii<2;ii++)
{
p[ii]=new segtree;
p[ii]->bd(!ii?l:md+1,!ii?md:r);
}
sm=p[0]->sm+p[1]->sm;
mxl=max(p[0]->mxl,p[1]->mxl);
mxr=max(p[0]->mxr,p[1]->mxr);
}
}
void ud(long long x,long long w)
{
if(l>=x&&r<=x)
{
sm+=w;
mxl.fr+=w;
mxr.fr+=w;
}
else
{
long long ii;
for(ii=0;ii<2;ii++)
{
if(!(p[ii]->l>x||p[ii]->r<x))
{
segtree *tmp=p[ii];
p[ii]=new segtree;
*p[ii]=*tmp;
p[ii]->ud(x,w);
}
}
sm=p[0]->sm+p[1]->sm;
mxl=max(p[0]->mxl,p[1]->mxl);
mxr=max(p[0]->mxr,p[1]->mxr);
}
}
long long qrs(long long lb,long long rb)
{
if(l>rb||r<lb)
{
return 0;
}
else if(l>=lb&&r<=rb)
{
return sm;
}
else
{
return p[0]->qrs(lb,rb)+p[1]->qrs(lb,rb);
}
}
pair<long long,long long> qrxl(long long lb,long long rb)
{
if(l>rb||r<lb)
{
return {-inf,-1};
}
else if(l>=lb&&r<=rb)
{
return mxl;
}
else
{
return max(p[0]->qrxl(lb,rb),p[1]->qrxl(lb,rb));
}
}
pair<long long,long long> qrxr(long long lb,long long rb)
{
if(l>rb||r<lb)
{
return {-inf,-1};
}
else if(l>=lb&&r<=rb)
{
return mxr;
}
else
{
return max(p[0]->qrxr(lb,rb),p[1]->qrxr(lb,rb));
}
}
}
sg[100069];
inline void spbd()
{
long long i,j,k;
for(i=1;i<=n;i++)
{
sp[0][i]=a[i];
}
for(i=1;1ll<<i<=n;i++)
{
for(j=1;j<=n-(1ll<<i)+1;j++)
{
sp[i][j]=min(sp[i-1][j],sp[i-1][j+(1ll<<i-1)]);
}
}
for(i=1;i<=n;i++)
{
for(k=i;k>1;k/=2,lg2[i]++);
}
}
inline long long spqr(long long lb,long long rb)
{
if(lb<=rb)
{
long long e=lg2[rb-lb+1];
return min(sp[e][lb],sp[e][rb-(1ll<<e)+1]);
}
else
{
return inf;
}
}
void init(int on,vector<int> aa)
{
long long i,k,l=-1,w,k2,l2;
n=on;
for(i=1;i<=n;i++)
{
a[i]=aa[i-1];
}
ms.insert(-inf);
ms.insert(inf);
for(i=1;i<=n;i++)
{
if(((i==1||a[i]<a[i-1])&&(i==n||a[i]<a[i+1]))||(i>1&&i<n&&a[i]>max(a[i-1],a[i+1])))
{
ms.insert(i);
if(l!=-1)
{
rg.insert({abs(a[l]-a[i]),{l,i}});
}
l=i;
spc[i]=1;
}
}
sg[0].bd(1,n);
for(;!rg.empty();)
{
w=rg.begin()->fr;
k=rg.begin()->sc.fr;
l=rg.begin()->sc.sc;
rg.erase(rg.begin());
if(ms.find(k)==ms.end()||ms.find(l)==ms.end())
{
continue;
}
ms.erase(k);
ms.erase(l);
k2=*prev(ms.lower_bound(k));
l2=*ms.upper_bound(l);
if(k2!=-inf&&l2!=inf)
{
rg.insert({abs(a[k2]-a[l2]),{k2,l2}});
}
udn++;
uds[udn]=w;
sg[udn]=sg[udn-1];
sg[udn].ud(k,-1);
sg[udn].ud(l,-1);
}
spbd();
}
int max_towers(int lb,int rb,int cw)
{
long long k,w,w2,w3,p,mn,z;
pair<long long,long long> tmp;
lb++;
rb++;
p=lower_bound(uds+1,uds+udn+1,cw)-uds-1;
w=sg[p].sm;
w2=sg[p].qrs(1,lb-1);
w3=sg[p].qrs(rb+1,n);
z=(max(w-(w2+1)/2*2-(w3+1)/2*2,0ll)+1)/2;
if(w2%2)
{
tmp=sg[p].qrxl(lb,rb);
if(tmp.fr)
{
k=-tmp.sc;
mn=spqr(lb,k-1);
z+=a[k]-mn>=cw;
}
}
if(w3%2)
{
tmp=sg[p].qrxr(lb,rb);
if(tmp.fr)
{
k=tmp.sc;
mn=spqr(k+1,rb);
z+=a[k]-mn>=cw;
}
}
z=max(z,1ll);
return z;
}
Compilation message
towers.cpp: In function 'void spbd()':
towers.cpp:134:45: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
134 | sp[i][j]=min(sp[i-1][j],sp[i-1][j+(1ll<<i-1)]);
| ~^~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
385 ms |
25148 KB |
Output is correct |
2 |
Correct |
820 ms |
37596 KB |
Output is correct |
3 |
Correct |
806 ms |
37572 KB |
Output is correct |
4 |
Correct |
815 ms |
37712 KB |
Output is correct |
5 |
Correct |
802 ms |
37668 KB |
Output is correct |
6 |
Correct |
781 ms |
37584 KB |
Output is correct |
7 |
Correct |
827 ms |
37568 KB |
Output is correct |
8 |
Correct |
5 ms |
7512 KB |
Output is correct |
9 |
Correct |
5 ms |
8024 KB |
Output is correct |
10 |
Correct |
4 ms |
8024 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
8024 KB |
Output is correct |
2 |
Correct |
6 ms |
9048 KB |
Output is correct |
3 |
Correct |
8 ms |
9048 KB |
Output is correct |
4 |
Correct |
8 ms |
9816 KB |
Output is correct |
5 |
Correct |
7 ms |
9816 KB |
Output is correct |
6 |
Correct |
7 ms |
10012 KB |
Output is correct |
7 |
Correct |
7 ms |
9688 KB |
Output is correct |
8 |
Correct |
6 ms |
8024 KB |
Output is correct |
9 |
Correct |
5 ms |
8024 KB |
Output is correct |
10 |
Correct |
4 ms |
8024 KB |
Output is correct |
11 |
Correct |
4 ms |
8024 KB |
Output is correct |
12 |
Correct |
5 ms |
7512 KB |
Output is correct |
13 |
Correct |
4 ms |
8024 KB |
Output is correct |
14 |
Correct |
4 ms |
8024 KB |
Output is correct |
15 |
Correct |
7 ms |
9048 KB |
Output is correct |
16 |
Correct |
8 ms |
9816 KB |
Output is correct |
17 |
Correct |
7 ms |
9816 KB |
Output is correct |
18 |
Correct |
4 ms |
8024 KB |
Output is correct |
19 |
Correct |
5 ms |
8024 KB |
Output is correct |
20 |
Correct |
6 ms |
9048 KB |
Output is correct |
21 |
Correct |
7 ms |
9824 KB |
Output is correct |
22 |
Correct |
8 ms |
9816 KB |
Output is correct |
23 |
Correct |
5 ms |
8020 KB |
Output is correct |
24 |
Correct |
4 ms |
8024 KB |
Output is correct |
25 |
Correct |
5 ms |
8024 KB |
Output is correct |
26 |
Correct |
7 ms |
9048 KB |
Output is correct |
27 |
Correct |
7 ms |
9048 KB |
Output is correct |
28 |
Correct |
8 ms |
9816 KB |
Output is correct |
29 |
Correct |
8 ms |
9816 KB |
Output is correct |
30 |
Correct |
7 ms |
9752 KB |
Output is correct |
31 |
Correct |
7 ms |
9816 KB |
Output is correct |
32 |
Correct |
4 ms |
8024 KB |
Output is correct |
33 |
Correct |
4 ms |
7824 KB |
Output is correct |
34 |
Correct |
6 ms |
8024 KB |
Output is correct |
35 |
Correct |
5 ms |
8024 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
8024 KB |
Output is correct |
2 |
Correct |
6 ms |
9048 KB |
Output is correct |
3 |
Correct |
8 ms |
9048 KB |
Output is correct |
4 |
Correct |
8 ms |
9816 KB |
Output is correct |
5 |
Correct |
7 ms |
9816 KB |
Output is correct |
6 |
Correct |
7 ms |
10012 KB |
Output is correct |
7 |
Correct |
7 ms |
9688 KB |
Output is correct |
8 |
Correct |
6 ms |
8024 KB |
Output is correct |
9 |
Correct |
5 ms |
8024 KB |
Output is correct |
10 |
Correct |
4 ms |
8024 KB |
Output is correct |
11 |
Correct |
4 ms |
8024 KB |
Output is correct |
12 |
Correct |
5 ms |
7512 KB |
Output is correct |
13 |
Correct |
4 ms |
8024 KB |
Output is correct |
14 |
Correct |
4 ms |
8024 KB |
Output is correct |
15 |
Correct |
7 ms |
9048 KB |
Output is correct |
16 |
Correct |
8 ms |
9816 KB |
Output is correct |
17 |
Correct |
7 ms |
9816 KB |
Output is correct |
18 |
Correct |
4 ms |
8024 KB |
Output is correct |
19 |
Correct |
5 ms |
8024 KB |
Output is correct |
20 |
Correct |
6 ms |
9048 KB |
Output is correct |
21 |
Correct |
7 ms |
9824 KB |
Output is correct |
22 |
Correct |
8 ms |
9816 KB |
Output is correct |
23 |
Correct |
5 ms |
8020 KB |
Output is correct |
24 |
Correct |
4 ms |
8024 KB |
Output is correct |
25 |
Correct |
5 ms |
8024 KB |
Output is correct |
26 |
Correct |
7 ms |
9048 KB |
Output is correct |
27 |
Correct |
7 ms |
9048 KB |
Output is correct |
28 |
Correct |
8 ms |
9816 KB |
Output is correct |
29 |
Correct |
8 ms |
9816 KB |
Output is correct |
30 |
Correct |
7 ms |
9752 KB |
Output is correct |
31 |
Correct |
7 ms |
9816 KB |
Output is correct |
32 |
Correct |
4 ms |
8024 KB |
Output is correct |
33 |
Correct |
4 ms |
7824 KB |
Output is correct |
34 |
Correct |
6 ms |
8024 KB |
Output is correct |
35 |
Correct |
5 ms |
8024 KB |
Output is correct |
36 |
Correct |
140 ms |
81952 KB |
Output is correct |
37 |
Correct |
310 ms |
126576 KB |
Output is correct |
38 |
Correct |
278 ms |
125936 KB |
Output is correct |
39 |
Correct |
459 ms |
170708 KB |
Output is correct |
40 |
Correct |
372 ms |
170456 KB |
Output is correct |
41 |
Correct |
446 ms |
170532 KB |
Output is correct |
42 |
Correct |
435 ms |
170616 KB |
Output is correct |
43 |
Correct |
31 ms |
37600 KB |
Output is correct |
44 |
Correct |
32 ms |
37840 KB |
Output is correct |
45 |
Correct |
31 ms |
37628 KB |
Output is correct |
46 |
Correct |
30 ms |
37712 KB |
Output is correct |
47 |
Correct |
261 ms |
126020 KB |
Output is correct |
48 |
Correct |
436 ms |
170436 KB |
Output is correct |
49 |
Correct |
429 ms |
170700 KB |
Output is correct |
50 |
Correct |
35 ms |
37584 KB |
Output is correct |
51 |
Correct |
32 ms |
37588 KB |
Output is correct |
52 |
Correct |
275 ms |
126168 KB |
Output is correct |
53 |
Correct |
475 ms |
170608 KB |
Output is correct |
54 |
Correct |
423 ms |
170576 KB |
Output is correct |
55 |
Correct |
32 ms |
37588 KB |
Output is correct |
56 |
Correct |
33 ms |
37712 KB |
Output is correct |
57 |
Correct |
273 ms |
122156 KB |
Output is correct |
58 |
Correct |
272 ms |
126204 KB |
Output is correct |
59 |
Correct |
306 ms |
126620 KB |
Output is correct |
60 |
Correct |
471 ms |
170540 KB |
Output is correct |
61 |
Correct |
510 ms |
170668 KB |
Output is correct |
62 |
Correct |
436 ms |
170436 KB |
Output is correct |
63 |
Correct |
451 ms |
170440 KB |
Output is correct |
64 |
Correct |
33 ms |
37568 KB |
Output is correct |
65 |
Correct |
37 ms |
37604 KB |
Output is correct |
66 |
Correct |
36 ms |
37828 KB |
Output is correct |
67 |
Correct |
31 ms |
37848 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
848 ms |
125204 KB |
Output is correct |
2 |
Correct |
1152 ms |
126288 KB |
Output is correct |
3 |
Correct |
1086 ms |
126132 KB |
Output is correct |
4 |
Correct |
1224 ms |
170636 KB |
Output is correct |
5 |
Correct |
1204 ms |
170624 KB |
Output is correct |
6 |
Correct |
1220 ms |
170528 KB |
Output is correct |
7 |
Correct |
1210 ms |
170580 KB |
Output is correct |
8 |
Correct |
767 ms |
37588 KB |
Output is correct |
9 |
Correct |
809 ms |
37592 KB |
Output is correct |
10 |
Correct |
789 ms |
37848 KB |
Output is correct |
11 |
Correct |
789 ms |
37828 KB |
Output is correct |
12 |
Correct |
762 ms |
37576 KB |
Output is correct |
13 |
Correct |
741 ms |
37720 KB |
Output is correct |
14 |
Correct |
4 ms |
7512 KB |
Output is correct |
15 |
Correct |
5 ms |
8024 KB |
Output is correct |
16 |
Correct |
4 ms |
8024 KB |
Output is correct |
17 |
Correct |
289 ms |
126164 KB |
Output is correct |
18 |
Correct |
433 ms |
170540 KB |
Output is correct |
19 |
Correct |
423 ms |
170572 KB |
Output is correct |
20 |
Correct |
33 ms |
37812 KB |
Output is correct |
21 |
Correct |
31 ms |
37596 KB |
Output is correct |
22 |
Correct |
305 ms |
126144 KB |
Output is correct |
23 |
Correct |
431 ms |
170408 KB |
Output is correct |
24 |
Correct |
457 ms |
170656 KB |
Output is correct |
25 |
Correct |
32 ms |
37592 KB |
Output is correct |
26 |
Correct |
36 ms |
37844 KB |
Output is correct |
27 |
Correct |
8 ms |
9048 KB |
Output is correct |
28 |
Correct |
7 ms |
9816 KB |
Output is correct |
29 |
Correct |
7 ms |
9816 KB |
Output is correct |
30 |
Correct |
5 ms |
8024 KB |
Output is correct |
31 |
Correct |
4 ms |
8024 KB |
Output is correct |
32 |
Correct |
7 ms |
9048 KB |
Output is correct |
33 |
Correct |
7 ms |
9700 KB |
Output is correct |
34 |
Correct |
8 ms |
9816 KB |
Output is correct |
35 |
Correct |
4 ms |
8024 KB |
Output is correct |
36 |
Correct |
4 ms |
8024 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
211 ms |
33076 KB |
Output is correct |
2 |
Correct |
948 ms |
126528 KB |
Output is correct |
3 |
Correct |
902 ms |
126240 KB |
Output is correct |
4 |
Correct |
1127 ms |
170452 KB |
Output is correct |
5 |
Correct |
1113 ms |
170448 KB |
Output is correct |
6 |
Correct |
1042 ms |
170644 KB |
Output is correct |
7 |
Correct |
1060 ms |
170600 KB |
Output is correct |
8 |
Correct |
528 ms |
37592 KB |
Output is correct |
9 |
Correct |
592 ms |
37828 KB |
Output is correct |
10 |
Correct |
558 ms |
38104 KB |
Output is correct |
11 |
Correct |
589 ms |
37840 KB |
Output is correct |
12 |
Correct |
306 ms |
126144 KB |
Output is correct |
13 |
Correct |
447 ms |
170572 KB |
Output is correct |
14 |
Correct |
462 ms |
170416 KB |
Output is correct |
15 |
Correct |
34 ms |
37576 KB |
Output is correct |
16 |
Correct |
35 ms |
37592 KB |
Output is correct |
17 |
Correct |
275 ms |
122156 KB |
Output is correct |
18 |
Correct |
238 ms |
126412 KB |
Output is correct |
19 |
Correct |
278 ms |
126444 KB |
Output is correct |
20 |
Correct |
451 ms |
170448 KB |
Output is correct |
21 |
Correct |
454 ms |
170436 KB |
Output is correct |
22 |
Correct |
439 ms |
170656 KB |
Output is correct |
23 |
Correct |
536 ms |
170456 KB |
Output is correct |
24 |
Correct |
33 ms |
37592 KB |
Output is correct |
25 |
Correct |
33 ms |
37584 KB |
Output is correct |
26 |
Correct |
41 ms |
37584 KB |
Output is correct |
27 |
Correct |
35 ms |
37584 KB |
Output is correct |
28 |
Correct |
6 ms |
9048 KB |
Output is correct |
29 |
Correct |
7 ms |
9816 KB |
Output is correct |
30 |
Correct |
7 ms |
9816 KB |
Output is correct |
31 |
Correct |
4 ms |
8024 KB |
Output is correct |
32 |
Correct |
4 ms |
8024 KB |
Output is correct |
33 |
Correct |
5 ms |
8440 KB |
Output is correct |
34 |
Correct |
6 ms |
9048 KB |
Output is correct |
35 |
Correct |
6 ms |
9048 KB |
Output is correct |
36 |
Correct |
7 ms |
9812 KB |
Output is correct |
37 |
Correct |
8 ms |
9816 KB |
Output is correct |
38 |
Correct |
8 ms |
9816 KB |
Output is correct |
39 |
Correct |
9 ms |
9816 KB |
Output is correct |
40 |
Correct |
5 ms |
8024 KB |
Output is correct |
41 |
Correct |
5 ms |
8024 KB |
Output is correct |
42 |
Correct |
4 ms |
8024 KB |
Output is correct |
43 |
Correct |
4 ms |
8024 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
8024 KB |
Output is correct |
2 |
Correct |
6 ms |
9048 KB |
Output is correct |
3 |
Correct |
8 ms |
9048 KB |
Output is correct |
4 |
Correct |
8 ms |
9816 KB |
Output is correct |
5 |
Correct |
7 ms |
9816 KB |
Output is correct |
6 |
Correct |
7 ms |
10012 KB |
Output is correct |
7 |
Correct |
7 ms |
9688 KB |
Output is correct |
8 |
Correct |
6 ms |
8024 KB |
Output is correct |
9 |
Correct |
5 ms |
8024 KB |
Output is correct |
10 |
Correct |
4 ms |
8024 KB |
Output is correct |
11 |
Correct |
4 ms |
8024 KB |
Output is correct |
12 |
Correct |
5 ms |
7512 KB |
Output is correct |
13 |
Correct |
4 ms |
8024 KB |
Output is correct |
14 |
Correct |
4 ms |
8024 KB |
Output is correct |
15 |
Correct |
7 ms |
9048 KB |
Output is correct |
16 |
Correct |
8 ms |
9816 KB |
Output is correct |
17 |
Correct |
7 ms |
9816 KB |
Output is correct |
18 |
Correct |
4 ms |
8024 KB |
Output is correct |
19 |
Correct |
5 ms |
8024 KB |
Output is correct |
20 |
Correct |
6 ms |
9048 KB |
Output is correct |
21 |
Correct |
7 ms |
9824 KB |
Output is correct |
22 |
Correct |
8 ms |
9816 KB |
Output is correct |
23 |
Correct |
5 ms |
8020 KB |
Output is correct |
24 |
Correct |
4 ms |
8024 KB |
Output is correct |
25 |
Correct |
5 ms |
8024 KB |
Output is correct |
26 |
Correct |
7 ms |
9048 KB |
Output is correct |
27 |
Correct |
7 ms |
9048 KB |
Output is correct |
28 |
Correct |
8 ms |
9816 KB |
Output is correct |
29 |
Correct |
8 ms |
9816 KB |
Output is correct |
30 |
Correct |
7 ms |
9752 KB |
Output is correct |
31 |
Correct |
7 ms |
9816 KB |
Output is correct |
32 |
Correct |
4 ms |
8024 KB |
Output is correct |
33 |
Correct |
4 ms |
7824 KB |
Output is correct |
34 |
Correct |
6 ms |
8024 KB |
Output is correct |
35 |
Correct |
5 ms |
8024 KB |
Output is correct |
36 |
Correct |
140 ms |
81952 KB |
Output is correct |
37 |
Correct |
310 ms |
126576 KB |
Output is correct |
38 |
Correct |
278 ms |
125936 KB |
Output is correct |
39 |
Correct |
459 ms |
170708 KB |
Output is correct |
40 |
Correct |
372 ms |
170456 KB |
Output is correct |
41 |
Correct |
446 ms |
170532 KB |
Output is correct |
42 |
Correct |
435 ms |
170616 KB |
Output is correct |
43 |
Correct |
31 ms |
37600 KB |
Output is correct |
44 |
Correct |
32 ms |
37840 KB |
Output is correct |
45 |
Correct |
31 ms |
37628 KB |
Output is correct |
46 |
Correct |
30 ms |
37712 KB |
Output is correct |
47 |
Correct |
261 ms |
126020 KB |
Output is correct |
48 |
Correct |
436 ms |
170436 KB |
Output is correct |
49 |
Correct |
429 ms |
170700 KB |
Output is correct |
50 |
Correct |
35 ms |
37584 KB |
Output is correct |
51 |
Correct |
32 ms |
37588 KB |
Output is correct |
52 |
Correct |
275 ms |
126168 KB |
Output is correct |
53 |
Correct |
475 ms |
170608 KB |
Output is correct |
54 |
Correct |
423 ms |
170576 KB |
Output is correct |
55 |
Correct |
32 ms |
37588 KB |
Output is correct |
56 |
Correct |
33 ms |
37712 KB |
Output is correct |
57 |
Correct |
273 ms |
122156 KB |
Output is correct |
58 |
Correct |
272 ms |
126204 KB |
Output is correct |
59 |
Correct |
306 ms |
126620 KB |
Output is correct |
60 |
Correct |
471 ms |
170540 KB |
Output is correct |
61 |
Correct |
510 ms |
170668 KB |
Output is correct |
62 |
Correct |
436 ms |
170436 KB |
Output is correct |
63 |
Correct |
451 ms |
170440 KB |
Output is correct |
64 |
Correct |
33 ms |
37568 KB |
Output is correct |
65 |
Correct |
37 ms |
37604 KB |
Output is correct |
66 |
Correct |
36 ms |
37828 KB |
Output is correct |
67 |
Correct |
31 ms |
37848 KB |
Output is correct |
68 |
Correct |
848 ms |
125204 KB |
Output is correct |
69 |
Correct |
1152 ms |
126288 KB |
Output is correct |
70 |
Correct |
1086 ms |
126132 KB |
Output is correct |
71 |
Correct |
1224 ms |
170636 KB |
Output is correct |
72 |
Correct |
1204 ms |
170624 KB |
Output is correct |
73 |
Correct |
1220 ms |
170528 KB |
Output is correct |
74 |
Correct |
1210 ms |
170580 KB |
Output is correct |
75 |
Correct |
767 ms |
37588 KB |
Output is correct |
76 |
Correct |
809 ms |
37592 KB |
Output is correct |
77 |
Correct |
789 ms |
37848 KB |
Output is correct |
78 |
Correct |
789 ms |
37828 KB |
Output is correct |
79 |
Correct |
762 ms |
37576 KB |
Output is correct |
80 |
Correct |
741 ms |
37720 KB |
Output is correct |
81 |
Correct |
4 ms |
7512 KB |
Output is correct |
82 |
Correct |
5 ms |
8024 KB |
Output is correct |
83 |
Correct |
4 ms |
8024 KB |
Output is correct |
84 |
Correct |
289 ms |
126164 KB |
Output is correct |
85 |
Correct |
433 ms |
170540 KB |
Output is correct |
86 |
Correct |
423 ms |
170572 KB |
Output is correct |
87 |
Correct |
33 ms |
37812 KB |
Output is correct |
88 |
Correct |
31 ms |
37596 KB |
Output is correct |
89 |
Correct |
305 ms |
126144 KB |
Output is correct |
90 |
Correct |
431 ms |
170408 KB |
Output is correct |
91 |
Correct |
457 ms |
170656 KB |
Output is correct |
92 |
Correct |
32 ms |
37592 KB |
Output is correct |
93 |
Correct |
36 ms |
37844 KB |
Output is correct |
94 |
Correct |
8 ms |
9048 KB |
Output is correct |
95 |
Correct |
7 ms |
9816 KB |
Output is correct |
96 |
Correct |
7 ms |
9816 KB |
Output is correct |
97 |
Correct |
5 ms |
8024 KB |
Output is correct |
98 |
Correct |
4 ms |
8024 KB |
Output is correct |
99 |
Correct |
7 ms |
9048 KB |
Output is correct |
100 |
Correct |
7 ms |
9700 KB |
Output is correct |
101 |
Correct |
8 ms |
9816 KB |
Output is correct |
102 |
Correct |
4 ms |
8024 KB |
Output is correct |
103 |
Correct |
4 ms |
8024 KB |
Output is correct |
104 |
Correct |
902 ms |
112200 KB |
Output is correct |
105 |
Correct |
1078 ms |
125904 KB |
Output is correct |
106 |
Correct |
1022 ms |
126400 KB |
Output is correct |
107 |
Correct |
1340 ms |
170564 KB |
Output is correct |
108 |
Correct |
1298 ms |
170792 KB |
Output is correct |
109 |
Correct |
1208 ms |
170412 KB |
Output is correct |
110 |
Correct |
1239 ms |
170432 KB |
Output is correct |
111 |
Correct |
717 ms |
37772 KB |
Output is correct |
112 |
Correct |
798 ms |
37720 KB |
Output is correct |
113 |
Correct |
837 ms |
37640 KB |
Output is correct |
114 |
Correct |
788 ms |
37840 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
385 ms |
25148 KB |
Output is correct |
2 |
Correct |
820 ms |
37596 KB |
Output is correct |
3 |
Correct |
806 ms |
37572 KB |
Output is correct |
4 |
Correct |
815 ms |
37712 KB |
Output is correct |
5 |
Correct |
802 ms |
37668 KB |
Output is correct |
6 |
Correct |
781 ms |
37584 KB |
Output is correct |
7 |
Correct |
827 ms |
37568 KB |
Output is correct |
8 |
Correct |
5 ms |
7512 KB |
Output is correct |
9 |
Correct |
5 ms |
8024 KB |
Output is correct |
10 |
Correct |
4 ms |
8024 KB |
Output is correct |
11 |
Correct |
5 ms |
8024 KB |
Output is correct |
12 |
Correct |
6 ms |
9048 KB |
Output is correct |
13 |
Correct |
8 ms |
9048 KB |
Output is correct |
14 |
Correct |
8 ms |
9816 KB |
Output is correct |
15 |
Correct |
7 ms |
9816 KB |
Output is correct |
16 |
Correct |
7 ms |
10012 KB |
Output is correct |
17 |
Correct |
7 ms |
9688 KB |
Output is correct |
18 |
Correct |
6 ms |
8024 KB |
Output is correct |
19 |
Correct |
5 ms |
8024 KB |
Output is correct |
20 |
Correct |
4 ms |
8024 KB |
Output is correct |
21 |
Correct |
4 ms |
8024 KB |
Output is correct |
22 |
Correct |
5 ms |
7512 KB |
Output is correct |
23 |
Correct |
4 ms |
8024 KB |
Output is correct |
24 |
Correct |
4 ms |
8024 KB |
Output is correct |
25 |
Correct |
7 ms |
9048 KB |
Output is correct |
26 |
Correct |
8 ms |
9816 KB |
Output is correct |
27 |
Correct |
7 ms |
9816 KB |
Output is correct |
28 |
Correct |
4 ms |
8024 KB |
Output is correct |
29 |
Correct |
5 ms |
8024 KB |
Output is correct |
30 |
Correct |
6 ms |
9048 KB |
Output is correct |
31 |
Correct |
7 ms |
9824 KB |
Output is correct |
32 |
Correct |
8 ms |
9816 KB |
Output is correct |
33 |
Correct |
5 ms |
8020 KB |
Output is correct |
34 |
Correct |
4 ms |
8024 KB |
Output is correct |
35 |
Correct |
5 ms |
8024 KB |
Output is correct |
36 |
Correct |
7 ms |
9048 KB |
Output is correct |
37 |
Correct |
7 ms |
9048 KB |
Output is correct |
38 |
Correct |
8 ms |
9816 KB |
Output is correct |
39 |
Correct |
8 ms |
9816 KB |
Output is correct |
40 |
Correct |
7 ms |
9752 KB |
Output is correct |
41 |
Correct |
7 ms |
9816 KB |
Output is correct |
42 |
Correct |
4 ms |
8024 KB |
Output is correct |
43 |
Correct |
4 ms |
7824 KB |
Output is correct |
44 |
Correct |
6 ms |
8024 KB |
Output is correct |
45 |
Correct |
5 ms |
8024 KB |
Output is correct |
46 |
Correct |
140 ms |
81952 KB |
Output is correct |
47 |
Correct |
310 ms |
126576 KB |
Output is correct |
48 |
Correct |
278 ms |
125936 KB |
Output is correct |
49 |
Correct |
459 ms |
170708 KB |
Output is correct |
50 |
Correct |
372 ms |
170456 KB |
Output is correct |
51 |
Correct |
446 ms |
170532 KB |
Output is correct |
52 |
Correct |
435 ms |
170616 KB |
Output is correct |
53 |
Correct |
31 ms |
37600 KB |
Output is correct |
54 |
Correct |
32 ms |
37840 KB |
Output is correct |
55 |
Correct |
31 ms |
37628 KB |
Output is correct |
56 |
Correct |
30 ms |
37712 KB |
Output is correct |
57 |
Correct |
261 ms |
126020 KB |
Output is correct |
58 |
Correct |
436 ms |
170436 KB |
Output is correct |
59 |
Correct |
429 ms |
170700 KB |
Output is correct |
60 |
Correct |
35 ms |
37584 KB |
Output is correct |
61 |
Correct |
32 ms |
37588 KB |
Output is correct |
62 |
Correct |
275 ms |
126168 KB |
Output is correct |
63 |
Correct |
475 ms |
170608 KB |
Output is correct |
64 |
Correct |
423 ms |
170576 KB |
Output is correct |
65 |
Correct |
32 ms |
37588 KB |
Output is correct |
66 |
Correct |
33 ms |
37712 KB |
Output is correct |
67 |
Correct |
273 ms |
122156 KB |
Output is correct |
68 |
Correct |
272 ms |
126204 KB |
Output is correct |
69 |
Correct |
306 ms |
126620 KB |
Output is correct |
70 |
Correct |
471 ms |
170540 KB |
Output is correct |
71 |
Correct |
510 ms |
170668 KB |
Output is correct |
72 |
Correct |
436 ms |
170436 KB |
Output is correct |
73 |
Correct |
451 ms |
170440 KB |
Output is correct |
74 |
Correct |
33 ms |
37568 KB |
Output is correct |
75 |
Correct |
37 ms |
37604 KB |
Output is correct |
76 |
Correct |
36 ms |
37828 KB |
Output is correct |
77 |
Correct |
31 ms |
37848 KB |
Output is correct |
78 |
Correct |
848 ms |
125204 KB |
Output is correct |
79 |
Correct |
1152 ms |
126288 KB |
Output is correct |
80 |
Correct |
1086 ms |
126132 KB |
Output is correct |
81 |
Correct |
1224 ms |
170636 KB |
Output is correct |
82 |
Correct |
1204 ms |
170624 KB |
Output is correct |
83 |
Correct |
1220 ms |
170528 KB |
Output is correct |
84 |
Correct |
1210 ms |
170580 KB |
Output is correct |
85 |
Correct |
767 ms |
37588 KB |
Output is correct |
86 |
Correct |
809 ms |
37592 KB |
Output is correct |
87 |
Correct |
789 ms |
37848 KB |
Output is correct |
88 |
Correct |
789 ms |
37828 KB |
Output is correct |
89 |
Correct |
762 ms |
37576 KB |
Output is correct |
90 |
Correct |
741 ms |
37720 KB |
Output is correct |
91 |
Correct |
4 ms |
7512 KB |
Output is correct |
92 |
Correct |
5 ms |
8024 KB |
Output is correct |
93 |
Correct |
4 ms |
8024 KB |
Output is correct |
94 |
Correct |
289 ms |
126164 KB |
Output is correct |
95 |
Correct |
433 ms |
170540 KB |
Output is correct |
96 |
Correct |
423 ms |
170572 KB |
Output is correct |
97 |
Correct |
33 ms |
37812 KB |
Output is correct |
98 |
Correct |
31 ms |
37596 KB |
Output is correct |
99 |
Correct |
305 ms |
126144 KB |
Output is correct |
100 |
Correct |
431 ms |
170408 KB |
Output is correct |
101 |
Correct |
457 ms |
170656 KB |
Output is correct |
102 |
Correct |
32 ms |
37592 KB |
Output is correct |
103 |
Correct |
36 ms |
37844 KB |
Output is correct |
104 |
Correct |
8 ms |
9048 KB |
Output is correct |
105 |
Correct |
7 ms |
9816 KB |
Output is correct |
106 |
Correct |
7 ms |
9816 KB |
Output is correct |
107 |
Correct |
5 ms |
8024 KB |
Output is correct |
108 |
Correct |
4 ms |
8024 KB |
Output is correct |
109 |
Correct |
7 ms |
9048 KB |
Output is correct |
110 |
Correct |
7 ms |
9700 KB |
Output is correct |
111 |
Correct |
8 ms |
9816 KB |
Output is correct |
112 |
Correct |
4 ms |
8024 KB |
Output is correct |
113 |
Correct |
4 ms |
8024 KB |
Output is correct |
114 |
Correct |
211 ms |
33076 KB |
Output is correct |
115 |
Correct |
948 ms |
126528 KB |
Output is correct |
116 |
Correct |
902 ms |
126240 KB |
Output is correct |
117 |
Correct |
1127 ms |
170452 KB |
Output is correct |
118 |
Correct |
1113 ms |
170448 KB |
Output is correct |
119 |
Correct |
1042 ms |
170644 KB |
Output is correct |
120 |
Correct |
1060 ms |
170600 KB |
Output is correct |
121 |
Correct |
528 ms |
37592 KB |
Output is correct |
122 |
Correct |
592 ms |
37828 KB |
Output is correct |
123 |
Correct |
558 ms |
38104 KB |
Output is correct |
124 |
Correct |
589 ms |
37840 KB |
Output is correct |
125 |
Correct |
306 ms |
126144 KB |
Output is correct |
126 |
Correct |
447 ms |
170572 KB |
Output is correct |
127 |
Correct |
462 ms |
170416 KB |
Output is correct |
128 |
Correct |
34 ms |
37576 KB |
Output is correct |
129 |
Correct |
35 ms |
37592 KB |
Output is correct |
130 |
Correct |
275 ms |
122156 KB |
Output is correct |
131 |
Correct |
238 ms |
126412 KB |
Output is correct |
132 |
Correct |
278 ms |
126444 KB |
Output is correct |
133 |
Correct |
451 ms |
170448 KB |
Output is correct |
134 |
Correct |
454 ms |
170436 KB |
Output is correct |
135 |
Correct |
439 ms |
170656 KB |
Output is correct |
136 |
Correct |
536 ms |
170456 KB |
Output is correct |
137 |
Correct |
33 ms |
37592 KB |
Output is correct |
138 |
Correct |
33 ms |
37584 KB |
Output is correct |
139 |
Correct |
41 ms |
37584 KB |
Output is correct |
140 |
Correct |
35 ms |
37584 KB |
Output is correct |
141 |
Correct |
6 ms |
9048 KB |
Output is correct |
142 |
Correct |
7 ms |
9816 KB |
Output is correct |
143 |
Correct |
7 ms |
9816 KB |
Output is correct |
144 |
Correct |
4 ms |
8024 KB |
Output is correct |
145 |
Correct |
4 ms |
8024 KB |
Output is correct |
146 |
Correct |
5 ms |
8440 KB |
Output is correct |
147 |
Correct |
6 ms |
9048 KB |
Output is correct |
148 |
Correct |
6 ms |
9048 KB |
Output is correct |
149 |
Correct |
7 ms |
9812 KB |
Output is correct |
150 |
Correct |
8 ms |
9816 KB |
Output is correct |
151 |
Correct |
8 ms |
9816 KB |
Output is correct |
152 |
Correct |
9 ms |
9816 KB |
Output is correct |
153 |
Correct |
5 ms |
8024 KB |
Output is correct |
154 |
Correct |
5 ms |
8024 KB |
Output is correct |
155 |
Correct |
4 ms |
8024 KB |
Output is correct |
156 |
Correct |
4 ms |
8024 KB |
Output is correct |
157 |
Correct |
902 ms |
112200 KB |
Output is correct |
158 |
Correct |
1078 ms |
125904 KB |
Output is correct |
159 |
Correct |
1022 ms |
126400 KB |
Output is correct |
160 |
Correct |
1340 ms |
170564 KB |
Output is correct |
161 |
Correct |
1298 ms |
170792 KB |
Output is correct |
162 |
Correct |
1208 ms |
170412 KB |
Output is correct |
163 |
Correct |
1239 ms |
170432 KB |
Output is correct |
164 |
Correct |
717 ms |
37772 KB |
Output is correct |
165 |
Correct |
798 ms |
37720 KB |
Output is correct |
166 |
Correct |
837 ms |
37640 KB |
Output is correct |
167 |
Correct |
788 ms |
37840 KB |
Output is correct |
168 |
Correct |
3 ms |
7512 KB |
Output is correct |
169 |
Correct |
725 ms |
45400 KB |
Output is correct |
170 |
Correct |
1483 ms |
125756 KB |
Output is correct |
171 |
Correct |
1517 ms |
126324 KB |
Output is correct |
172 |
Correct |
1737 ms |
170432 KB |
Output is correct |
173 |
Correct |
1713 ms |
170564 KB |
Output is correct |
174 |
Correct |
1769 ms |
170700 KB |
Output is correct |
175 |
Correct |
1586 ms |
170452 KB |
Output is correct |
176 |
Correct |
774 ms |
37688 KB |
Output is correct |
177 |
Correct |
847 ms |
37592 KB |
Output is correct |
178 |
Correct |
798 ms |
37840 KB |
Output is correct |
179 |
Correct |
825 ms |
37844 KB |
Output is correct |