#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<P> vp;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define REP(i,k,n) for(ll i=(ll)(k);i<(ll)(n);i++)
#define all(a) a.begin(),a.end()
#define fi first
#define se second
#define pb emplace_back
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
template<class T> bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;}
template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;}
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<'\n';}
const ll inf=1001001001001;
#include "towers.h"
struct Sparsetable{
ll n;
vvi tablema,tablemi;
vi sz;
void init(vi v){
n=v.size();
tablema=vvi(18,vi(n));tablemi=vvi(18,vi(n));
tablema[0]=tablemi[0]=v;
rep(i,17)rep(j,n)if(j+(1<<(i+1))<=n){
tablema[i+1][j]=max(tablema[i][j],tablema[i][j+(1<<i)]);
tablemi[i+1][j]=min(tablemi[i][j],tablemi[i][j+(1<<i)]);
}
sz=vi(n+1);
rep(i,18)REP(j,1<<i,1<<(i+1))if(j<=n)sz[j]=i;
}
ll getma(ll l,ll r){
if(l>=r)return -inf;
// ll res=-inf;
// REP(i,l,r)chmax(res,tablema[0][i]);
// return res;
///////////////////////////////////////////////////////////
ll s=sz[r-l];
return max(tablema[s][l],tablema[s][r-(1<<s)]);
}
ll getmi(ll l,ll r){
if(l>=r)return inf;
// ll res=inf;
// REP(i,l,r)chmin(res,tablemi[0][i]);
// return res;
///////////////////////////////////////////////////////////
ll s=sz[r-l];
return min(tablemi[s][l],tablemi[s][r-(1<<s)]);
}
};
vi v,sp,dif;
vvi L,R;
ll n,m;
Sparsetable sps;
void init(int N,vector<int> H){
for(int x:H)v.pb(-x);
sps.init(v);
n=N;
rep(i,n)if((i==0||v[i-1]>v[i])&&(i==n-1||v[i+1]>v[i]))sp.pb(i);
m=sp.size();
L=vvi(18,vi(m,-1));R=vvi(18,vi(m,-1));
{
vi st;
for(int i=m-1;i>=0;i--){
while(st.size()&&v[sp[st.back()]]>v[sp[i]])st.pop_back();
if(st.size())R[0][i]=st.back();
st.pb(i);
}
}
{
vi st;
rep(i,m){
while(st.size()&&v[sp[st.back()]]>v[sp[i]])st.pop_back();
if(st.size())L[0][i]=st.back();
st.pb(i);
}
}
rep(i,17)rep(j,m)if(L[i][j]!=-1)L[i+1][j]=L[i][L[i][j]];
rep(i,17)rep(j,m)if(R[i][j]!=-1)R[i+1][j]=R[i][R[i][j]];
dif=vi(m);
rep(i,m){
P rng;
rng.fi=(L[0][i]==-1 ? 0 : sp[L[0][i]]+1);
rng.se=(R[0][i]==-1 ? n-1 : sp[R[0][i]]-1);
ll ma=min(sps.getma(rng.fi,sp[i]),sps.getma(sp[i]+1,rng.se+1));
dif[i]=ma-v[sp[i]];
}
}
int max_towers(int a, int b, int D){
ll l=lb(sp,a),r=lb(sp,b+1)-1;
if(l>r)return 1;
ll l_=l,r_=r;
if(sps.getma(a,sp[l])<v[sp[l]]+D){
l_=l+1;
ll cur=l;
for(ll i=17;i>=0;i--){
ll ncur=R[i][cur];
if(ncur!=-1&&ncur<=r&&sps.getma(a,sp[ncur])<v[sp[ncur]]+D){
cur=ncur;
l_=cur+1;
}
}
}
if(sps.getma(sp[r]+1,b+1)<v[sp[r]]+D){
r_=r-1;
ll cur=r;
for(ll i=17;i>=0;i--){
ll ncur=L[i][cur];
if(ncur!=-1&&ncur>=l&&sps.getma(sp[ncur]+1,b+1)<v[sp[ncur]]+D){
cur=ncur;
r_=cur-1;
}
}
}
int ans=0;
REP(i,l_,r_+1)if(dif[i]>=D)ans++;
return ans+1;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
333 ms |
19004 KB |
Output is correct |
2 |
Correct |
675 ms |
31644 KB |
Output is correct |
3 |
Correct |
742 ms |
31620 KB |
Output is correct |
4 |
Correct |
739 ms |
31612 KB |
Output is correct |
5 |
Correct |
831 ms |
31660 KB |
Output is correct |
6 |
Correct |
688 ms |
31532 KB |
Output is correct |
7 |
Correct |
787 ms |
31668 KB |
Output is correct |
8 |
Correct |
1 ms |
208 KB |
Output is correct |
9 |
Correct |
1 ms |
848 KB |
Output is correct |
10 |
Correct |
1 ms |
848 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
464 KB |
Output is correct |
2 |
Correct |
1 ms |
1104 KB |
Output is correct |
3 |
Correct |
2 ms |
1048 KB |
Output is correct |
4 |
Correct |
1 ms |
1104 KB |
Output is correct |
5 |
Correct |
1 ms |
1104 KB |
Output is correct |
6 |
Correct |
1 ms |
1104 KB |
Output is correct |
7 |
Correct |
1 ms |
1104 KB |
Output is correct |
8 |
Correct |
1 ms |
848 KB |
Output is correct |
9 |
Correct |
1 ms |
848 KB |
Output is correct |
10 |
Correct |
1 ms |
848 KB |
Output is correct |
11 |
Correct |
1 ms |
848 KB |
Output is correct |
12 |
Correct |
0 ms |
208 KB |
Output is correct |
13 |
Correct |
1 ms |
848 KB |
Output is correct |
14 |
Correct |
2 ms |
848 KB |
Output is correct |
15 |
Correct |
2 ms |
1104 KB |
Output is correct |
16 |
Correct |
2 ms |
1104 KB |
Output is correct |
17 |
Correct |
1 ms |
1104 KB |
Output is correct |
18 |
Correct |
2 ms |
848 KB |
Output is correct |
19 |
Correct |
1 ms |
848 KB |
Output is correct |
20 |
Correct |
2 ms |
1104 KB |
Output is correct |
21 |
Correct |
1 ms |
1232 KB |
Output is correct |
22 |
Correct |
1 ms |
1160 KB |
Output is correct |
23 |
Correct |
1 ms |
848 KB |
Output is correct |
24 |
Correct |
1 ms |
848 KB |
Output is correct |
25 |
Correct |
1 ms |
592 KB |
Output is correct |
26 |
Correct |
1 ms |
1104 KB |
Output is correct |
27 |
Correct |
1 ms |
1104 KB |
Output is correct |
28 |
Correct |
1 ms |
1104 KB |
Output is correct |
29 |
Correct |
1 ms |
1104 KB |
Output is correct |
30 |
Correct |
1 ms |
1104 KB |
Output is correct |
31 |
Correct |
2 ms |
1104 KB |
Output is correct |
32 |
Correct |
1 ms |
848 KB |
Output is correct |
33 |
Correct |
1 ms |
928 KB |
Output is correct |
34 |
Correct |
1 ms |
848 KB |
Output is correct |
35 |
Correct |
2 ms |
848 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
464 KB |
Output is correct |
2 |
Correct |
1 ms |
1104 KB |
Output is correct |
3 |
Correct |
2 ms |
1048 KB |
Output is correct |
4 |
Correct |
1 ms |
1104 KB |
Output is correct |
5 |
Correct |
1 ms |
1104 KB |
Output is correct |
6 |
Correct |
1 ms |
1104 KB |
Output is correct |
7 |
Correct |
1 ms |
1104 KB |
Output is correct |
8 |
Correct |
1 ms |
848 KB |
Output is correct |
9 |
Correct |
1 ms |
848 KB |
Output is correct |
10 |
Correct |
1 ms |
848 KB |
Output is correct |
11 |
Correct |
1 ms |
848 KB |
Output is correct |
12 |
Correct |
0 ms |
208 KB |
Output is correct |
13 |
Correct |
1 ms |
848 KB |
Output is correct |
14 |
Correct |
2 ms |
848 KB |
Output is correct |
15 |
Correct |
2 ms |
1104 KB |
Output is correct |
16 |
Correct |
2 ms |
1104 KB |
Output is correct |
17 |
Correct |
1 ms |
1104 KB |
Output is correct |
18 |
Correct |
2 ms |
848 KB |
Output is correct |
19 |
Correct |
1 ms |
848 KB |
Output is correct |
20 |
Correct |
2 ms |
1104 KB |
Output is correct |
21 |
Correct |
1 ms |
1232 KB |
Output is correct |
22 |
Correct |
1 ms |
1160 KB |
Output is correct |
23 |
Correct |
1 ms |
848 KB |
Output is correct |
24 |
Correct |
1 ms |
848 KB |
Output is correct |
25 |
Correct |
1 ms |
592 KB |
Output is correct |
26 |
Correct |
1 ms |
1104 KB |
Output is correct |
27 |
Correct |
1 ms |
1104 KB |
Output is correct |
28 |
Correct |
1 ms |
1104 KB |
Output is correct |
29 |
Correct |
1 ms |
1104 KB |
Output is correct |
30 |
Correct |
1 ms |
1104 KB |
Output is correct |
31 |
Correct |
2 ms |
1104 KB |
Output is correct |
32 |
Correct |
1 ms |
848 KB |
Output is correct |
33 |
Correct |
1 ms |
928 KB |
Output is correct |
34 |
Correct |
1 ms |
848 KB |
Output is correct |
35 |
Correct |
2 ms |
848 KB |
Output is correct |
36 |
Correct |
19 ms |
26660 KB |
Output is correct |
37 |
Correct |
33 ms |
40984 KB |
Output is correct |
38 |
Correct |
35 ms |
41040 KB |
Output is correct |
39 |
Correct |
36 ms |
45852 KB |
Output is correct |
40 |
Correct |
35 ms |
45872 KB |
Output is correct |
41 |
Correct |
32 ms |
45828 KB |
Output is correct |
42 |
Correct |
47 ms |
45788 KB |
Output is correct |
43 |
Correct |
25 ms |
31636 KB |
Output is correct |
44 |
Correct |
24 ms |
31532 KB |
Output is correct |
45 |
Correct |
34 ms |
31636 KB |
Output is correct |
46 |
Correct |
27 ms |
31664 KB |
Output is correct |
47 |
Correct |
34 ms |
41024 KB |
Output is correct |
48 |
Correct |
36 ms |
45832 KB |
Output is correct |
49 |
Correct |
33 ms |
45756 KB |
Output is correct |
50 |
Correct |
24 ms |
31640 KB |
Output is correct |
51 |
Correct |
23 ms |
31612 KB |
Output is correct |
52 |
Correct |
48 ms |
40964 KB |
Output is correct |
53 |
Correct |
32 ms |
45852 KB |
Output is correct |
54 |
Correct |
35 ms |
45784 KB |
Output is correct |
55 |
Correct |
33 ms |
31604 KB |
Output is correct |
56 |
Correct |
28 ms |
31532 KB |
Output is correct |
57 |
Correct |
35 ms |
39284 KB |
Output is correct |
58 |
Correct |
35 ms |
40964 KB |
Output is correct |
59 |
Correct |
36 ms |
40964 KB |
Output is correct |
60 |
Correct |
39 ms |
45832 KB |
Output is correct |
61 |
Correct |
35 ms |
45868 KB |
Output is correct |
62 |
Correct |
32 ms |
45796 KB |
Output is correct |
63 |
Correct |
49 ms |
45856 KB |
Output is correct |
64 |
Correct |
27 ms |
31612 KB |
Output is correct |
65 |
Correct |
30 ms |
31552 KB |
Output is correct |
66 |
Correct |
24 ms |
31660 KB |
Output is correct |
67 |
Correct |
23 ms |
31660 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1335 ms |
40624 KB |
Output is correct |
2 |
Correct |
1513 ms |
40944 KB |
Output is correct |
3 |
Correct |
1425 ms |
40988 KB |
Output is correct |
4 |
Correct |
1930 ms |
45832 KB |
Output is correct |
5 |
Correct |
1907 ms |
45852 KB |
Output is correct |
6 |
Correct |
2083 ms |
45852 KB |
Output is correct |
7 |
Correct |
2017 ms |
45792 KB |
Output is correct |
8 |
Correct |
599 ms |
31668 KB |
Output is correct |
9 |
Correct |
593 ms |
31680 KB |
Output is correct |
10 |
Correct |
730 ms |
31532 KB |
Output is correct |
11 |
Correct |
710 ms |
31660 KB |
Output is correct |
12 |
Correct |
619 ms |
31660 KB |
Output is correct |
13 |
Correct |
764 ms |
31600 KB |
Output is correct |
14 |
Correct |
1 ms |
208 KB |
Output is correct |
15 |
Correct |
1 ms |
848 KB |
Output is correct |
16 |
Correct |
1 ms |
848 KB |
Output is correct |
17 |
Correct |
40 ms |
40944 KB |
Output is correct |
18 |
Correct |
37 ms |
45812 KB |
Output is correct |
19 |
Correct |
39 ms |
45804 KB |
Output is correct |
20 |
Correct |
27 ms |
31640 KB |
Output is correct |
21 |
Correct |
30 ms |
31636 KB |
Output is correct |
22 |
Correct |
39 ms |
40972 KB |
Output is correct |
23 |
Correct |
43 ms |
45820 KB |
Output is correct |
24 |
Correct |
37 ms |
45784 KB |
Output is correct |
25 |
Correct |
26 ms |
31532 KB |
Output is correct |
26 |
Correct |
27 ms |
31668 KB |
Output is correct |
27 |
Correct |
1 ms |
1104 KB |
Output is correct |
28 |
Correct |
1 ms |
1104 KB |
Output is correct |
29 |
Correct |
1 ms |
1104 KB |
Output is correct |
30 |
Correct |
1 ms |
848 KB |
Output is correct |
31 |
Correct |
1 ms |
848 KB |
Output is correct |
32 |
Correct |
1 ms |
1104 KB |
Output is correct |
33 |
Correct |
1 ms |
1104 KB |
Output is correct |
34 |
Correct |
1 ms |
1104 KB |
Output is correct |
35 |
Correct |
1 ms |
848 KB |
Output is correct |
36 |
Correct |
1 ms |
848 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
939 ms |
10116 KB |
Output is correct |
2 |
Execution timed out |
4059 ms |
40988 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
464 KB |
Output is correct |
2 |
Correct |
1 ms |
1104 KB |
Output is correct |
3 |
Correct |
2 ms |
1048 KB |
Output is correct |
4 |
Correct |
1 ms |
1104 KB |
Output is correct |
5 |
Correct |
1 ms |
1104 KB |
Output is correct |
6 |
Correct |
1 ms |
1104 KB |
Output is correct |
7 |
Correct |
1 ms |
1104 KB |
Output is correct |
8 |
Correct |
1 ms |
848 KB |
Output is correct |
9 |
Correct |
1 ms |
848 KB |
Output is correct |
10 |
Correct |
1 ms |
848 KB |
Output is correct |
11 |
Correct |
1 ms |
848 KB |
Output is correct |
12 |
Correct |
0 ms |
208 KB |
Output is correct |
13 |
Correct |
1 ms |
848 KB |
Output is correct |
14 |
Correct |
2 ms |
848 KB |
Output is correct |
15 |
Correct |
2 ms |
1104 KB |
Output is correct |
16 |
Correct |
2 ms |
1104 KB |
Output is correct |
17 |
Correct |
1 ms |
1104 KB |
Output is correct |
18 |
Correct |
2 ms |
848 KB |
Output is correct |
19 |
Correct |
1 ms |
848 KB |
Output is correct |
20 |
Correct |
2 ms |
1104 KB |
Output is correct |
21 |
Correct |
1 ms |
1232 KB |
Output is correct |
22 |
Correct |
1 ms |
1160 KB |
Output is correct |
23 |
Correct |
1 ms |
848 KB |
Output is correct |
24 |
Correct |
1 ms |
848 KB |
Output is correct |
25 |
Correct |
1 ms |
592 KB |
Output is correct |
26 |
Correct |
1 ms |
1104 KB |
Output is correct |
27 |
Correct |
1 ms |
1104 KB |
Output is correct |
28 |
Correct |
1 ms |
1104 KB |
Output is correct |
29 |
Correct |
1 ms |
1104 KB |
Output is correct |
30 |
Correct |
1 ms |
1104 KB |
Output is correct |
31 |
Correct |
2 ms |
1104 KB |
Output is correct |
32 |
Correct |
1 ms |
848 KB |
Output is correct |
33 |
Correct |
1 ms |
928 KB |
Output is correct |
34 |
Correct |
1 ms |
848 KB |
Output is correct |
35 |
Correct |
2 ms |
848 KB |
Output is correct |
36 |
Correct |
19 ms |
26660 KB |
Output is correct |
37 |
Correct |
33 ms |
40984 KB |
Output is correct |
38 |
Correct |
35 ms |
41040 KB |
Output is correct |
39 |
Correct |
36 ms |
45852 KB |
Output is correct |
40 |
Correct |
35 ms |
45872 KB |
Output is correct |
41 |
Correct |
32 ms |
45828 KB |
Output is correct |
42 |
Correct |
47 ms |
45788 KB |
Output is correct |
43 |
Correct |
25 ms |
31636 KB |
Output is correct |
44 |
Correct |
24 ms |
31532 KB |
Output is correct |
45 |
Correct |
34 ms |
31636 KB |
Output is correct |
46 |
Correct |
27 ms |
31664 KB |
Output is correct |
47 |
Correct |
34 ms |
41024 KB |
Output is correct |
48 |
Correct |
36 ms |
45832 KB |
Output is correct |
49 |
Correct |
33 ms |
45756 KB |
Output is correct |
50 |
Correct |
24 ms |
31640 KB |
Output is correct |
51 |
Correct |
23 ms |
31612 KB |
Output is correct |
52 |
Correct |
48 ms |
40964 KB |
Output is correct |
53 |
Correct |
32 ms |
45852 KB |
Output is correct |
54 |
Correct |
35 ms |
45784 KB |
Output is correct |
55 |
Correct |
33 ms |
31604 KB |
Output is correct |
56 |
Correct |
28 ms |
31532 KB |
Output is correct |
57 |
Correct |
35 ms |
39284 KB |
Output is correct |
58 |
Correct |
35 ms |
40964 KB |
Output is correct |
59 |
Correct |
36 ms |
40964 KB |
Output is correct |
60 |
Correct |
39 ms |
45832 KB |
Output is correct |
61 |
Correct |
35 ms |
45868 KB |
Output is correct |
62 |
Correct |
32 ms |
45796 KB |
Output is correct |
63 |
Correct |
49 ms |
45856 KB |
Output is correct |
64 |
Correct |
27 ms |
31612 KB |
Output is correct |
65 |
Correct |
30 ms |
31552 KB |
Output is correct |
66 |
Correct |
24 ms |
31660 KB |
Output is correct |
67 |
Correct |
23 ms |
31660 KB |
Output is correct |
68 |
Correct |
1335 ms |
40624 KB |
Output is correct |
69 |
Correct |
1513 ms |
40944 KB |
Output is correct |
70 |
Correct |
1425 ms |
40988 KB |
Output is correct |
71 |
Correct |
1930 ms |
45832 KB |
Output is correct |
72 |
Correct |
1907 ms |
45852 KB |
Output is correct |
73 |
Correct |
2083 ms |
45852 KB |
Output is correct |
74 |
Correct |
2017 ms |
45792 KB |
Output is correct |
75 |
Correct |
599 ms |
31668 KB |
Output is correct |
76 |
Correct |
593 ms |
31680 KB |
Output is correct |
77 |
Correct |
730 ms |
31532 KB |
Output is correct |
78 |
Correct |
710 ms |
31660 KB |
Output is correct |
79 |
Correct |
619 ms |
31660 KB |
Output is correct |
80 |
Correct |
764 ms |
31600 KB |
Output is correct |
81 |
Correct |
1 ms |
208 KB |
Output is correct |
82 |
Correct |
1 ms |
848 KB |
Output is correct |
83 |
Correct |
1 ms |
848 KB |
Output is correct |
84 |
Correct |
40 ms |
40944 KB |
Output is correct |
85 |
Correct |
37 ms |
45812 KB |
Output is correct |
86 |
Correct |
39 ms |
45804 KB |
Output is correct |
87 |
Correct |
27 ms |
31640 KB |
Output is correct |
88 |
Correct |
30 ms |
31636 KB |
Output is correct |
89 |
Correct |
39 ms |
40972 KB |
Output is correct |
90 |
Correct |
43 ms |
45820 KB |
Output is correct |
91 |
Correct |
37 ms |
45784 KB |
Output is correct |
92 |
Correct |
26 ms |
31532 KB |
Output is correct |
93 |
Correct |
27 ms |
31668 KB |
Output is correct |
94 |
Correct |
1 ms |
1104 KB |
Output is correct |
95 |
Correct |
1 ms |
1104 KB |
Output is correct |
96 |
Correct |
1 ms |
1104 KB |
Output is correct |
97 |
Correct |
1 ms |
848 KB |
Output is correct |
98 |
Correct |
1 ms |
848 KB |
Output is correct |
99 |
Correct |
1 ms |
1104 KB |
Output is correct |
100 |
Correct |
1 ms |
1104 KB |
Output is correct |
101 |
Correct |
1 ms |
1104 KB |
Output is correct |
102 |
Correct |
1 ms |
848 KB |
Output is correct |
103 |
Correct |
1 ms |
848 KB |
Output is correct |
104 |
Correct |
1558 ms |
36308 KB |
Output is correct |
105 |
Correct |
3207 ms |
40976 KB |
Output is correct |
106 |
Execution timed out |
4030 ms |
40988 KB |
Time limit exceeded |
107 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
333 ms |
19004 KB |
Output is correct |
2 |
Correct |
675 ms |
31644 KB |
Output is correct |
3 |
Correct |
742 ms |
31620 KB |
Output is correct |
4 |
Correct |
739 ms |
31612 KB |
Output is correct |
5 |
Correct |
831 ms |
31660 KB |
Output is correct |
6 |
Correct |
688 ms |
31532 KB |
Output is correct |
7 |
Correct |
787 ms |
31668 KB |
Output is correct |
8 |
Correct |
1 ms |
208 KB |
Output is correct |
9 |
Correct |
1 ms |
848 KB |
Output is correct |
10 |
Correct |
1 ms |
848 KB |
Output is correct |
11 |
Correct |
1 ms |
464 KB |
Output is correct |
12 |
Correct |
1 ms |
1104 KB |
Output is correct |
13 |
Correct |
2 ms |
1048 KB |
Output is correct |
14 |
Correct |
1 ms |
1104 KB |
Output is correct |
15 |
Correct |
1 ms |
1104 KB |
Output is correct |
16 |
Correct |
1 ms |
1104 KB |
Output is correct |
17 |
Correct |
1 ms |
1104 KB |
Output is correct |
18 |
Correct |
1 ms |
848 KB |
Output is correct |
19 |
Correct |
1 ms |
848 KB |
Output is correct |
20 |
Correct |
1 ms |
848 KB |
Output is correct |
21 |
Correct |
1 ms |
848 KB |
Output is correct |
22 |
Correct |
0 ms |
208 KB |
Output is correct |
23 |
Correct |
1 ms |
848 KB |
Output is correct |
24 |
Correct |
2 ms |
848 KB |
Output is correct |
25 |
Correct |
2 ms |
1104 KB |
Output is correct |
26 |
Correct |
2 ms |
1104 KB |
Output is correct |
27 |
Correct |
1 ms |
1104 KB |
Output is correct |
28 |
Correct |
2 ms |
848 KB |
Output is correct |
29 |
Correct |
1 ms |
848 KB |
Output is correct |
30 |
Correct |
2 ms |
1104 KB |
Output is correct |
31 |
Correct |
1 ms |
1232 KB |
Output is correct |
32 |
Correct |
1 ms |
1160 KB |
Output is correct |
33 |
Correct |
1 ms |
848 KB |
Output is correct |
34 |
Correct |
1 ms |
848 KB |
Output is correct |
35 |
Correct |
1 ms |
592 KB |
Output is correct |
36 |
Correct |
1 ms |
1104 KB |
Output is correct |
37 |
Correct |
1 ms |
1104 KB |
Output is correct |
38 |
Correct |
1 ms |
1104 KB |
Output is correct |
39 |
Correct |
1 ms |
1104 KB |
Output is correct |
40 |
Correct |
1 ms |
1104 KB |
Output is correct |
41 |
Correct |
2 ms |
1104 KB |
Output is correct |
42 |
Correct |
1 ms |
848 KB |
Output is correct |
43 |
Correct |
1 ms |
928 KB |
Output is correct |
44 |
Correct |
1 ms |
848 KB |
Output is correct |
45 |
Correct |
2 ms |
848 KB |
Output is correct |
46 |
Correct |
19 ms |
26660 KB |
Output is correct |
47 |
Correct |
33 ms |
40984 KB |
Output is correct |
48 |
Correct |
35 ms |
41040 KB |
Output is correct |
49 |
Correct |
36 ms |
45852 KB |
Output is correct |
50 |
Correct |
35 ms |
45872 KB |
Output is correct |
51 |
Correct |
32 ms |
45828 KB |
Output is correct |
52 |
Correct |
47 ms |
45788 KB |
Output is correct |
53 |
Correct |
25 ms |
31636 KB |
Output is correct |
54 |
Correct |
24 ms |
31532 KB |
Output is correct |
55 |
Correct |
34 ms |
31636 KB |
Output is correct |
56 |
Correct |
27 ms |
31664 KB |
Output is correct |
57 |
Correct |
34 ms |
41024 KB |
Output is correct |
58 |
Correct |
36 ms |
45832 KB |
Output is correct |
59 |
Correct |
33 ms |
45756 KB |
Output is correct |
60 |
Correct |
24 ms |
31640 KB |
Output is correct |
61 |
Correct |
23 ms |
31612 KB |
Output is correct |
62 |
Correct |
48 ms |
40964 KB |
Output is correct |
63 |
Correct |
32 ms |
45852 KB |
Output is correct |
64 |
Correct |
35 ms |
45784 KB |
Output is correct |
65 |
Correct |
33 ms |
31604 KB |
Output is correct |
66 |
Correct |
28 ms |
31532 KB |
Output is correct |
67 |
Correct |
35 ms |
39284 KB |
Output is correct |
68 |
Correct |
35 ms |
40964 KB |
Output is correct |
69 |
Correct |
36 ms |
40964 KB |
Output is correct |
70 |
Correct |
39 ms |
45832 KB |
Output is correct |
71 |
Correct |
35 ms |
45868 KB |
Output is correct |
72 |
Correct |
32 ms |
45796 KB |
Output is correct |
73 |
Correct |
49 ms |
45856 KB |
Output is correct |
74 |
Correct |
27 ms |
31612 KB |
Output is correct |
75 |
Correct |
30 ms |
31552 KB |
Output is correct |
76 |
Correct |
24 ms |
31660 KB |
Output is correct |
77 |
Correct |
23 ms |
31660 KB |
Output is correct |
78 |
Correct |
1335 ms |
40624 KB |
Output is correct |
79 |
Correct |
1513 ms |
40944 KB |
Output is correct |
80 |
Correct |
1425 ms |
40988 KB |
Output is correct |
81 |
Correct |
1930 ms |
45832 KB |
Output is correct |
82 |
Correct |
1907 ms |
45852 KB |
Output is correct |
83 |
Correct |
2083 ms |
45852 KB |
Output is correct |
84 |
Correct |
2017 ms |
45792 KB |
Output is correct |
85 |
Correct |
599 ms |
31668 KB |
Output is correct |
86 |
Correct |
593 ms |
31680 KB |
Output is correct |
87 |
Correct |
730 ms |
31532 KB |
Output is correct |
88 |
Correct |
710 ms |
31660 KB |
Output is correct |
89 |
Correct |
619 ms |
31660 KB |
Output is correct |
90 |
Correct |
764 ms |
31600 KB |
Output is correct |
91 |
Correct |
1 ms |
208 KB |
Output is correct |
92 |
Correct |
1 ms |
848 KB |
Output is correct |
93 |
Correct |
1 ms |
848 KB |
Output is correct |
94 |
Correct |
40 ms |
40944 KB |
Output is correct |
95 |
Correct |
37 ms |
45812 KB |
Output is correct |
96 |
Correct |
39 ms |
45804 KB |
Output is correct |
97 |
Correct |
27 ms |
31640 KB |
Output is correct |
98 |
Correct |
30 ms |
31636 KB |
Output is correct |
99 |
Correct |
39 ms |
40972 KB |
Output is correct |
100 |
Correct |
43 ms |
45820 KB |
Output is correct |
101 |
Correct |
37 ms |
45784 KB |
Output is correct |
102 |
Correct |
26 ms |
31532 KB |
Output is correct |
103 |
Correct |
27 ms |
31668 KB |
Output is correct |
104 |
Correct |
1 ms |
1104 KB |
Output is correct |
105 |
Correct |
1 ms |
1104 KB |
Output is correct |
106 |
Correct |
1 ms |
1104 KB |
Output is correct |
107 |
Correct |
1 ms |
848 KB |
Output is correct |
108 |
Correct |
1 ms |
848 KB |
Output is correct |
109 |
Correct |
1 ms |
1104 KB |
Output is correct |
110 |
Correct |
1 ms |
1104 KB |
Output is correct |
111 |
Correct |
1 ms |
1104 KB |
Output is correct |
112 |
Correct |
1 ms |
848 KB |
Output is correct |
113 |
Correct |
1 ms |
848 KB |
Output is correct |
114 |
Correct |
939 ms |
10116 KB |
Output is correct |
115 |
Execution timed out |
4059 ms |
40988 KB |
Time limit exceeded |
116 |
Halted |
0 ms |
0 KB |
- |