#include "closing.h"
#include <bits/stdc++.h>
#define pb push_back
#define fst first
#define snd second
#define fore(i,a,b) for(ll i=a,jet=b;i<jet;++i)
#define SZ(x) ((int)x.size())
#define ALL(x) x.begin(),x.end()
#define mset(a,v) memset((a),(v),sizeof(a))
#define FIN ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define imp(v) {for(auto gdljh:v)cout<<gdljh<<" "; cout<<"\n";}
using namespace std;
typedef long long ll;
typedef pair<ll,ll> ii;
const ll MAXN=2e5+5,INF=1e15;
vector<ll> d[2];
ll b[MAXN][2];
ll n,k;
vector<ii> g[MAXN];
void dfs(ll x, vector<ll> &d){
for(auto [y,w]:g[x])if(d[y]==-1){
d[y]=d[x]+w;
dfs(y,d);
}
}
ll disjoint(){
vector<ll>v;
fore(i,0,n)v.pb(b[i][0]);
sort(ALL(v));
ll ki=0,res=0;
// imp(v);
fore(i,0,SZ(v)){
if(ki+v[i]<=k)res++,ki+=v[i];
}
return res;
}
vector<ll>a;
ll dfs1(ll x, ll e, ll fa=-1){
a.pb(x);
if(x==e)return 1;
for(auto [y,w]:g[x])if(y!=fa&&dfs1(y,e,x))return 1;
a.pop_back();
return 0;
}
vector<vector<ll>>h;
ll m;
void dfs2(ll x, ll fa=-1){
ll i=SZ(h)-1;
if((i&&x==a[i-1])||(i<m-1&&x==a[i+1]))return;
h[i].pb(x);
for(auto [y,w]:g[x])if(y!=fa)dfs2(y,x);
}
vector<vector<ll>>val;
bool can(ll c){
// cout<<"can "<<c<<":\n";
vector<vector<ll>>dp(m+1,vector<ll>(c+1,INF));
// fore(s,0,c+1)dp[m][s]=INF;
dp[m][0]=0;
for(ll i=m-1;i>=0;i--)fore(s,0,c+1){
ll &res=dp[i][s];
// res=INF;
fore(j,1,SZ(val[i])){
if(s>=j)res=min(res,val[i][j]+dp[i+1][s-j]);
}
// cout<<i<<" "<<s<<": "<<res<<"\n";
}
// cout<<dp[0][c]<<"\n\n";
return dp[0][c]<=k;
}
int max_score(int N, int x, int y, long long K,
std::vector<int> U, std::vector<int> V, std::vector<int> W)
{
n=N,k=K;
fore(i,0,n){
g[i].clear();
}
h.clear();
val.clear();
a.clear();
fore(i,0,n-1){
g[U[i]].pb({V[i],W[i]});
g[V[i]].pb({U[i],W[i]});
}
d[0]=d[1]=vector<ll>(n,-1);
d[0][x]=0; dfs(x,d[0]);
d[1][y]=0; dfs(y,d[1]);
fore(i,0,n){
auto &x=b[i][0],&y=b[i][1];
x=d[0][i];
y=d[1][i];
if(x>y)swap(x,y);
y-=x;
}
ll res=disjoint();
if(d[0][y]>2*k)return res;
dfs1(x,y);
m=SZ(a);
fore(i,0,m){
h.pb({}),dfs2(a[i]);
auto &v=h.back();
ll sz=SZ(v),dif=b[a[i]][1];
vector<ll>ds;
for(auto i:v)ds.pb(b[i][0]),assert(b[i][1]==dif);
sort(ALL(ds));
vector<ll>va(2*sz+1,INF);
// cout<<"("<<sz<<") "; imp(ds); cout<<endl;
fore(z,1,2*sz+1){
ll sum=0;
fore(j,1,sz+1){
sum+=ds[j-1];
ll dos=z-j;
if(dos<0||dos>j)continue;
va[z]=min(va[z],sum+dif*dos);
}
}
// cout<<i<<": "; imp(va);
val.pb(va);
}
ll l=m,r=2*n;
while(l<=r){
ll m=(l+r)/2;
if(can(m))l=m+1;
else r=m-1;
}
// cout<<r<<" r\n";
if(r>=m)res=max(res,r);
return res;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
6744 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
88 ms |
35272 KB |
Output is correct |
2 |
Correct |
97 ms |
39172 KB |
Output is correct |
3 |
Correct |
52 ms |
12176 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
6748 KB |
Output is correct |
2 |
Correct |
1 ms |
6748 KB |
Output is correct |
3 |
Correct |
1 ms |
7004 KB |
Output is correct |
4 |
Correct |
1 ms |
6748 KB |
Output is correct |
5 |
Correct |
1 ms |
6748 KB |
Output is correct |
6 |
Correct |
2 ms |
6748 KB |
Output is correct |
7 |
Correct |
1 ms |
6716 KB |
Output is correct |
8 |
Correct |
1 ms |
6748 KB |
Output is correct |
9 |
Correct |
1 ms |
6748 KB |
Output is correct |
10 |
Correct |
1 ms |
6748 KB |
Output is correct |
11 |
Correct |
1 ms |
6744 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
6748 KB |
Output is correct |
2 |
Correct |
1 ms |
6748 KB |
Output is correct |
3 |
Correct |
1 ms |
7004 KB |
Output is correct |
4 |
Correct |
1 ms |
6748 KB |
Output is correct |
5 |
Correct |
1 ms |
6748 KB |
Output is correct |
6 |
Correct |
2 ms |
6748 KB |
Output is correct |
7 |
Correct |
1 ms |
6716 KB |
Output is correct |
8 |
Correct |
1 ms |
6748 KB |
Output is correct |
9 |
Correct |
1 ms |
6748 KB |
Output is correct |
10 |
Correct |
1 ms |
6748 KB |
Output is correct |
11 |
Correct |
1 ms |
6744 KB |
Output is correct |
12 |
Correct |
2 ms |
6748 KB |
Output is correct |
13 |
Correct |
1 ms |
6748 KB |
Output is correct |
14 |
Correct |
2 ms |
6748 KB |
Output is correct |
15 |
Correct |
1 ms |
6744 KB |
Output is correct |
16 |
Correct |
2 ms |
6744 KB |
Output is correct |
17 |
Correct |
2 ms |
6752 KB |
Output is correct |
18 |
Correct |
2 ms |
6748 KB |
Output is correct |
19 |
Correct |
9 ms |
6748 KB |
Output is correct |
20 |
Correct |
3 ms |
6760 KB |
Output is correct |
21 |
Correct |
14 ms |
9100 KB |
Output is correct |
22 |
Correct |
6 ms |
7772 KB |
Output is correct |
23 |
Correct |
11 ms |
9820 KB |
Output is correct |
24 |
Correct |
11 ms |
9820 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
6748 KB |
Output is correct |
2 |
Correct |
1 ms |
6748 KB |
Output is correct |
3 |
Correct |
1 ms |
7004 KB |
Output is correct |
4 |
Correct |
1 ms |
6748 KB |
Output is correct |
5 |
Correct |
1 ms |
6748 KB |
Output is correct |
6 |
Correct |
2 ms |
6748 KB |
Output is correct |
7 |
Correct |
1 ms |
6716 KB |
Output is correct |
8 |
Correct |
1 ms |
6748 KB |
Output is correct |
9 |
Correct |
1 ms |
6748 KB |
Output is correct |
10 |
Correct |
1 ms |
6748 KB |
Output is correct |
11 |
Correct |
1 ms |
6744 KB |
Output is correct |
12 |
Correct |
2 ms |
6748 KB |
Output is correct |
13 |
Correct |
1 ms |
6748 KB |
Output is correct |
14 |
Correct |
2 ms |
6748 KB |
Output is correct |
15 |
Correct |
1 ms |
6744 KB |
Output is correct |
16 |
Correct |
2 ms |
6744 KB |
Output is correct |
17 |
Correct |
2 ms |
6752 KB |
Output is correct |
18 |
Correct |
2 ms |
6748 KB |
Output is correct |
19 |
Correct |
9 ms |
6748 KB |
Output is correct |
20 |
Correct |
3 ms |
6760 KB |
Output is correct |
21 |
Correct |
14 ms |
9100 KB |
Output is correct |
22 |
Correct |
6 ms |
7772 KB |
Output is correct |
23 |
Correct |
11 ms |
9820 KB |
Output is correct |
24 |
Correct |
11 ms |
9820 KB |
Output is correct |
25 |
Correct |
8 ms |
6772 KB |
Output is correct |
26 |
Correct |
357 ms |
7532 KB |
Output is correct |
27 |
Correct |
39 ms |
7256 KB |
Output is correct |
28 |
Correct |
816 ms |
127052 KB |
Output is correct |
29 |
Correct |
778 ms |
89228 KB |
Output is correct |
30 |
Correct |
81 ms |
18780 KB |
Output is correct |
31 |
Correct |
534 ms |
113492 KB |
Output is correct |
32 |
Correct |
557 ms |
113232 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
6744 KB |
Output is correct |
2 |
Correct |
1 ms |
6748 KB |
Output is correct |
3 |
Correct |
1 ms |
6748 KB |
Output is correct |
4 |
Correct |
1 ms |
7004 KB |
Output is correct |
5 |
Correct |
1 ms |
6748 KB |
Output is correct |
6 |
Correct |
1 ms |
6748 KB |
Output is correct |
7 |
Correct |
1 ms |
6744 KB |
Output is correct |
8 |
Correct |
1 ms |
6748 KB |
Output is correct |
9 |
Correct |
1 ms |
6748 KB |
Output is correct |
10 |
Correct |
1 ms |
6748 KB |
Output is correct |
11 |
Correct |
1 ms |
6748 KB |
Output is correct |
12 |
Correct |
1 ms |
6748 KB |
Output is correct |
13 |
Correct |
1 ms |
6752 KB |
Output is correct |
14 |
Correct |
1 ms |
6748 KB |
Output is correct |
15 |
Correct |
1 ms |
6744 KB |
Output is correct |
16 |
Correct |
1 ms |
6748 KB |
Output is correct |
17 |
Correct |
1 ms |
6748 KB |
Output is correct |
18 |
Correct |
1 ms |
6748 KB |
Output is correct |
19 |
Correct |
1 ms |
6748 KB |
Output is correct |
20 |
Correct |
1 ms |
6748 KB |
Output is correct |
21 |
Correct |
1 ms |
6748 KB |
Output is correct |
22 |
Correct |
1 ms |
6748 KB |
Output is correct |
23 |
Correct |
2 ms |
6748 KB |
Output is correct |
24 |
Correct |
1 ms |
6748 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
6744 KB |
Output is correct |
2 |
Correct |
1 ms |
6748 KB |
Output is correct |
3 |
Correct |
1 ms |
6748 KB |
Output is correct |
4 |
Correct |
1 ms |
7004 KB |
Output is correct |
5 |
Correct |
1 ms |
6748 KB |
Output is correct |
6 |
Correct |
1 ms |
6748 KB |
Output is correct |
7 |
Correct |
2 ms |
6748 KB |
Output is correct |
8 |
Correct |
1 ms |
6716 KB |
Output is correct |
9 |
Correct |
1 ms |
6748 KB |
Output is correct |
10 |
Correct |
1 ms |
6748 KB |
Output is correct |
11 |
Correct |
1 ms |
6748 KB |
Output is correct |
12 |
Correct |
1 ms |
6744 KB |
Output is correct |
13 |
Correct |
2 ms |
6748 KB |
Output is correct |
14 |
Correct |
1 ms |
6748 KB |
Output is correct |
15 |
Correct |
2 ms |
6748 KB |
Output is correct |
16 |
Correct |
1 ms |
6744 KB |
Output is correct |
17 |
Correct |
2 ms |
6744 KB |
Output is correct |
18 |
Correct |
2 ms |
6752 KB |
Output is correct |
19 |
Correct |
1 ms |
6744 KB |
Output is correct |
20 |
Correct |
1 ms |
6748 KB |
Output is correct |
21 |
Correct |
1 ms |
6748 KB |
Output is correct |
22 |
Correct |
1 ms |
6748 KB |
Output is correct |
23 |
Correct |
1 ms |
6748 KB |
Output is correct |
24 |
Correct |
1 ms |
6748 KB |
Output is correct |
25 |
Correct |
1 ms |
6752 KB |
Output is correct |
26 |
Correct |
1 ms |
6748 KB |
Output is correct |
27 |
Correct |
1 ms |
6744 KB |
Output is correct |
28 |
Correct |
1 ms |
6748 KB |
Output is correct |
29 |
Correct |
1 ms |
6748 KB |
Output is correct |
30 |
Correct |
1 ms |
6748 KB |
Output is correct |
31 |
Correct |
1 ms |
6748 KB |
Output is correct |
32 |
Correct |
1 ms |
6748 KB |
Output is correct |
33 |
Correct |
1 ms |
6748 KB |
Output is correct |
34 |
Correct |
1 ms |
6748 KB |
Output is correct |
35 |
Correct |
2 ms |
6748 KB |
Output is correct |
36 |
Correct |
1 ms |
6748 KB |
Output is correct |
37 |
Correct |
2 ms |
6748 KB |
Output is correct |
38 |
Correct |
1 ms |
6744 KB |
Output is correct |
39 |
Correct |
2 ms |
6748 KB |
Output is correct |
40 |
Correct |
2 ms |
6748 KB |
Output is correct |
41 |
Correct |
1 ms |
6748 KB |
Output is correct |
42 |
Correct |
1 ms |
6748 KB |
Output is correct |
43 |
Correct |
2 ms |
6748 KB |
Output is correct |
44 |
Correct |
1 ms |
6748 KB |
Output is correct |
45 |
Correct |
2 ms |
6748 KB |
Output is correct |
46 |
Correct |
2 ms |
6748 KB |
Output is correct |
47 |
Correct |
2 ms |
6748 KB |
Output is correct |
48 |
Correct |
2 ms |
6764 KB |
Output is correct |
49 |
Correct |
2 ms |
6748 KB |
Output is correct |
50 |
Correct |
2 ms |
6748 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
6744 KB |
Output is correct |
2 |
Correct |
1 ms |
6748 KB |
Output is correct |
3 |
Correct |
1 ms |
6748 KB |
Output is correct |
4 |
Correct |
1 ms |
7004 KB |
Output is correct |
5 |
Correct |
1 ms |
6748 KB |
Output is correct |
6 |
Correct |
1 ms |
6748 KB |
Output is correct |
7 |
Correct |
2 ms |
6748 KB |
Output is correct |
8 |
Correct |
1 ms |
6716 KB |
Output is correct |
9 |
Correct |
1 ms |
6748 KB |
Output is correct |
10 |
Correct |
1 ms |
6748 KB |
Output is correct |
11 |
Correct |
1 ms |
6748 KB |
Output is correct |
12 |
Correct |
1 ms |
6744 KB |
Output is correct |
13 |
Correct |
2 ms |
6748 KB |
Output is correct |
14 |
Correct |
1 ms |
6748 KB |
Output is correct |
15 |
Correct |
2 ms |
6748 KB |
Output is correct |
16 |
Correct |
1 ms |
6744 KB |
Output is correct |
17 |
Correct |
2 ms |
6744 KB |
Output is correct |
18 |
Correct |
2 ms |
6752 KB |
Output is correct |
19 |
Correct |
2 ms |
6748 KB |
Output is correct |
20 |
Correct |
9 ms |
6748 KB |
Output is correct |
21 |
Correct |
3 ms |
6760 KB |
Output is correct |
22 |
Correct |
14 ms |
9100 KB |
Output is correct |
23 |
Correct |
6 ms |
7772 KB |
Output is correct |
24 |
Correct |
11 ms |
9820 KB |
Output is correct |
25 |
Correct |
11 ms |
9820 KB |
Output is correct |
26 |
Correct |
1 ms |
6744 KB |
Output is correct |
27 |
Correct |
1 ms |
6748 KB |
Output is correct |
28 |
Correct |
1 ms |
6748 KB |
Output is correct |
29 |
Correct |
1 ms |
6748 KB |
Output is correct |
30 |
Correct |
1 ms |
6748 KB |
Output is correct |
31 |
Correct |
1 ms |
6748 KB |
Output is correct |
32 |
Correct |
1 ms |
6752 KB |
Output is correct |
33 |
Correct |
1 ms |
6748 KB |
Output is correct |
34 |
Correct |
1 ms |
6744 KB |
Output is correct |
35 |
Correct |
1 ms |
6748 KB |
Output is correct |
36 |
Correct |
1 ms |
6748 KB |
Output is correct |
37 |
Correct |
1 ms |
6748 KB |
Output is correct |
38 |
Correct |
1 ms |
6748 KB |
Output is correct |
39 |
Correct |
1 ms |
6748 KB |
Output is correct |
40 |
Correct |
1 ms |
6748 KB |
Output is correct |
41 |
Correct |
1 ms |
6748 KB |
Output is correct |
42 |
Correct |
2 ms |
6748 KB |
Output is correct |
43 |
Correct |
1 ms |
6748 KB |
Output is correct |
44 |
Correct |
2 ms |
6748 KB |
Output is correct |
45 |
Correct |
1 ms |
6744 KB |
Output is correct |
46 |
Correct |
2 ms |
6748 KB |
Output is correct |
47 |
Correct |
2 ms |
6748 KB |
Output is correct |
48 |
Correct |
1 ms |
6748 KB |
Output is correct |
49 |
Correct |
1 ms |
6748 KB |
Output is correct |
50 |
Correct |
2 ms |
6748 KB |
Output is correct |
51 |
Correct |
1 ms |
6748 KB |
Output is correct |
52 |
Correct |
2 ms |
6748 KB |
Output is correct |
53 |
Correct |
2 ms |
6748 KB |
Output is correct |
54 |
Correct |
2 ms |
6748 KB |
Output is correct |
55 |
Correct |
2 ms |
6764 KB |
Output is correct |
56 |
Correct |
2 ms |
6748 KB |
Output is correct |
57 |
Correct |
2 ms |
6748 KB |
Output is correct |
58 |
Correct |
2 ms |
6748 KB |
Output is correct |
59 |
Correct |
3 ms |
6772 KB |
Output is correct |
60 |
Correct |
3 ms |
6748 KB |
Output is correct |
61 |
Correct |
3 ms |
6748 KB |
Output is correct |
62 |
Correct |
3 ms |
6748 KB |
Output is correct |
63 |
Correct |
10 ms |
6864 KB |
Output is correct |
64 |
Correct |
10 ms |
6744 KB |
Output is correct |
65 |
Correct |
5 ms |
7256 KB |
Output is correct |
66 |
Correct |
3 ms |
6748 KB |
Output is correct |
67 |
Correct |
3 ms |
6748 KB |
Output is correct |
68 |
Correct |
9 ms |
9052 KB |
Output is correct |
69 |
Correct |
16 ms |
9360 KB |
Output is correct |
70 |
Correct |
4 ms |
7260 KB |
Output is correct |
71 |
Correct |
4 ms |
7516 KB |
Output is correct |
72 |
Correct |
6 ms |
6748 KB |
Output is correct |
73 |
Correct |
7 ms |
6744 KB |
Output is correct |
74 |
Correct |
3 ms |
6748 KB |
Output is correct |
75 |
Correct |
2 ms |
6748 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
6744 KB |
Output is correct |
2 |
Correct |
1 ms |
6748 KB |
Output is correct |
3 |
Correct |
1 ms |
6748 KB |
Output is correct |
4 |
Correct |
1 ms |
7004 KB |
Output is correct |
5 |
Correct |
1 ms |
6748 KB |
Output is correct |
6 |
Correct |
1 ms |
6748 KB |
Output is correct |
7 |
Correct |
2 ms |
6748 KB |
Output is correct |
8 |
Correct |
1 ms |
6716 KB |
Output is correct |
9 |
Correct |
1 ms |
6748 KB |
Output is correct |
10 |
Correct |
1 ms |
6748 KB |
Output is correct |
11 |
Correct |
1 ms |
6748 KB |
Output is correct |
12 |
Correct |
1 ms |
6744 KB |
Output is correct |
13 |
Correct |
2 ms |
6748 KB |
Output is correct |
14 |
Correct |
1 ms |
6748 KB |
Output is correct |
15 |
Correct |
2 ms |
6748 KB |
Output is correct |
16 |
Correct |
1 ms |
6744 KB |
Output is correct |
17 |
Correct |
2 ms |
6744 KB |
Output is correct |
18 |
Correct |
2 ms |
6752 KB |
Output is correct |
19 |
Correct |
2 ms |
6748 KB |
Output is correct |
20 |
Correct |
9 ms |
6748 KB |
Output is correct |
21 |
Correct |
3 ms |
6760 KB |
Output is correct |
22 |
Correct |
14 ms |
9100 KB |
Output is correct |
23 |
Correct |
6 ms |
7772 KB |
Output is correct |
24 |
Correct |
11 ms |
9820 KB |
Output is correct |
25 |
Correct |
11 ms |
9820 KB |
Output is correct |
26 |
Correct |
8 ms |
6772 KB |
Output is correct |
27 |
Correct |
357 ms |
7532 KB |
Output is correct |
28 |
Correct |
39 ms |
7256 KB |
Output is correct |
29 |
Correct |
816 ms |
127052 KB |
Output is correct |
30 |
Correct |
778 ms |
89228 KB |
Output is correct |
31 |
Correct |
81 ms |
18780 KB |
Output is correct |
32 |
Correct |
534 ms |
113492 KB |
Output is correct |
33 |
Correct |
557 ms |
113232 KB |
Output is correct |
34 |
Correct |
1 ms |
6744 KB |
Output is correct |
35 |
Correct |
1 ms |
6748 KB |
Output is correct |
36 |
Correct |
1 ms |
6748 KB |
Output is correct |
37 |
Correct |
1 ms |
6748 KB |
Output is correct |
38 |
Correct |
1 ms |
6748 KB |
Output is correct |
39 |
Correct |
1 ms |
6748 KB |
Output is correct |
40 |
Correct |
1 ms |
6752 KB |
Output is correct |
41 |
Correct |
1 ms |
6748 KB |
Output is correct |
42 |
Correct |
1 ms |
6744 KB |
Output is correct |
43 |
Correct |
1 ms |
6748 KB |
Output is correct |
44 |
Correct |
1 ms |
6748 KB |
Output is correct |
45 |
Correct |
1 ms |
6748 KB |
Output is correct |
46 |
Correct |
1 ms |
6748 KB |
Output is correct |
47 |
Correct |
1 ms |
6748 KB |
Output is correct |
48 |
Correct |
1 ms |
6748 KB |
Output is correct |
49 |
Correct |
1 ms |
6748 KB |
Output is correct |
50 |
Correct |
2 ms |
6748 KB |
Output is correct |
51 |
Correct |
1 ms |
6748 KB |
Output is correct |
52 |
Correct |
2 ms |
6748 KB |
Output is correct |
53 |
Correct |
1 ms |
6744 KB |
Output is correct |
54 |
Correct |
2 ms |
6748 KB |
Output is correct |
55 |
Correct |
2 ms |
6748 KB |
Output is correct |
56 |
Correct |
1 ms |
6748 KB |
Output is correct |
57 |
Correct |
1 ms |
6748 KB |
Output is correct |
58 |
Correct |
2 ms |
6748 KB |
Output is correct |
59 |
Correct |
1 ms |
6748 KB |
Output is correct |
60 |
Correct |
2 ms |
6748 KB |
Output is correct |
61 |
Correct |
2 ms |
6748 KB |
Output is correct |
62 |
Correct |
2 ms |
6748 KB |
Output is correct |
63 |
Correct |
2 ms |
6764 KB |
Output is correct |
64 |
Correct |
2 ms |
6748 KB |
Output is correct |
65 |
Correct |
2 ms |
6748 KB |
Output is correct |
66 |
Correct |
2 ms |
6748 KB |
Output is correct |
67 |
Correct |
3 ms |
6772 KB |
Output is correct |
68 |
Correct |
3 ms |
6748 KB |
Output is correct |
69 |
Correct |
3 ms |
6748 KB |
Output is correct |
70 |
Correct |
3 ms |
6748 KB |
Output is correct |
71 |
Correct |
10 ms |
6864 KB |
Output is correct |
72 |
Correct |
10 ms |
6744 KB |
Output is correct |
73 |
Correct |
5 ms |
7256 KB |
Output is correct |
74 |
Correct |
3 ms |
6748 KB |
Output is correct |
75 |
Correct |
3 ms |
6748 KB |
Output is correct |
76 |
Correct |
9 ms |
9052 KB |
Output is correct |
77 |
Correct |
16 ms |
9360 KB |
Output is correct |
78 |
Correct |
4 ms |
7260 KB |
Output is correct |
79 |
Correct |
4 ms |
7516 KB |
Output is correct |
80 |
Correct |
6 ms |
6748 KB |
Output is correct |
81 |
Correct |
7 ms |
6744 KB |
Output is correct |
82 |
Correct |
3 ms |
6748 KB |
Output is correct |
83 |
Correct |
2 ms |
6748 KB |
Output is correct |
84 |
Correct |
7 ms |
6748 KB |
Output is correct |
85 |
Correct |
16 ms |
6748 KB |
Output is correct |
86 |
Correct |
11 ms |
7000 KB |
Output is correct |
87 |
Correct |
14 ms |
7004 KB |
Output is correct |
88 |
Correct |
14 ms |
7000 KB |
Output is correct |
89 |
Correct |
371 ms |
7452 KB |
Output is correct |
90 |
Correct |
362 ms |
7776 KB |
Output is correct |
91 |
Correct |
92 ms |
11344 KB |
Output is correct |
92 |
Correct |
53 ms |
7260 KB |
Output is correct |
93 |
Correct |
44 ms |
9052 KB |
Output is correct |
94 |
Correct |
348 ms |
74660 KB |
Output is correct |
95 |
Correct |
741 ms |
99784 KB |
Output is correct |
96 |
Correct |
181 ms |
40284 KB |
Output is correct |
97 |
Correct |
748 ms |
47264 KB |
Output is correct |
98 |
Correct |
92 ms |
7512 KB |
Output is correct |
99 |
Correct |
425 ms |
7396 KB |
Output is correct |
100 |
Correct |
34 ms |
7076 KB |
Output is correct |
101 |
Correct |
39 ms |
6744 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
6744 KB |
Output is correct |
2 |
Correct |
1 ms |
6748 KB |
Output is correct |
3 |
Correct |
1 ms |
6748 KB |
Output is correct |
4 |
Correct |
1 ms |
7004 KB |
Output is correct |
5 |
Correct |
1 ms |
6748 KB |
Output is correct |
6 |
Correct |
1 ms |
6748 KB |
Output is correct |
7 |
Correct |
2 ms |
6748 KB |
Output is correct |
8 |
Correct |
1 ms |
6716 KB |
Output is correct |
9 |
Correct |
1 ms |
6748 KB |
Output is correct |
10 |
Correct |
1 ms |
6748 KB |
Output is correct |
11 |
Correct |
1 ms |
6748 KB |
Output is correct |
12 |
Correct |
1 ms |
6744 KB |
Output is correct |
13 |
Correct |
2 ms |
6748 KB |
Output is correct |
14 |
Correct |
1 ms |
6748 KB |
Output is correct |
15 |
Correct |
2 ms |
6748 KB |
Output is correct |
16 |
Correct |
1 ms |
6744 KB |
Output is correct |
17 |
Correct |
2 ms |
6744 KB |
Output is correct |
18 |
Correct |
2 ms |
6752 KB |
Output is correct |
19 |
Correct |
2 ms |
6748 KB |
Output is correct |
20 |
Correct |
9 ms |
6748 KB |
Output is correct |
21 |
Correct |
3 ms |
6760 KB |
Output is correct |
22 |
Correct |
14 ms |
9100 KB |
Output is correct |
23 |
Correct |
6 ms |
7772 KB |
Output is correct |
24 |
Correct |
11 ms |
9820 KB |
Output is correct |
25 |
Correct |
11 ms |
9820 KB |
Output is correct |
26 |
Correct |
8 ms |
6772 KB |
Output is correct |
27 |
Correct |
357 ms |
7532 KB |
Output is correct |
28 |
Correct |
39 ms |
7256 KB |
Output is correct |
29 |
Correct |
816 ms |
127052 KB |
Output is correct |
30 |
Correct |
778 ms |
89228 KB |
Output is correct |
31 |
Correct |
81 ms |
18780 KB |
Output is correct |
32 |
Correct |
534 ms |
113492 KB |
Output is correct |
33 |
Correct |
557 ms |
113232 KB |
Output is correct |
34 |
Correct |
1 ms |
6744 KB |
Output is correct |
35 |
Correct |
1 ms |
6748 KB |
Output is correct |
36 |
Correct |
1 ms |
6748 KB |
Output is correct |
37 |
Correct |
1 ms |
6748 KB |
Output is correct |
38 |
Correct |
1 ms |
6748 KB |
Output is correct |
39 |
Correct |
1 ms |
6748 KB |
Output is correct |
40 |
Correct |
1 ms |
6752 KB |
Output is correct |
41 |
Correct |
1 ms |
6748 KB |
Output is correct |
42 |
Correct |
1 ms |
6744 KB |
Output is correct |
43 |
Correct |
1 ms |
6748 KB |
Output is correct |
44 |
Correct |
1 ms |
6748 KB |
Output is correct |
45 |
Correct |
1 ms |
6748 KB |
Output is correct |
46 |
Correct |
1 ms |
6748 KB |
Output is correct |
47 |
Correct |
1 ms |
6748 KB |
Output is correct |
48 |
Correct |
1 ms |
6748 KB |
Output is correct |
49 |
Correct |
1 ms |
6748 KB |
Output is correct |
50 |
Correct |
2 ms |
6748 KB |
Output is correct |
51 |
Correct |
1 ms |
6748 KB |
Output is correct |
52 |
Correct |
2 ms |
6748 KB |
Output is correct |
53 |
Correct |
1 ms |
6744 KB |
Output is correct |
54 |
Correct |
2 ms |
6748 KB |
Output is correct |
55 |
Correct |
2 ms |
6748 KB |
Output is correct |
56 |
Correct |
1 ms |
6748 KB |
Output is correct |
57 |
Correct |
1 ms |
6748 KB |
Output is correct |
58 |
Correct |
2 ms |
6748 KB |
Output is correct |
59 |
Correct |
1 ms |
6748 KB |
Output is correct |
60 |
Correct |
2 ms |
6748 KB |
Output is correct |
61 |
Correct |
2 ms |
6748 KB |
Output is correct |
62 |
Correct |
2 ms |
6748 KB |
Output is correct |
63 |
Correct |
2 ms |
6764 KB |
Output is correct |
64 |
Correct |
2 ms |
6748 KB |
Output is correct |
65 |
Correct |
2 ms |
6748 KB |
Output is correct |
66 |
Correct |
2 ms |
6748 KB |
Output is correct |
67 |
Correct |
3 ms |
6772 KB |
Output is correct |
68 |
Correct |
3 ms |
6748 KB |
Output is correct |
69 |
Correct |
3 ms |
6748 KB |
Output is correct |
70 |
Correct |
3 ms |
6748 KB |
Output is correct |
71 |
Correct |
10 ms |
6864 KB |
Output is correct |
72 |
Correct |
10 ms |
6744 KB |
Output is correct |
73 |
Correct |
5 ms |
7256 KB |
Output is correct |
74 |
Correct |
3 ms |
6748 KB |
Output is correct |
75 |
Correct |
3 ms |
6748 KB |
Output is correct |
76 |
Correct |
9 ms |
9052 KB |
Output is correct |
77 |
Correct |
16 ms |
9360 KB |
Output is correct |
78 |
Correct |
4 ms |
7260 KB |
Output is correct |
79 |
Correct |
4 ms |
7516 KB |
Output is correct |
80 |
Correct |
6 ms |
6748 KB |
Output is correct |
81 |
Correct |
7 ms |
6744 KB |
Output is correct |
82 |
Correct |
3 ms |
6748 KB |
Output is correct |
83 |
Correct |
2 ms |
6748 KB |
Output is correct |
84 |
Correct |
7 ms |
6748 KB |
Output is correct |
85 |
Correct |
16 ms |
6748 KB |
Output is correct |
86 |
Correct |
11 ms |
7000 KB |
Output is correct |
87 |
Correct |
14 ms |
7004 KB |
Output is correct |
88 |
Correct |
14 ms |
7000 KB |
Output is correct |
89 |
Correct |
371 ms |
7452 KB |
Output is correct |
90 |
Correct |
362 ms |
7776 KB |
Output is correct |
91 |
Correct |
92 ms |
11344 KB |
Output is correct |
92 |
Correct |
53 ms |
7260 KB |
Output is correct |
93 |
Correct |
44 ms |
9052 KB |
Output is correct |
94 |
Correct |
348 ms |
74660 KB |
Output is correct |
95 |
Correct |
741 ms |
99784 KB |
Output is correct |
96 |
Correct |
181 ms |
40284 KB |
Output is correct |
97 |
Correct |
748 ms |
47264 KB |
Output is correct |
98 |
Correct |
92 ms |
7512 KB |
Output is correct |
99 |
Correct |
425 ms |
7396 KB |
Output is correct |
100 |
Correct |
34 ms |
7076 KB |
Output is correct |
101 |
Correct |
39 ms |
6744 KB |
Output is correct |
102 |
Correct |
560 ms |
12140 KB |
Output is correct |
103 |
Execution timed out |
1061 ms |
12116 KB |
Time limit exceeded |
104 |
Halted |
0 ms |
0 KB |
- |