#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();
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 |
7000 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
724 ms |
2097152 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
6748 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 |
6756 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 |
6748 KB |
Output is correct |
8 |
Correct |
1 ms |
6756 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 |
6608 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 |
6748 KB |
Output is correct |
4 |
Correct |
1 ms |
6756 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 |
6748 KB |
Output is correct |
8 |
Correct |
1 ms |
6756 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 |
6608 KB |
Output is correct |
12 |
Correct |
1 ms |
6760 KB |
Output is correct |
13 |
Correct |
1 ms |
6760 KB |
Output is correct |
14 |
Correct |
1 ms |
6760 KB |
Output is correct |
15 |
Correct |
1 ms |
6760 KB |
Output is correct |
16 |
Correct |
1 ms |
6760 KB |
Output is correct |
17 |
Correct |
1 ms |
6760 KB |
Output is correct |
18 |
Correct |
1 ms |
6760 KB |
Output is correct |
19 |
Correct |
7 ms |
6760 KB |
Output is correct |
20 |
Correct |
2 ms |
6760 KB |
Output is correct |
21 |
Correct |
12 ms |
9100 KB |
Output is correct |
22 |
Correct |
5 ms |
7772 KB |
Output is correct |
23 |
Correct |
9 ms |
9836 KB |
Output is correct |
24 |
Correct |
10 ms |
9816 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 |
6748 KB |
Output is correct |
4 |
Correct |
1 ms |
6756 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 |
6748 KB |
Output is correct |
8 |
Correct |
1 ms |
6756 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 |
6608 KB |
Output is correct |
12 |
Correct |
1 ms |
6760 KB |
Output is correct |
13 |
Correct |
1 ms |
6760 KB |
Output is correct |
14 |
Correct |
1 ms |
6760 KB |
Output is correct |
15 |
Correct |
1 ms |
6760 KB |
Output is correct |
16 |
Correct |
1 ms |
6760 KB |
Output is correct |
17 |
Correct |
1 ms |
6760 KB |
Output is correct |
18 |
Correct |
1 ms |
6760 KB |
Output is correct |
19 |
Correct |
7 ms |
6760 KB |
Output is correct |
20 |
Correct |
2 ms |
6760 KB |
Output is correct |
21 |
Correct |
12 ms |
9100 KB |
Output is correct |
22 |
Correct |
5 ms |
7772 KB |
Output is correct |
23 |
Correct |
9 ms |
9836 KB |
Output is correct |
24 |
Correct |
10 ms |
9816 KB |
Output is correct |
25 |
Correct |
6 ms |
7004 KB |
Output is correct |
26 |
Correct |
305 ms |
7500 KB |
Output is correct |
27 |
Correct |
33 ms |
7256 KB |
Output is correct |
28 |
Correct |
769 ms |
127332 KB |
Output is correct |
29 |
Correct |
694 ms |
89240 KB |
Output is correct |
30 |
Correct |
66 ms |
18780 KB |
Output is correct |
31 |
Correct |
487 ms |
113240 KB |
Output is correct |
32 |
Correct |
475 ms |
113232 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
7000 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 |
6748 KB |
Output is correct |
5 |
Correct |
1 ms |
6756 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 |
6748 KB |
Output is correct |
14 |
Correct |
1 ms |
6744 KB |
Output is correct |
15 |
Correct |
1 ms |
6748 KB |
Output is correct |
16 |
Correct |
1 ms |
6748 KB |
Output is correct |
17 |
Correct |
1 ms |
6736 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 |
6760 KB |
Output is correct |
21 |
Correct |
1 ms |
6748 KB |
Output is correct |
22 |
Correct |
2 ms |
6748 KB |
Output is correct |
23 |
Correct |
1 ms |
6748 KB |
Output is correct |
24 |
Correct |
1 ms |
6748 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
7000 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 |
6748 KB |
Output is correct |
5 |
Correct |
1 ms |
6756 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 |
6748 KB |
Output is correct |
9 |
Correct |
1 ms |
6756 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 |
6608 KB |
Output is correct |
13 |
Correct |
1 ms |
6760 KB |
Output is correct |
14 |
Correct |
1 ms |
6760 KB |
Output is correct |
15 |
Correct |
1 ms |
6760 KB |
Output is correct |
16 |
Correct |
1 ms |
6760 KB |
Output is correct |
17 |
Correct |
1 ms |
6760 KB |
Output is correct |
18 |
Correct |
1 ms |
6760 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 |
6748 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 |
6736 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 |
6760 KB |
Output is correct |
33 |
Correct |
1 ms |
6748 KB |
Output is correct |
34 |
Correct |
2 ms |
6748 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 |
6760 KB |
Output is correct |
40 |
Correct |
1 ms |
6748 KB |
Output is correct |
41 |
Correct |
1 ms |
6748 KB |
Output is correct |
42 |
Correct |
1 ms |
6760 KB |
Output is correct |
43 |
Correct |
1 ms |
6744 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 |
6752 KB |
Output is correct |
48 |
Correct |
1 ms |
6756 KB |
Output is correct |
49 |
Correct |
1 ms |
6760 KB |
Output is correct |
50 |
Correct |
1 ms |
6760 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
7000 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 |
6748 KB |
Output is correct |
5 |
Correct |
1 ms |
6756 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 |
6748 KB |
Output is correct |
9 |
Correct |
1 ms |
6756 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 |
6608 KB |
Output is correct |
13 |
Correct |
1 ms |
6760 KB |
Output is correct |
14 |
Correct |
1 ms |
6760 KB |
Output is correct |
15 |
Correct |
1 ms |
6760 KB |
Output is correct |
16 |
Correct |
1 ms |
6760 KB |
Output is correct |
17 |
Correct |
1 ms |
6760 KB |
Output is correct |
18 |
Correct |
1 ms |
6760 KB |
Output is correct |
19 |
Correct |
1 ms |
6760 KB |
Output is correct |
20 |
Correct |
7 ms |
6760 KB |
Output is correct |
21 |
Correct |
2 ms |
6760 KB |
Output is correct |
22 |
Correct |
12 ms |
9100 KB |
Output is correct |
23 |
Correct |
5 ms |
7772 KB |
Output is correct |
24 |
Correct |
9 ms |
9836 KB |
Output is correct |
25 |
Correct |
10 ms |
9816 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 |
6748 KB |
Output is correct |
33 |
Correct |
1 ms |
6744 KB |
Output is correct |
34 |
Correct |
1 ms |
6748 KB |
Output is correct |
35 |
Correct |
1 ms |
6748 KB |
Output is correct |
36 |
Correct |
1 ms |
6736 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 |
6760 KB |
Output is correct |
40 |
Correct |
1 ms |
6748 KB |
Output is correct |
41 |
Correct |
2 ms |
6748 KB |
Output is correct |
42 |
Correct |
1 ms |
6748 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 |
6760 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 |
6760 KB |
Output is correct |
50 |
Correct |
1 ms |
6744 KB |
Output is correct |
51 |
Correct |
1 ms |
6748 KB |
Output is correct |
52 |
Correct |
1 ms |
6748 KB |
Output is correct |
53 |
Correct |
1 ms |
6748 KB |
Output is correct |
54 |
Correct |
1 ms |
6752 KB |
Output is correct |
55 |
Correct |
1 ms |
6756 KB |
Output is correct |
56 |
Correct |
1 ms |
6760 KB |
Output is correct |
57 |
Correct |
1 ms |
6760 KB |
Output is correct |
58 |
Correct |
1 ms |
6760 KB |
Output is correct |
59 |
Correct |
2 ms |
6760 KB |
Output is correct |
60 |
Correct |
3 ms |
6880 KB |
Output is correct |
61 |
Correct |
2 ms |
6748 KB |
Output is correct |
62 |
Correct |
3 ms |
6748 KB |
Output is correct |
63 |
Correct |
8 ms |
6748 KB |
Output is correct |
64 |
Correct |
7 ms |
6744 KB |
Output is correct |
65 |
Correct |
4 ms |
7004 KB |
Output is correct |
66 |
Correct |
2 ms |
6744 KB |
Output is correct |
67 |
Correct |
2 ms |
6748 KB |
Output is correct |
68 |
Correct |
8 ms |
9052 KB |
Output is correct |
69 |
Correct |
14 ms |
9488 KB |
Output is correct |
70 |
Correct |
3 ms |
7260 KB |
Output is correct |
71 |
Correct |
3 ms |
7516 KB |
Output is correct |
72 |
Correct |
4 ms |
6892 KB |
Output is correct |
73 |
Correct |
5 ms |
6844 KB |
Output is correct |
74 |
Correct |
2 ms |
6840 KB |
Output is correct |
75 |
Correct |
2 ms |
6816 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
7000 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 |
6748 KB |
Output is correct |
5 |
Correct |
1 ms |
6756 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 |
6748 KB |
Output is correct |
9 |
Correct |
1 ms |
6756 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 |
6608 KB |
Output is correct |
13 |
Correct |
1 ms |
6760 KB |
Output is correct |
14 |
Correct |
1 ms |
6760 KB |
Output is correct |
15 |
Correct |
1 ms |
6760 KB |
Output is correct |
16 |
Correct |
1 ms |
6760 KB |
Output is correct |
17 |
Correct |
1 ms |
6760 KB |
Output is correct |
18 |
Correct |
1 ms |
6760 KB |
Output is correct |
19 |
Correct |
1 ms |
6760 KB |
Output is correct |
20 |
Correct |
7 ms |
6760 KB |
Output is correct |
21 |
Correct |
2 ms |
6760 KB |
Output is correct |
22 |
Correct |
12 ms |
9100 KB |
Output is correct |
23 |
Correct |
5 ms |
7772 KB |
Output is correct |
24 |
Correct |
9 ms |
9836 KB |
Output is correct |
25 |
Correct |
10 ms |
9816 KB |
Output is correct |
26 |
Correct |
6 ms |
7004 KB |
Output is correct |
27 |
Correct |
305 ms |
7500 KB |
Output is correct |
28 |
Correct |
33 ms |
7256 KB |
Output is correct |
29 |
Correct |
769 ms |
127332 KB |
Output is correct |
30 |
Correct |
694 ms |
89240 KB |
Output is correct |
31 |
Correct |
66 ms |
18780 KB |
Output is correct |
32 |
Correct |
487 ms |
113240 KB |
Output is correct |
33 |
Correct |
475 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 |
6748 KB |
Output is correct |
41 |
Correct |
1 ms |
6744 KB |
Output is correct |
42 |
Correct |
1 ms |
6748 KB |
Output is correct |
43 |
Correct |
1 ms |
6748 KB |
Output is correct |
44 |
Correct |
1 ms |
6736 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 |
6760 KB |
Output is correct |
48 |
Correct |
1 ms |
6748 KB |
Output is correct |
49 |
Correct |
2 ms |
6748 KB |
Output is correct |
50 |
Correct |
1 ms |
6748 KB |
Output is correct |
51 |
Correct |
1 ms |
6748 KB |
Output is correct |
52 |
Correct |
1 ms |
6748 KB |
Output is correct |
53 |
Correct |
1 ms |
6748 KB |
Output is correct |
54 |
Correct |
1 ms |
6760 KB |
Output is correct |
55 |
Correct |
1 ms |
6748 KB |
Output is correct |
56 |
Correct |
1 ms |
6748 KB |
Output is correct |
57 |
Correct |
1 ms |
6760 KB |
Output is correct |
58 |
Correct |
1 ms |
6744 KB |
Output is correct |
59 |
Correct |
1 ms |
6748 KB |
Output is correct |
60 |
Correct |
1 ms |
6748 KB |
Output is correct |
61 |
Correct |
1 ms |
6748 KB |
Output is correct |
62 |
Correct |
1 ms |
6752 KB |
Output is correct |
63 |
Correct |
1 ms |
6756 KB |
Output is correct |
64 |
Correct |
1 ms |
6760 KB |
Output is correct |
65 |
Correct |
1 ms |
6760 KB |
Output is correct |
66 |
Correct |
1 ms |
6760 KB |
Output is correct |
67 |
Correct |
2 ms |
6760 KB |
Output is correct |
68 |
Correct |
3 ms |
6880 KB |
Output is correct |
69 |
Correct |
2 ms |
6748 KB |
Output is correct |
70 |
Correct |
3 ms |
6748 KB |
Output is correct |
71 |
Correct |
8 ms |
6748 KB |
Output is correct |
72 |
Correct |
7 ms |
6744 KB |
Output is correct |
73 |
Correct |
4 ms |
7004 KB |
Output is correct |
74 |
Correct |
2 ms |
6744 KB |
Output is correct |
75 |
Correct |
2 ms |
6748 KB |
Output is correct |
76 |
Correct |
8 ms |
9052 KB |
Output is correct |
77 |
Correct |
14 ms |
9488 KB |
Output is correct |
78 |
Correct |
3 ms |
7260 KB |
Output is correct |
79 |
Correct |
3 ms |
7516 KB |
Output is correct |
80 |
Correct |
4 ms |
6892 KB |
Output is correct |
81 |
Correct |
5 ms |
6844 KB |
Output is correct |
82 |
Correct |
2 ms |
6840 KB |
Output is correct |
83 |
Correct |
2 ms |
6816 KB |
Output is correct |
84 |
Correct |
5 ms |
6748 KB |
Output is correct |
85 |
Correct |
14 ms |
6748 KB |
Output is correct |
86 |
Correct |
9 ms |
7004 KB |
Output is correct |
87 |
Correct |
11 ms |
7004 KB |
Output is correct |
88 |
Correct |
11 ms |
6940 KB |
Output is correct |
89 |
Correct |
320 ms |
7444 KB |
Output is correct |
90 |
Correct |
290 ms |
7780 KB |
Output is correct |
91 |
Correct |
81 ms |
11096 KB |
Output is correct |
92 |
Correct |
37 ms |
7260 KB |
Output is correct |
93 |
Correct |
43 ms |
9308 KB |
Output is correct |
94 |
Correct |
293 ms |
74584 KB |
Output is correct |
95 |
Correct |
616 ms |
99832 KB |
Output is correct |
96 |
Correct |
149 ms |
40536 KB |
Output is correct |
97 |
Correct |
597 ms |
47272 KB |
Output is correct |
98 |
Correct |
78 ms |
7512 KB |
Output is correct |
99 |
Correct |
357 ms |
7416 KB |
Output is correct |
100 |
Correct |
33 ms |
7004 KB |
Output is correct |
101 |
Correct |
26 ms |
6744 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
7000 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 |
6748 KB |
Output is correct |
5 |
Correct |
1 ms |
6756 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 |
6748 KB |
Output is correct |
9 |
Correct |
1 ms |
6756 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 |
6608 KB |
Output is correct |
13 |
Correct |
1 ms |
6760 KB |
Output is correct |
14 |
Correct |
1 ms |
6760 KB |
Output is correct |
15 |
Correct |
1 ms |
6760 KB |
Output is correct |
16 |
Correct |
1 ms |
6760 KB |
Output is correct |
17 |
Correct |
1 ms |
6760 KB |
Output is correct |
18 |
Correct |
1 ms |
6760 KB |
Output is correct |
19 |
Correct |
1 ms |
6760 KB |
Output is correct |
20 |
Correct |
7 ms |
6760 KB |
Output is correct |
21 |
Correct |
2 ms |
6760 KB |
Output is correct |
22 |
Correct |
12 ms |
9100 KB |
Output is correct |
23 |
Correct |
5 ms |
7772 KB |
Output is correct |
24 |
Correct |
9 ms |
9836 KB |
Output is correct |
25 |
Correct |
10 ms |
9816 KB |
Output is correct |
26 |
Correct |
6 ms |
7004 KB |
Output is correct |
27 |
Correct |
305 ms |
7500 KB |
Output is correct |
28 |
Correct |
33 ms |
7256 KB |
Output is correct |
29 |
Correct |
769 ms |
127332 KB |
Output is correct |
30 |
Correct |
694 ms |
89240 KB |
Output is correct |
31 |
Correct |
66 ms |
18780 KB |
Output is correct |
32 |
Correct |
487 ms |
113240 KB |
Output is correct |
33 |
Correct |
475 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 |
6748 KB |
Output is correct |
41 |
Correct |
1 ms |
6744 KB |
Output is correct |
42 |
Correct |
1 ms |
6748 KB |
Output is correct |
43 |
Correct |
1 ms |
6748 KB |
Output is correct |
44 |
Correct |
1 ms |
6736 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 |
6760 KB |
Output is correct |
48 |
Correct |
1 ms |
6748 KB |
Output is correct |
49 |
Correct |
2 ms |
6748 KB |
Output is correct |
50 |
Correct |
1 ms |
6748 KB |
Output is correct |
51 |
Correct |
1 ms |
6748 KB |
Output is correct |
52 |
Correct |
1 ms |
6748 KB |
Output is correct |
53 |
Correct |
1 ms |
6748 KB |
Output is correct |
54 |
Correct |
1 ms |
6760 KB |
Output is correct |
55 |
Correct |
1 ms |
6748 KB |
Output is correct |
56 |
Correct |
1 ms |
6748 KB |
Output is correct |
57 |
Correct |
1 ms |
6760 KB |
Output is correct |
58 |
Correct |
1 ms |
6744 KB |
Output is correct |
59 |
Correct |
1 ms |
6748 KB |
Output is correct |
60 |
Correct |
1 ms |
6748 KB |
Output is correct |
61 |
Correct |
1 ms |
6748 KB |
Output is correct |
62 |
Correct |
1 ms |
6752 KB |
Output is correct |
63 |
Correct |
1 ms |
6756 KB |
Output is correct |
64 |
Correct |
1 ms |
6760 KB |
Output is correct |
65 |
Correct |
1 ms |
6760 KB |
Output is correct |
66 |
Correct |
1 ms |
6760 KB |
Output is correct |
67 |
Correct |
2 ms |
6760 KB |
Output is correct |
68 |
Correct |
3 ms |
6880 KB |
Output is correct |
69 |
Correct |
2 ms |
6748 KB |
Output is correct |
70 |
Correct |
3 ms |
6748 KB |
Output is correct |
71 |
Correct |
8 ms |
6748 KB |
Output is correct |
72 |
Correct |
7 ms |
6744 KB |
Output is correct |
73 |
Correct |
4 ms |
7004 KB |
Output is correct |
74 |
Correct |
2 ms |
6744 KB |
Output is correct |
75 |
Correct |
2 ms |
6748 KB |
Output is correct |
76 |
Correct |
8 ms |
9052 KB |
Output is correct |
77 |
Correct |
14 ms |
9488 KB |
Output is correct |
78 |
Correct |
3 ms |
7260 KB |
Output is correct |
79 |
Correct |
3 ms |
7516 KB |
Output is correct |
80 |
Correct |
4 ms |
6892 KB |
Output is correct |
81 |
Correct |
5 ms |
6844 KB |
Output is correct |
82 |
Correct |
2 ms |
6840 KB |
Output is correct |
83 |
Correct |
2 ms |
6816 KB |
Output is correct |
84 |
Correct |
5 ms |
6748 KB |
Output is correct |
85 |
Correct |
14 ms |
6748 KB |
Output is correct |
86 |
Correct |
9 ms |
7004 KB |
Output is correct |
87 |
Correct |
11 ms |
7004 KB |
Output is correct |
88 |
Correct |
11 ms |
6940 KB |
Output is correct |
89 |
Correct |
320 ms |
7444 KB |
Output is correct |
90 |
Correct |
290 ms |
7780 KB |
Output is correct |
91 |
Correct |
81 ms |
11096 KB |
Output is correct |
92 |
Correct |
37 ms |
7260 KB |
Output is correct |
93 |
Correct |
43 ms |
9308 KB |
Output is correct |
94 |
Correct |
293 ms |
74584 KB |
Output is correct |
95 |
Correct |
616 ms |
99832 KB |
Output is correct |
96 |
Correct |
149 ms |
40536 KB |
Output is correct |
97 |
Correct |
597 ms |
47272 KB |
Output is correct |
98 |
Correct |
78 ms |
7512 KB |
Output is correct |
99 |
Correct |
357 ms |
7416 KB |
Output is correct |
100 |
Correct |
33 ms |
7004 KB |
Output is correct |
101 |
Correct |
26 ms |
6744 KB |
Output is correct |
102 |
Correct |
474 ms |
12080 KB |
Output is correct |
103 |
Execution timed out |
1064 ms |
11996 KB |
Time limit exceeded |
104 |
Halted |
0 ms |
0 KB |
- |