#include "closing.h"
#include <bits/stdc++.h>
using namespace std;
vector <pair <int, int>> ke[200001];
long long d[200001][2],cur;
int p[200001],ch[200001],vis[200001],inset[200001];
set <pair <long long, int>> s,s2;
void dfs(int u, int i, int par=-1){
for (auto [v,w]:ke[u])
if (v!=par){
d[v][i]=d[u][i]+w;
p[v]=u;
dfs(v,i,u);
}
}
void dfs2(int u, int par){
for (auto [v,w]:ke[u]){
if (!ch[v]&&v!=par){
if (!vis[v]&&min(d[v][0],d[v][1])*2>max(d[v][0],d[v][1])){
s2.insert({max(d[v][0],d[v][1]),v});
inset[v]=1;
}
dfs2(v,u);
}
}
}
int f(int N, long long K, int b, int b2){
cur=0;
int cnt=0;
for (int i=0;i<N;i++){
vis[i]=inset[i]=0;
if (min(d[i][0],d[i][1])>K)
continue;
if (ch[i]){
s.insert({abs(d[i][0]-d[i][1]),i});
cur+=min(d[i][0],d[i][1]);
cnt++;
}
else{
s.insert({min(d[i][0],d[i][1]),i});
if (min(d[i][0],d[i][1])*2<=max(d[i][0],d[i][1]))
s.insert({abs(d[i][0]-d[i][1]),i});
}
}
while (!s.empty()){
int i=0,y=0;
long long x=0;
auto [c,u]=*s.begin();
s.erase(s.begin());
if (s2.empty())
x=c,i=u,y=1;
else{
auto [c2,u2]=*s2.begin();
s2.erase(s2.begin());
if (s.empty()){
s.insert({c,u});
x=c2;
i=u2;
y=2;
}
else{
bool ch=0;
if (b2)
ch=(c+(*s.begin()).first<c2||(c+(*s.begin()).first==c2&&b));
else
ch=c>c2;
if (u!=u2&&ch){
s2.insert({c2,u2});
x=c;
i=u;
y=1;
}
else{
s.insert({c,u});
x=c2;
i=u2;
y=2;
}
}
}
if (cur+x>K)
break;
cur+=x;
cnt+=y;
if (y==1&&!vis[i]){
if (ch[i])
dfs2(i,i);
else{
s.insert({abs(d[i][0]-d[i][1]),i});
if (inset[i])
s2.erase(s2.find({max(d[i][0],d[i][1]),i}));
}
}
if (y==2&&!vis[i])
s.erase(s.find({min(d[i][0],d[i][1]),i}));
vis[i]=1;
}
while (!s.empty()&&cur+(*s.begin()).first<=K){
cur+=(*s.begin()).first;
cnt++;
s.erase(s.begin());
}
while (!s2.empty()&&cur+(*s2.begin()).first<=K){
cur+=(*s2.begin()).first;
cnt+=2;
s2.erase(s2.begin());
}
s.clear();
s2.clear();
return (cur>K?0:cnt);
}
int max_score(int N, int X, int Y, long long K, vector<int> U, vector<int> V, vector<int> W){
for (int i=0;i<N-1;i++){
ke[U[i]].push_back({V[i],W[i]});
ke[V[i]].push_back({U[i],W[i]});
}
fill(ch,ch+N,0);
d[X][0]=d[Y][1]=0;
dfs(X,0);
dfs(Y,1);
for (;X!=Y;X=p[X])
ch[X]=1;
ch[Y]=1;
int res=0;
for (int i=0;i<N;i++)
s.insert({min(d[i][0],d[i][1]),i});
cur=0;
while (!s.empty()&&cur+(*s.begin()).first<=K){
cur+=(*s.begin()).first;
res++;
s.erase(s.begin());
}
s.clear();
for (int i=0;i<2;i++)
for (int j=0;j<2;j++)
res=max(res,f(N,K,i,j));
for (int i=0;i<N;i++)
ke[i].clear();
return res;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
11100 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
614 ms |
41420 KB |
Output is correct |
2 |
Execution timed out |
1050 ms |
48736 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
11100 KB |
Output is correct |
2 |
Correct |
3 ms |
11100 KB |
Output is correct |
3 |
Correct |
3 ms |
11100 KB |
Output is correct |
4 |
Correct |
3 ms |
11100 KB |
Output is correct |
5 |
Correct |
4 ms |
11100 KB |
Output is correct |
6 |
Correct |
3 ms |
11100 KB |
Output is correct |
7 |
Correct |
3 ms |
11100 KB |
Output is correct |
8 |
Correct |
3 ms |
11100 KB |
Output is correct |
9 |
Correct |
3 ms |
11100 KB |
Output is correct |
10 |
Correct |
2 ms |
11100 KB |
Output is correct |
11 |
Correct |
3 ms |
11184 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
11100 KB |
Output is correct |
2 |
Correct |
3 ms |
11100 KB |
Output is correct |
3 |
Correct |
3 ms |
11100 KB |
Output is correct |
4 |
Correct |
3 ms |
11100 KB |
Output is correct |
5 |
Correct |
4 ms |
11100 KB |
Output is correct |
6 |
Correct |
3 ms |
11100 KB |
Output is correct |
7 |
Correct |
3 ms |
11100 KB |
Output is correct |
8 |
Correct |
3 ms |
11100 KB |
Output is correct |
9 |
Correct |
3 ms |
11100 KB |
Output is correct |
10 |
Correct |
2 ms |
11100 KB |
Output is correct |
11 |
Correct |
3 ms |
11184 KB |
Output is correct |
12 |
Correct |
4 ms |
11096 KB |
Output is correct |
13 |
Correct |
3 ms |
11100 KB |
Output is correct |
14 |
Correct |
3 ms |
11100 KB |
Output is correct |
15 |
Correct |
3 ms |
11100 KB |
Output is correct |
16 |
Correct |
2 ms |
11100 KB |
Output is correct |
17 |
Correct |
3 ms |
11232 KB |
Output is correct |
18 |
Correct |
4 ms |
11100 KB |
Output is correct |
19 |
Correct |
4 ms |
11100 KB |
Output is correct |
20 |
Correct |
3 ms |
11100 KB |
Output is correct |
21 |
Correct |
3 ms |
11100 KB |
Output is correct |
22 |
Correct |
3 ms |
11100 KB |
Output is correct |
23 |
Correct |
3 ms |
11100 KB |
Output is correct |
24 |
Correct |
3 ms |
11100 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
11100 KB |
Output is correct |
2 |
Correct |
3 ms |
11100 KB |
Output is correct |
3 |
Correct |
3 ms |
11100 KB |
Output is correct |
4 |
Correct |
3 ms |
11100 KB |
Output is correct |
5 |
Correct |
4 ms |
11100 KB |
Output is correct |
6 |
Correct |
3 ms |
11100 KB |
Output is correct |
7 |
Correct |
3 ms |
11100 KB |
Output is correct |
8 |
Correct |
3 ms |
11100 KB |
Output is correct |
9 |
Correct |
3 ms |
11100 KB |
Output is correct |
10 |
Correct |
2 ms |
11100 KB |
Output is correct |
11 |
Correct |
3 ms |
11184 KB |
Output is correct |
12 |
Correct |
4 ms |
11096 KB |
Output is correct |
13 |
Correct |
3 ms |
11100 KB |
Output is correct |
14 |
Correct |
3 ms |
11100 KB |
Output is correct |
15 |
Correct |
3 ms |
11100 KB |
Output is correct |
16 |
Correct |
2 ms |
11100 KB |
Output is correct |
17 |
Correct |
3 ms |
11232 KB |
Output is correct |
18 |
Correct |
4 ms |
11100 KB |
Output is correct |
19 |
Correct |
4 ms |
11100 KB |
Output is correct |
20 |
Correct |
3 ms |
11100 KB |
Output is correct |
21 |
Correct |
3 ms |
11100 KB |
Output is correct |
22 |
Correct |
3 ms |
11100 KB |
Output is correct |
23 |
Correct |
3 ms |
11100 KB |
Output is correct |
24 |
Correct |
3 ms |
11100 KB |
Output is correct |
25 |
Correct |
6 ms |
11352 KB |
Output is correct |
26 |
Correct |
7 ms |
11988 KB |
Output is correct |
27 |
Correct |
4 ms |
11612 KB |
Output is correct |
28 |
Correct |
7 ms |
11732 KB |
Output is correct |
29 |
Correct |
7 ms |
11612 KB |
Output is correct |
30 |
Correct |
4 ms |
11608 KB |
Output is correct |
31 |
Correct |
5 ms |
11608 KB |
Output is correct |
32 |
Correct |
5 ms |
11612 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
11100 KB |
Output is correct |
2 |
Correct |
4 ms |
11100 KB |
Output is correct |
3 |
Correct |
3 ms |
11100 KB |
Output is correct |
4 |
Correct |
3 ms |
11100 KB |
Output is correct |
5 |
Correct |
3 ms |
11100 KB |
Output is correct |
6 |
Correct |
4 ms |
11100 KB |
Output is correct |
7 |
Correct |
2 ms |
11100 KB |
Output is correct |
8 |
Correct |
3 ms |
11100 KB |
Output is correct |
9 |
Correct |
4 ms |
11100 KB |
Output is correct |
10 |
Correct |
4 ms |
11096 KB |
Output is correct |
11 |
Correct |
3 ms |
11196 KB |
Output is correct |
12 |
Correct |
5 ms |
11100 KB |
Output is correct |
13 |
Correct |
3 ms |
11100 KB |
Output is correct |
14 |
Correct |
4 ms |
11100 KB |
Output is correct |
15 |
Correct |
3 ms |
11100 KB |
Output is correct |
16 |
Correct |
3 ms |
11100 KB |
Output is correct |
17 |
Correct |
4 ms |
11100 KB |
Output is correct |
18 |
Correct |
3 ms |
11100 KB |
Output is correct |
19 |
Correct |
4 ms |
11100 KB |
Output is correct |
20 |
Correct |
3 ms |
11100 KB |
Output is correct |
21 |
Correct |
2 ms |
11208 KB |
Output is correct |
22 |
Correct |
3 ms |
11224 KB |
Output is correct |
23 |
Correct |
3 ms |
11096 KB |
Output is correct |
24 |
Correct |
3 ms |
11096 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
11100 KB |
Output is correct |
2 |
Correct |
4 ms |
11100 KB |
Output is correct |
3 |
Correct |
3 ms |
11100 KB |
Output is correct |
4 |
Correct |
3 ms |
11100 KB |
Output is correct |
5 |
Correct |
3 ms |
11100 KB |
Output is correct |
6 |
Correct |
4 ms |
11100 KB |
Output is correct |
7 |
Correct |
3 ms |
11100 KB |
Output is correct |
8 |
Correct |
3 ms |
11100 KB |
Output is correct |
9 |
Correct |
3 ms |
11100 KB |
Output is correct |
10 |
Correct |
3 ms |
11100 KB |
Output is correct |
11 |
Correct |
2 ms |
11100 KB |
Output is correct |
12 |
Correct |
3 ms |
11184 KB |
Output is correct |
13 |
Correct |
4 ms |
11096 KB |
Output is correct |
14 |
Correct |
3 ms |
11100 KB |
Output is correct |
15 |
Correct |
3 ms |
11100 KB |
Output is correct |
16 |
Correct |
3 ms |
11100 KB |
Output is correct |
17 |
Correct |
2 ms |
11100 KB |
Output is correct |
18 |
Correct |
3 ms |
11232 KB |
Output is correct |
19 |
Correct |
2 ms |
11100 KB |
Output is correct |
20 |
Correct |
3 ms |
11100 KB |
Output is correct |
21 |
Correct |
4 ms |
11100 KB |
Output is correct |
22 |
Correct |
4 ms |
11096 KB |
Output is correct |
23 |
Correct |
3 ms |
11196 KB |
Output is correct |
24 |
Correct |
5 ms |
11100 KB |
Output is correct |
25 |
Correct |
3 ms |
11100 KB |
Output is correct |
26 |
Correct |
4 ms |
11100 KB |
Output is correct |
27 |
Correct |
3 ms |
11100 KB |
Output is correct |
28 |
Correct |
3 ms |
11100 KB |
Output is correct |
29 |
Correct |
4 ms |
11100 KB |
Output is correct |
30 |
Correct |
3 ms |
11100 KB |
Output is correct |
31 |
Correct |
4 ms |
11100 KB |
Output is correct |
32 |
Correct |
3 ms |
11100 KB |
Output is correct |
33 |
Correct |
2 ms |
11208 KB |
Output is correct |
34 |
Correct |
3 ms |
11224 KB |
Output is correct |
35 |
Correct |
3 ms |
11096 KB |
Output is correct |
36 |
Correct |
3 ms |
11096 KB |
Output is correct |
37 |
Correct |
3 ms |
11096 KB |
Output is correct |
38 |
Correct |
3 ms |
11100 KB |
Output is correct |
39 |
Correct |
3 ms |
11096 KB |
Output is correct |
40 |
Correct |
3 ms |
11100 KB |
Output is correct |
41 |
Correct |
2 ms |
11100 KB |
Output is correct |
42 |
Correct |
3 ms |
11100 KB |
Output is correct |
43 |
Correct |
2 ms |
11100 KB |
Output is correct |
44 |
Correct |
3 ms |
11100 KB |
Output is correct |
45 |
Correct |
3 ms |
11100 KB |
Output is correct |
46 |
Correct |
4 ms |
11252 KB |
Output is correct |
47 |
Correct |
2 ms |
11100 KB |
Output is correct |
48 |
Correct |
3 ms |
11100 KB |
Output is correct |
49 |
Correct |
3 ms |
11096 KB |
Output is correct |
50 |
Correct |
3 ms |
11100 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
11100 KB |
Output is correct |
2 |
Correct |
4 ms |
11100 KB |
Output is correct |
3 |
Correct |
3 ms |
11100 KB |
Output is correct |
4 |
Correct |
3 ms |
11100 KB |
Output is correct |
5 |
Correct |
3 ms |
11100 KB |
Output is correct |
6 |
Correct |
4 ms |
11100 KB |
Output is correct |
7 |
Correct |
3 ms |
11100 KB |
Output is correct |
8 |
Correct |
3 ms |
11100 KB |
Output is correct |
9 |
Correct |
3 ms |
11100 KB |
Output is correct |
10 |
Correct |
3 ms |
11100 KB |
Output is correct |
11 |
Correct |
2 ms |
11100 KB |
Output is correct |
12 |
Correct |
3 ms |
11184 KB |
Output is correct |
13 |
Correct |
4 ms |
11096 KB |
Output is correct |
14 |
Correct |
3 ms |
11100 KB |
Output is correct |
15 |
Correct |
3 ms |
11100 KB |
Output is correct |
16 |
Correct |
3 ms |
11100 KB |
Output is correct |
17 |
Correct |
2 ms |
11100 KB |
Output is correct |
18 |
Correct |
3 ms |
11232 KB |
Output is correct |
19 |
Correct |
4 ms |
11100 KB |
Output is correct |
20 |
Correct |
4 ms |
11100 KB |
Output is correct |
21 |
Correct |
3 ms |
11100 KB |
Output is correct |
22 |
Correct |
3 ms |
11100 KB |
Output is correct |
23 |
Correct |
3 ms |
11100 KB |
Output is correct |
24 |
Correct |
3 ms |
11100 KB |
Output is correct |
25 |
Correct |
3 ms |
11100 KB |
Output is correct |
26 |
Correct |
2 ms |
11100 KB |
Output is correct |
27 |
Correct |
3 ms |
11100 KB |
Output is correct |
28 |
Correct |
4 ms |
11100 KB |
Output is correct |
29 |
Correct |
4 ms |
11096 KB |
Output is correct |
30 |
Correct |
3 ms |
11196 KB |
Output is correct |
31 |
Correct |
5 ms |
11100 KB |
Output is correct |
32 |
Correct |
3 ms |
11100 KB |
Output is correct |
33 |
Correct |
4 ms |
11100 KB |
Output is correct |
34 |
Correct |
3 ms |
11100 KB |
Output is correct |
35 |
Correct |
3 ms |
11100 KB |
Output is correct |
36 |
Correct |
4 ms |
11100 KB |
Output is correct |
37 |
Correct |
3 ms |
11100 KB |
Output is correct |
38 |
Correct |
4 ms |
11100 KB |
Output is correct |
39 |
Correct |
3 ms |
11100 KB |
Output is correct |
40 |
Correct |
2 ms |
11208 KB |
Output is correct |
41 |
Correct |
3 ms |
11224 KB |
Output is correct |
42 |
Correct |
3 ms |
11096 KB |
Output is correct |
43 |
Correct |
3 ms |
11096 KB |
Output is correct |
44 |
Correct |
3 ms |
11096 KB |
Output is correct |
45 |
Correct |
3 ms |
11100 KB |
Output is correct |
46 |
Correct |
3 ms |
11096 KB |
Output is correct |
47 |
Correct |
3 ms |
11100 KB |
Output is correct |
48 |
Correct |
2 ms |
11100 KB |
Output is correct |
49 |
Correct |
3 ms |
11100 KB |
Output is correct |
50 |
Correct |
2 ms |
11100 KB |
Output is correct |
51 |
Correct |
3 ms |
11100 KB |
Output is correct |
52 |
Correct |
3 ms |
11100 KB |
Output is correct |
53 |
Correct |
4 ms |
11252 KB |
Output is correct |
54 |
Correct |
2 ms |
11100 KB |
Output is correct |
55 |
Correct |
3 ms |
11100 KB |
Output is correct |
56 |
Correct |
3 ms |
11096 KB |
Output is correct |
57 |
Correct |
3 ms |
11100 KB |
Output is correct |
58 |
Correct |
3 ms |
11100 KB |
Output is correct |
59 |
Correct |
3 ms |
11096 KB |
Output is correct |
60 |
Correct |
4 ms |
11096 KB |
Output is correct |
61 |
Correct |
3 ms |
11096 KB |
Output is correct |
62 |
Correct |
3 ms |
11100 KB |
Output is correct |
63 |
Correct |
3 ms |
11096 KB |
Output is correct |
64 |
Correct |
4 ms |
11096 KB |
Output is correct |
65 |
Correct |
3 ms |
11096 KB |
Output is correct |
66 |
Correct |
3 ms |
11096 KB |
Output is correct |
67 |
Correct |
3 ms |
11100 KB |
Output is correct |
68 |
Correct |
3 ms |
11100 KB |
Output is correct |
69 |
Correct |
3 ms |
11100 KB |
Output is correct |
70 |
Correct |
3 ms |
11100 KB |
Output is correct |
71 |
Correct |
4 ms |
11100 KB |
Output is correct |
72 |
Correct |
3 ms |
11100 KB |
Output is correct |
73 |
Correct |
4 ms |
11100 KB |
Output is correct |
74 |
Correct |
3 ms |
11100 KB |
Output is correct |
75 |
Correct |
4 ms |
11100 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
11100 KB |
Output is correct |
2 |
Correct |
4 ms |
11100 KB |
Output is correct |
3 |
Correct |
3 ms |
11100 KB |
Output is correct |
4 |
Correct |
3 ms |
11100 KB |
Output is correct |
5 |
Correct |
3 ms |
11100 KB |
Output is correct |
6 |
Correct |
4 ms |
11100 KB |
Output is correct |
7 |
Correct |
3 ms |
11100 KB |
Output is correct |
8 |
Correct |
3 ms |
11100 KB |
Output is correct |
9 |
Correct |
3 ms |
11100 KB |
Output is correct |
10 |
Correct |
3 ms |
11100 KB |
Output is correct |
11 |
Correct |
2 ms |
11100 KB |
Output is correct |
12 |
Correct |
3 ms |
11184 KB |
Output is correct |
13 |
Correct |
4 ms |
11096 KB |
Output is correct |
14 |
Correct |
3 ms |
11100 KB |
Output is correct |
15 |
Correct |
3 ms |
11100 KB |
Output is correct |
16 |
Correct |
3 ms |
11100 KB |
Output is correct |
17 |
Correct |
2 ms |
11100 KB |
Output is correct |
18 |
Correct |
3 ms |
11232 KB |
Output is correct |
19 |
Correct |
4 ms |
11100 KB |
Output is correct |
20 |
Correct |
4 ms |
11100 KB |
Output is correct |
21 |
Correct |
3 ms |
11100 KB |
Output is correct |
22 |
Correct |
3 ms |
11100 KB |
Output is correct |
23 |
Correct |
3 ms |
11100 KB |
Output is correct |
24 |
Correct |
3 ms |
11100 KB |
Output is correct |
25 |
Correct |
3 ms |
11100 KB |
Output is correct |
26 |
Correct |
6 ms |
11352 KB |
Output is correct |
27 |
Correct |
7 ms |
11988 KB |
Output is correct |
28 |
Correct |
4 ms |
11612 KB |
Output is correct |
29 |
Correct |
7 ms |
11732 KB |
Output is correct |
30 |
Correct |
7 ms |
11612 KB |
Output is correct |
31 |
Correct |
4 ms |
11608 KB |
Output is correct |
32 |
Correct |
5 ms |
11608 KB |
Output is correct |
33 |
Correct |
5 ms |
11612 KB |
Output is correct |
34 |
Correct |
2 ms |
11100 KB |
Output is correct |
35 |
Correct |
3 ms |
11100 KB |
Output is correct |
36 |
Correct |
4 ms |
11100 KB |
Output is correct |
37 |
Correct |
4 ms |
11096 KB |
Output is correct |
38 |
Correct |
3 ms |
11196 KB |
Output is correct |
39 |
Correct |
5 ms |
11100 KB |
Output is correct |
40 |
Correct |
3 ms |
11100 KB |
Output is correct |
41 |
Correct |
4 ms |
11100 KB |
Output is correct |
42 |
Correct |
3 ms |
11100 KB |
Output is correct |
43 |
Correct |
3 ms |
11100 KB |
Output is correct |
44 |
Correct |
4 ms |
11100 KB |
Output is correct |
45 |
Correct |
3 ms |
11100 KB |
Output is correct |
46 |
Correct |
4 ms |
11100 KB |
Output is correct |
47 |
Correct |
3 ms |
11100 KB |
Output is correct |
48 |
Correct |
2 ms |
11208 KB |
Output is correct |
49 |
Correct |
3 ms |
11224 KB |
Output is correct |
50 |
Correct |
3 ms |
11096 KB |
Output is correct |
51 |
Correct |
3 ms |
11096 KB |
Output is correct |
52 |
Correct |
3 ms |
11096 KB |
Output is correct |
53 |
Correct |
3 ms |
11100 KB |
Output is correct |
54 |
Correct |
3 ms |
11096 KB |
Output is correct |
55 |
Correct |
3 ms |
11100 KB |
Output is correct |
56 |
Correct |
2 ms |
11100 KB |
Output is correct |
57 |
Correct |
3 ms |
11100 KB |
Output is correct |
58 |
Correct |
2 ms |
11100 KB |
Output is correct |
59 |
Correct |
3 ms |
11100 KB |
Output is correct |
60 |
Correct |
3 ms |
11100 KB |
Output is correct |
61 |
Correct |
4 ms |
11252 KB |
Output is correct |
62 |
Correct |
2 ms |
11100 KB |
Output is correct |
63 |
Correct |
3 ms |
11100 KB |
Output is correct |
64 |
Correct |
3 ms |
11096 KB |
Output is correct |
65 |
Correct |
3 ms |
11100 KB |
Output is correct |
66 |
Correct |
3 ms |
11100 KB |
Output is correct |
67 |
Correct |
3 ms |
11096 KB |
Output is correct |
68 |
Correct |
4 ms |
11096 KB |
Output is correct |
69 |
Correct |
3 ms |
11096 KB |
Output is correct |
70 |
Correct |
3 ms |
11100 KB |
Output is correct |
71 |
Correct |
3 ms |
11096 KB |
Output is correct |
72 |
Correct |
4 ms |
11096 KB |
Output is correct |
73 |
Correct |
3 ms |
11096 KB |
Output is correct |
74 |
Correct |
3 ms |
11096 KB |
Output is correct |
75 |
Correct |
3 ms |
11100 KB |
Output is correct |
76 |
Correct |
3 ms |
11100 KB |
Output is correct |
77 |
Correct |
3 ms |
11100 KB |
Output is correct |
78 |
Correct |
3 ms |
11100 KB |
Output is correct |
79 |
Correct |
4 ms |
11100 KB |
Output is correct |
80 |
Correct |
3 ms |
11100 KB |
Output is correct |
81 |
Correct |
4 ms |
11100 KB |
Output is correct |
82 |
Correct |
3 ms |
11100 KB |
Output is correct |
83 |
Correct |
4 ms |
11100 KB |
Output is correct |
84 |
Correct |
7 ms |
11096 KB |
Output is correct |
85 |
Correct |
7 ms |
11100 KB |
Output is correct |
86 |
Correct |
5 ms |
11100 KB |
Output is correct |
87 |
Correct |
6 ms |
11100 KB |
Output is correct |
88 |
Correct |
6 ms |
11100 KB |
Output is correct |
89 |
Correct |
8 ms |
11612 KB |
Output is correct |
90 |
Correct |
8 ms |
11608 KB |
Output is correct |
91 |
Correct |
7 ms |
11612 KB |
Output is correct |
92 |
Correct |
4 ms |
11356 KB |
Output is correct |
93 |
Correct |
4 ms |
11356 KB |
Output is correct |
94 |
Correct |
5 ms |
11612 KB |
Output is correct |
95 |
Correct |
5 ms |
11612 KB |
Output is correct |
96 |
Correct |
7 ms |
11568 KB |
Output is correct |
97 |
Correct |
10 ms |
11608 KB |
Output is correct |
98 |
Correct |
7 ms |
11608 KB |
Output is correct |
99 |
Correct |
10 ms |
11608 KB |
Output is correct |
100 |
Correct |
7 ms |
11356 KB |
Output is correct |
101 |
Correct |
7 ms |
11356 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
11100 KB |
Output is correct |
2 |
Correct |
4 ms |
11100 KB |
Output is correct |
3 |
Correct |
3 ms |
11100 KB |
Output is correct |
4 |
Correct |
3 ms |
11100 KB |
Output is correct |
5 |
Correct |
3 ms |
11100 KB |
Output is correct |
6 |
Correct |
4 ms |
11100 KB |
Output is correct |
7 |
Correct |
3 ms |
11100 KB |
Output is correct |
8 |
Correct |
3 ms |
11100 KB |
Output is correct |
9 |
Correct |
3 ms |
11100 KB |
Output is correct |
10 |
Correct |
3 ms |
11100 KB |
Output is correct |
11 |
Correct |
2 ms |
11100 KB |
Output is correct |
12 |
Correct |
3 ms |
11184 KB |
Output is correct |
13 |
Correct |
4 ms |
11096 KB |
Output is correct |
14 |
Correct |
3 ms |
11100 KB |
Output is correct |
15 |
Correct |
3 ms |
11100 KB |
Output is correct |
16 |
Correct |
3 ms |
11100 KB |
Output is correct |
17 |
Correct |
2 ms |
11100 KB |
Output is correct |
18 |
Correct |
3 ms |
11232 KB |
Output is correct |
19 |
Correct |
4 ms |
11100 KB |
Output is correct |
20 |
Correct |
4 ms |
11100 KB |
Output is correct |
21 |
Correct |
3 ms |
11100 KB |
Output is correct |
22 |
Correct |
3 ms |
11100 KB |
Output is correct |
23 |
Correct |
3 ms |
11100 KB |
Output is correct |
24 |
Correct |
3 ms |
11100 KB |
Output is correct |
25 |
Correct |
3 ms |
11100 KB |
Output is correct |
26 |
Correct |
6 ms |
11352 KB |
Output is correct |
27 |
Correct |
7 ms |
11988 KB |
Output is correct |
28 |
Correct |
4 ms |
11612 KB |
Output is correct |
29 |
Correct |
7 ms |
11732 KB |
Output is correct |
30 |
Correct |
7 ms |
11612 KB |
Output is correct |
31 |
Correct |
4 ms |
11608 KB |
Output is correct |
32 |
Correct |
5 ms |
11608 KB |
Output is correct |
33 |
Correct |
5 ms |
11612 KB |
Output is correct |
34 |
Correct |
2 ms |
11100 KB |
Output is correct |
35 |
Correct |
3 ms |
11100 KB |
Output is correct |
36 |
Correct |
4 ms |
11100 KB |
Output is correct |
37 |
Correct |
4 ms |
11096 KB |
Output is correct |
38 |
Correct |
3 ms |
11196 KB |
Output is correct |
39 |
Correct |
5 ms |
11100 KB |
Output is correct |
40 |
Correct |
3 ms |
11100 KB |
Output is correct |
41 |
Correct |
4 ms |
11100 KB |
Output is correct |
42 |
Correct |
3 ms |
11100 KB |
Output is correct |
43 |
Correct |
3 ms |
11100 KB |
Output is correct |
44 |
Correct |
4 ms |
11100 KB |
Output is correct |
45 |
Correct |
3 ms |
11100 KB |
Output is correct |
46 |
Correct |
4 ms |
11100 KB |
Output is correct |
47 |
Correct |
3 ms |
11100 KB |
Output is correct |
48 |
Correct |
2 ms |
11208 KB |
Output is correct |
49 |
Correct |
3 ms |
11224 KB |
Output is correct |
50 |
Correct |
3 ms |
11096 KB |
Output is correct |
51 |
Correct |
3 ms |
11096 KB |
Output is correct |
52 |
Correct |
3 ms |
11096 KB |
Output is correct |
53 |
Correct |
3 ms |
11100 KB |
Output is correct |
54 |
Correct |
3 ms |
11096 KB |
Output is correct |
55 |
Correct |
3 ms |
11100 KB |
Output is correct |
56 |
Correct |
2 ms |
11100 KB |
Output is correct |
57 |
Correct |
3 ms |
11100 KB |
Output is correct |
58 |
Correct |
2 ms |
11100 KB |
Output is correct |
59 |
Correct |
3 ms |
11100 KB |
Output is correct |
60 |
Correct |
3 ms |
11100 KB |
Output is correct |
61 |
Correct |
4 ms |
11252 KB |
Output is correct |
62 |
Correct |
2 ms |
11100 KB |
Output is correct |
63 |
Correct |
3 ms |
11100 KB |
Output is correct |
64 |
Correct |
3 ms |
11096 KB |
Output is correct |
65 |
Correct |
3 ms |
11100 KB |
Output is correct |
66 |
Correct |
3 ms |
11100 KB |
Output is correct |
67 |
Correct |
3 ms |
11096 KB |
Output is correct |
68 |
Correct |
4 ms |
11096 KB |
Output is correct |
69 |
Correct |
3 ms |
11096 KB |
Output is correct |
70 |
Correct |
3 ms |
11100 KB |
Output is correct |
71 |
Correct |
3 ms |
11096 KB |
Output is correct |
72 |
Correct |
4 ms |
11096 KB |
Output is correct |
73 |
Correct |
3 ms |
11096 KB |
Output is correct |
74 |
Correct |
3 ms |
11096 KB |
Output is correct |
75 |
Correct |
3 ms |
11100 KB |
Output is correct |
76 |
Correct |
3 ms |
11100 KB |
Output is correct |
77 |
Correct |
3 ms |
11100 KB |
Output is correct |
78 |
Correct |
3 ms |
11100 KB |
Output is correct |
79 |
Correct |
4 ms |
11100 KB |
Output is correct |
80 |
Correct |
3 ms |
11100 KB |
Output is correct |
81 |
Correct |
4 ms |
11100 KB |
Output is correct |
82 |
Correct |
3 ms |
11100 KB |
Output is correct |
83 |
Correct |
4 ms |
11100 KB |
Output is correct |
84 |
Correct |
7 ms |
11096 KB |
Output is correct |
85 |
Correct |
7 ms |
11100 KB |
Output is correct |
86 |
Correct |
5 ms |
11100 KB |
Output is correct |
87 |
Correct |
6 ms |
11100 KB |
Output is correct |
88 |
Correct |
6 ms |
11100 KB |
Output is correct |
89 |
Correct |
8 ms |
11612 KB |
Output is correct |
90 |
Correct |
8 ms |
11608 KB |
Output is correct |
91 |
Correct |
7 ms |
11612 KB |
Output is correct |
92 |
Correct |
4 ms |
11356 KB |
Output is correct |
93 |
Correct |
4 ms |
11356 KB |
Output is correct |
94 |
Correct |
5 ms |
11612 KB |
Output is correct |
95 |
Correct |
5 ms |
11612 KB |
Output is correct |
96 |
Correct |
7 ms |
11568 KB |
Output is correct |
97 |
Correct |
10 ms |
11608 KB |
Output is correct |
98 |
Correct |
7 ms |
11608 KB |
Output is correct |
99 |
Correct |
10 ms |
11608 KB |
Output is correct |
100 |
Correct |
7 ms |
11356 KB |
Output is correct |
101 |
Correct |
7 ms |
11356 KB |
Output is correct |
102 |
Correct |
269 ms |
13864 KB |
Output is correct |
103 |
Correct |
317 ms |
13904 KB |
Output is correct |
104 |
Execution timed out |
1020 ms |
47084 KB |
Time limit exceeded |
105 |
Halted |
0 ms |
0 KB |
- |