#include<bits/stdc++.h>
#include<fstream>
#include<closing.h>
using namespace std;
//ifstream fin("FEEDING.INP");
//ofstream fout("FEEDING.OUT");
#define sz(a) (int)a.size()
#define ll long long
#define pb push_back
#define forr(i, a, b) for(int i = a; i < b; i++)
#define dorr(i, a, b) for(int i = a; i >= b; i--)
#define ld long double
#define vt vector
#include<fstream>
#define fi first
#define se second
#define pll pair<ll, ll>
#define pii pair<int, int>
const ll mxn = 2e5 + 5, inf = 1e18;
int n, x, y;
ll k;
int mxres = 0;
vt<pll>adj[mxn + 1];
vt<ll>compdep;
ll dp[3005][6005], distx[mxn + 1], disty[mxn + 1];
int u[mxn + 1], v[mxn + 1], w[mxn + 1];
bool path[mxn + 1];
int pa[3005];
void dfs(int s, int pre, ll dep, int root){
if(root == x)distx[s] = dep;
else disty[s] = dep;
pa[s] = pre;
for(auto [v, w]: adj[s]){
if(v != pre){
dfs(v, s, dep + w, root);
}
}
}
void ckmin(ll &a, ll b){
a = min(a, b);
}
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; x = ++X; y = ++Y; k = K;
for(int i = 1; i <= n; i++){
adj[i].clear(); path[i] = 0;
}
bool ok = 1;
for(int i = 0; i < n - 1; i++){
u[i] = ++U[i]; v[i] = ++V[i]; w[i] = W[i];
adj[u[i]].pb(make_pair(v[i], w[i])); adj[v[i]].pb(make_pair(u[i], w[i]));
}
dfs(x, -1, 0, x); dfs(y, -1, 0, y);
vt<ll>comp;
for(int i = 1; i <= n; i++)comp.pb(min(distx[i], disty[i]));
sort(comp.begin(), comp.end());
ll curr = 0;
int ans = 0;
for(int i = 0; i < sz(comp); i++){
if(curr + comp[i] <= k){
curr += comp[i]; ans++;
}
}
if(n <= 3000){
int node = x;
do{
path[node] = 1;
node = pa[node];
}while(node != y);
path[y] = 1;
for(int j = 0; j <= n; j++){
for(int l = 0; l <= 2 * n; l++){
dp[j][l] = inf;
}
}
dp[0][0] = 0;
for(int i = 0; i < n; i++){
for(int j = 0; j <= 2 * n; j++){
if(dp[i][j] == inf)continue;
if(path[i + 1]){
ckmin(dp[i + 1][j + 1], dp[i][j] + min(distx[i + 1], disty[i + 1]));
ckmin(dp[i + 1][j + 2], dp[i][j] + max(distx[i + 1], disty[i + 1]));
}else{
ckmin(dp[i + 1][j], dp[i][j]);
ckmin(dp[i + 1][j + 1], dp[i][j] + min(distx[i + 1], disty[i + 1]));
ckmin(dp[i + 1][j + 2], dp[i][j] + max(distx[i + 1], disty[i + 1]));
}
}
}
for(int i = 0; i <= 2 * n; i++){
if(dp[n][i] <= k){
ans = max(ans, i);
}
}
}
return(ans);
}
/*
int main()
{
int Q;
assert(1 == scanf("%d", &Q));
std::vector<int> N(Q), X(Q), Y(Q);
std::vector<long long> K(Q);
std::vector<std::vector<int>> U(Q), V(Q), W(Q);
for (int q = 0; q < Q; q++)
{
assert(4 == scanf("%d %d %d %lld", &N[q], &X[q], &Y[q], &K[q]));
U[q].resize(N[q] - 1);
V[q].resize(N[q] - 1);
W[q].resize(N[q] - 1);
for (int i = 0; i < N[q] - 1; ++i)
{
assert(3 == scanf("%d %d %d", &U[q][i], &V[q][i], &W[q][i]));
}
}
fclose(stdin);
std::vector<int> result(Q);
for (int q = 0; q < Q; q++)
{
result[q] = max_score(N[q], X[q], Y[q], K[q], U[q], V[q], W[q]);
}
for (int q = 0; q < Q; q++)
{
printf("%d\n", result[q]);
}
fclose(stdout);
return 0;
}
*/
/*
1
5 0 3 6
0 1 1
1 2 1
2 3 1
3 4 100
*/
Compilation message
closing.cpp: In function 'int max_score(int, int, int, long long int, std::vector<int>, std::vector<int>, std::vector<int>)':
closing.cpp:50:10: warning: unused variable 'ok' [-Wunused-variable]
50 | bool ok = 1;
| ^~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
12124 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
113 ms |
33996 KB |
Output is correct |
2 |
Correct |
126 ms |
38852 KB |
Output is correct |
3 |
Correct |
908 ms |
62416 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
12376 KB |
Output is correct |
2 |
Correct |
2 ms |
14172 KB |
Output is correct |
3 |
Correct |
3 ms |
14172 KB |
Output is correct |
4 |
Correct |
3 ms |
14172 KB |
Output is correct |
5 |
Correct |
3 ms |
14424 KB |
Output is correct |
6 |
Correct |
2 ms |
14172 KB |
Output is correct |
7 |
Correct |
2 ms |
14172 KB |
Output is correct |
8 |
Correct |
2 ms |
14172 KB |
Output is correct |
9 |
Correct |
3 ms |
14172 KB |
Output is correct |
10 |
Correct |
2 ms |
14424 KB |
Output is correct |
11 |
Correct |
2 ms |
14172 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
12376 KB |
Output is correct |
2 |
Correct |
2 ms |
14172 KB |
Output is correct |
3 |
Correct |
3 ms |
14172 KB |
Output is correct |
4 |
Correct |
3 ms |
14172 KB |
Output is correct |
5 |
Correct |
3 ms |
14424 KB |
Output is correct |
6 |
Correct |
2 ms |
14172 KB |
Output is correct |
7 |
Correct |
2 ms |
14172 KB |
Output is correct |
8 |
Correct |
2 ms |
14172 KB |
Output is correct |
9 |
Correct |
3 ms |
14172 KB |
Output is correct |
10 |
Correct |
2 ms |
14424 KB |
Output is correct |
11 |
Correct |
2 ms |
14172 KB |
Output is correct |
12 |
Correct |
3 ms |
16476 KB |
Output is correct |
13 |
Correct |
3 ms |
16476 KB |
Output is correct |
14 |
Correct |
3 ms |
16476 KB |
Output is correct |
15 |
Correct |
3 ms |
16476 KB |
Output is correct |
16 |
Correct |
3 ms |
16476 KB |
Output is correct |
17 |
Correct |
3 ms |
16472 KB |
Output is correct |
18 |
Correct |
3 ms |
14428 KB |
Output is correct |
19 |
Correct |
6 ms |
37052 KB |
Output is correct |
20 |
Correct |
6 ms |
34964 KB |
Output is correct |
21 |
Correct |
5 ms |
34908 KB |
Output is correct |
22 |
Correct |
6 ms |
36884 KB |
Output is correct |
23 |
Correct |
6 ms |
36956 KB |
Output is correct |
24 |
Correct |
6 ms |
37012 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
12376 KB |
Output is correct |
2 |
Correct |
2 ms |
14172 KB |
Output is correct |
3 |
Correct |
3 ms |
14172 KB |
Output is correct |
4 |
Correct |
3 ms |
14172 KB |
Output is correct |
5 |
Correct |
3 ms |
14424 KB |
Output is correct |
6 |
Correct |
2 ms |
14172 KB |
Output is correct |
7 |
Correct |
2 ms |
14172 KB |
Output is correct |
8 |
Correct |
2 ms |
14172 KB |
Output is correct |
9 |
Correct |
3 ms |
14172 KB |
Output is correct |
10 |
Correct |
2 ms |
14424 KB |
Output is correct |
11 |
Correct |
2 ms |
14172 KB |
Output is correct |
12 |
Correct |
3 ms |
16476 KB |
Output is correct |
13 |
Correct |
3 ms |
16476 KB |
Output is correct |
14 |
Correct |
3 ms |
16476 KB |
Output is correct |
15 |
Correct |
3 ms |
16476 KB |
Output is correct |
16 |
Correct |
3 ms |
16476 KB |
Output is correct |
17 |
Correct |
3 ms |
16472 KB |
Output is correct |
18 |
Correct |
3 ms |
14428 KB |
Output is correct |
19 |
Correct |
6 ms |
37052 KB |
Output is correct |
20 |
Correct |
6 ms |
34964 KB |
Output is correct |
21 |
Correct |
5 ms |
34908 KB |
Output is correct |
22 |
Correct |
6 ms |
36884 KB |
Output is correct |
23 |
Correct |
6 ms |
36956 KB |
Output is correct |
24 |
Correct |
6 ms |
37012 KB |
Output is correct |
25 |
Correct |
4 ms |
14424 KB |
Output is correct |
26 |
Correct |
54 ms |
152204 KB |
Output is correct |
27 |
Correct |
49 ms |
143960 KB |
Output is correct |
28 |
Correct |
39 ms |
146152 KB |
Output is correct |
29 |
Correct |
45 ms |
150108 KB |
Output is correct |
30 |
Correct |
46 ms |
143960 KB |
Output is correct |
31 |
Correct |
46 ms |
152352 KB |
Output is correct |
32 |
Correct |
43 ms |
152344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
12124 KB |
Output is correct |
2 |
Correct |
2 ms |
12376 KB |
Output is correct |
3 |
Correct |
2 ms |
14172 KB |
Output is correct |
4 |
Correct |
3 ms |
14172 KB |
Output is correct |
5 |
Correct |
3 ms |
14172 KB |
Output is correct |
6 |
Correct |
3 ms |
14424 KB |
Output is correct |
7 |
Correct |
2 ms |
12120 KB |
Output is correct |
8 |
Correct |
2 ms |
12124 KB |
Output is correct |
9 |
Correct |
2 ms |
12380 KB |
Output is correct |
10 |
Correct |
2 ms |
14428 KB |
Output is correct |
11 |
Correct |
3 ms |
14172 KB |
Output is correct |
12 |
Correct |
2 ms |
14172 KB |
Output is correct |
13 |
Correct |
2 ms |
14172 KB |
Output is correct |
14 |
Correct |
2 ms |
14172 KB |
Output is correct |
15 |
Correct |
2 ms |
14408 KB |
Output is correct |
16 |
Correct |
2 ms |
14172 KB |
Output is correct |
17 |
Correct |
2 ms |
14172 KB |
Output is correct |
18 |
Correct |
2 ms |
14428 KB |
Output is correct |
19 |
Correct |
3 ms |
14172 KB |
Output is correct |
20 |
Correct |
3 ms |
14172 KB |
Output is correct |
21 |
Correct |
3 ms |
14428 KB |
Output is correct |
22 |
Correct |
3 ms |
14172 KB |
Output is correct |
23 |
Correct |
3 ms |
14172 KB |
Output is correct |
24 |
Correct |
3 ms |
14172 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
12124 KB |
Output is correct |
2 |
Correct |
2 ms |
12376 KB |
Output is correct |
3 |
Correct |
2 ms |
14172 KB |
Output is correct |
4 |
Correct |
3 ms |
14172 KB |
Output is correct |
5 |
Correct |
3 ms |
14172 KB |
Output is correct |
6 |
Correct |
3 ms |
14424 KB |
Output is correct |
7 |
Correct |
2 ms |
14172 KB |
Output is correct |
8 |
Correct |
2 ms |
14172 KB |
Output is correct |
9 |
Correct |
2 ms |
14172 KB |
Output is correct |
10 |
Correct |
3 ms |
14172 KB |
Output is correct |
11 |
Correct |
2 ms |
14424 KB |
Output is correct |
12 |
Correct |
2 ms |
14172 KB |
Output is correct |
13 |
Correct |
3 ms |
16476 KB |
Output is correct |
14 |
Correct |
3 ms |
16476 KB |
Output is correct |
15 |
Correct |
3 ms |
16476 KB |
Output is correct |
16 |
Correct |
3 ms |
16476 KB |
Output is correct |
17 |
Correct |
3 ms |
16476 KB |
Output is correct |
18 |
Correct |
3 ms |
16472 KB |
Output is correct |
19 |
Correct |
2 ms |
12120 KB |
Output is correct |
20 |
Correct |
2 ms |
12124 KB |
Output is correct |
21 |
Correct |
2 ms |
12380 KB |
Output is correct |
22 |
Correct |
2 ms |
14428 KB |
Output is correct |
23 |
Correct |
3 ms |
14172 KB |
Output is correct |
24 |
Correct |
2 ms |
14172 KB |
Output is correct |
25 |
Correct |
2 ms |
14172 KB |
Output is correct |
26 |
Correct |
2 ms |
14172 KB |
Output is correct |
27 |
Correct |
2 ms |
14408 KB |
Output is correct |
28 |
Correct |
2 ms |
14172 KB |
Output is correct |
29 |
Correct |
2 ms |
14172 KB |
Output is correct |
30 |
Correct |
2 ms |
14428 KB |
Output is correct |
31 |
Correct |
3 ms |
14172 KB |
Output is correct |
32 |
Correct |
3 ms |
14172 KB |
Output is correct |
33 |
Correct |
3 ms |
14428 KB |
Output is correct |
34 |
Correct |
3 ms |
14172 KB |
Output is correct |
35 |
Correct |
3 ms |
14172 KB |
Output is correct |
36 |
Correct |
3 ms |
14172 KB |
Output is correct |
37 |
Correct |
3 ms |
14168 KB |
Output is correct |
38 |
Correct |
3 ms |
14172 KB |
Output is correct |
39 |
Correct |
3 ms |
16476 KB |
Output is correct |
40 |
Correct |
3 ms |
16472 KB |
Output is correct |
41 |
Correct |
3 ms |
16476 KB |
Output is correct |
42 |
Correct |
3 ms |
16272 KB |
Output is correct |
43 |
Correct |
3 ms |
16476 KB |
Output is correct |
44 |
Correct |
3 ms |
16476 KB |
Output is correct |
45 |
Correct |
3 ms |
16476 KB |
Output is correct |
46 |
Correct |
3 ms |
16476 KB |
Output is correct |
47 |
Correct |
3 ms |
16476 KB |
Output is correct |
48 |
Correct |
3 ms |
16476 KB |
Output is correct |
49 |
Correct |
3 ms |
14428 KB |
Output is correct |
50 |
Correct |
2 ms |
14168 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
12124 KB |
Output is correct |
2 |
Correct |
2 ms |
12376 KB |
Output is correct |
3 |
Correct |
2 ms |
14172 KB |
Output is correct |
4 |
Correct |
3 ms |
14172 KB |
Output is correct |
5 |
Correct |
3 ms |
14172 KB |
Output is correct |
6 |
Correct |
3 ms |
14424 KB |
Output is correct |
7 |
Correct |
2 ms |
14172 KB |
Output is correct |
8 |
Correct |
2 ms |
14172 KB |
Output is correct |
9 |
Correct |
2 ms |
14172 KB |
Output is correct |
10 |
Correct |
3 ms |
14172 KB |
Output is correct |
11 |
Correct |
2 ms |
14424 KB |
Output is correct |
12 |
Correct |
2 ms |
14172 KB |
Output is correct |
13 |
Correct |
3 ms |
16476 KB |
Output is correct |
14 |
Correct |
3 ms |
16476 KB |
Output is correct |
15 |
Correct |
3 ms |
16476 KB |
Output is correct |
16 |
Correct |
3 ms |
16476 KB |
Output is correct |
17 |
Correct |
3 ms |
16476 KB |
Output is correct |
18 |
Correct |
3 ms |
16472 KB |
Output is correct |
19 |
Correct |
3 ms |
14428 KB |
Output is correct |
20 |
Correct |
6 ms |
37052 KB |
Output is correct |
21 |
Correct |
6 ms |
34964 KB |
Output is correct |
22 |
Correct |
5 ms |
34908 KB |
Output is correct |
23 |
Correct |
6 ms |
36884 KB |
Output is correct |
24 |
Correct |
6 ms |
36956 KB |
Output is correct |
25 |
Correct |
6 ms |
37012 KB |
Output is correct |
26 |
Correct |
2 ms |
12120 KB |
Output is correct |
27 |
Correct |
2 ms |
12124 KB |
Output is correct |
28 |
Correct |
2 ms |
12380 KB |
Output is correct |
29 |
Correct |
2 ms |
14428 KB |
Output is correct |
30 |
Correct |
3 ms |
14172 KB |
Output is correct |
31 |
Correct |
2 ms |
14172 KB |
Output is correct |
32 |
Correct |
2 ms |
14172 KB |
Output is correct |
33 |
Correct |
2 ms |
14172 KB |
Output is correct |
34 |
Correct |
2 ms |
14408 KB |
Output is correct |
35 |
Correct |
2 ms |
14172 KB |
Output is correct |
36 |
Correct |
2 ms |
14172 KB |
Output is correct |
37 |
Correct |
2 ms |
14428 KB |
Output is correct |
38 |
Correct |
3 ms |
14172 KB |
Output is correct |
39 |
Correct |
3 ms |
14172 KB |
Output is correct |
40 |
Correct |
3 ms |
14428 KB |
Output is correct |
41 |
Correct |
3 ms |
14172 KB |
Output is correct |
42 |
Correct |
3 ms |
14172 KB |
Output is correct |
43 |
Correct |
3 ms |
14172 KB |
Output is correct |
44 |
Correct |
3 ms |
14168 KB |
Output is correct |
45 |
Correct |
3 ms |
14172 KB |
Output is correct |
46 |
Correct |
3 ms |
16476 KB |
Output is correct |
47 |
Correct |
3 ms |
16472 KB |
Output is correct |
48 |
Correct |
3 ms |
16476 KB |
Output is correct |
49 |
Correct |
3 ms |
16272 KB |
Output is correct |
50 |
Correct |
3 ms |
16476 KB |
Output is correct |
51 |
Correct |
3 ms |
16476 KB |
Output is correct |
52 |
Correct |
3 ms |
16476 KB |
Output is correct |
53 |
Correct |
3 ms |
16476 KB |
Output is correct |
54 |
Correct |
3 ms |
16476 KB |
Output is correct |
55 |
Correct |
3 ms |
16476 KB |
Output is correct |
56 |
Correct |
3 ms |
14428 KB |
Output is correct |
57 |
Correct |
2 ms |
14168 KB |
Output is correct |
58 |
Correct |
4 ms |
14428 KB |
Output is correct |
59 |
Correct |
3 ms |
16472 KB |
Output is correct |
60 |
Correct |
4 ms |
16476 KB |
Output is correct |
61 |
Correct |
4 ms |
20572 KB |
Output is correct |
62 |
Correct |
4 ms |
20572 KB |
Output is correct |
63 |
Correct |
6 ms |
36956 KB |
Output is correct |
64 |
Correct |
6 ms |
34908 KB |
Output is correct |
65 |
Correct |
7 ms |
34908 KB |
Output is correct |
66 |
Correct |
6 ms |
34908 KB |
Output is correct |
67 |
Correct |
6 ms |
36956 KB |
Output is correct |
68 |
Correct |
6 ms |
34908 KB |
Output is correct |
69 |
Correct |
6 ms |
37056 KB |
Output is correct |
70 |
Correct |
5 ms |
34908 KB |
Output is correct |
71 |
Correct |
6 ms |
34908 KB |
Output is correct |
72 |
Correct |
7 ms |
34908 KB |
Output is correct |
73 |
Correct |
5 ms |
30864 KB |
Output is correct |
74 |
Correct |
5 ms |
32680 KB |
Output is correct |
75 |
Correct |
3 ms |
16476 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
12124 KB |
Output is correct |
2 |
Correct |
2 ms |
12376 KB |
Output is correct |
3 |
Correct |
2 ms |
14172 KB |
Output is correct |
4 |
Correct |
3 ms |
14172 KB |
Output is correct |
5 |
Correct |
3 ms |
14172 KB |
Output is correct |
6 |
Correct |
3 ms |
14424 KB |
Output is correct |
7 |
Correct |
2 ms |
14172 KB |
Output is correct |
8 |
Correct |
2 ms |
14172 KB |
Output is correct |
9 |
Correct |
2 ms |
14172 KB |
Output is correct |
10 |
Correct |
3 ms |
14172 KB |
Output is correct |
11 |
Correct |
2 ms |
14424 KB |
Output is correct |
12 |
Correct |
2 ms |
14172 KB |
Output is correct |
13 |
Correct |
3 ms |
16476 KB |
Output is correct |
14 |
Correct |
3 ms |
16476 KB |
Output is correct |
15 |
Correct |
3 ms |
16476 KB |
Output is correct |
16 |
Correct |
3 ms |
16476 KB |
Output is correct |
17 |
Correct |
3 ms |
16476 KB |
Output is correct |
18 |
Correct |
3 ms |
16472 KB |
Output is correct |
19 |
Correct |
3 ms |
14428 KB |
Output is correct |
20 |
Correct |
6 ms |
37052 KB |
Output is correct |
21 |
Correct |
6 ms |
34964 KB |
Output is correct |
22 |
Correct |
5 ms |
34908 KB |
Output is correct |
23 |
Correct |
6 ms |
36884 KB |
Output is correct |
24 |
Correct |
6 ms |
36956 KB |
Output is correct |
25 |
Correct |
6 ms |
37012 KB |
Output is correct |
26 |
Correct |
4 ms |
14424 KB |
Output is correct |
27 |
Correct |
54 ms |
152204 KB |
Output is correct |
28 |
Correct |
49 ms |
143960 KB |
Output is correct |
29 |
Correct |
39 ms |
146152 KB |
Output is correct |
30 |
Correct |
45 ms |
150108 KB |
Output is correct |
31 |
Correct |
46 ms |
143960 KB |
Output is correct |
32 |
Correct |
46 ms |
152352 KB |
Output is correct |
33 |
Correct |
43 ms |
152344 KB |
Output is correct |
34 |
Correct |
2 ms |
12120 KB |
Output is correct |
35 |
Correct |
2 ms |
12124 KB |
Output is correct |
36 |
Correct |
2 ms |
12380 KB |
Output is correct |
37 |
Correct |
2 ms |
14428 KB |
Output is correct |
38 |
Correct |
3 ms |
14172 KB |
Output is correct |
39 |
Correct |
2 ms |
14172 KB |
Output is correct |
40 |
Correct |
2 ms |
14172 KB |
Output is correct |
41 |
Correct |
2 ms |
14172 KB |
Output is correct |
42 |
Correct |
2 ms |
14408 KB |
Output is correct |
43 |
Correct |
2 ms |
14172 KB |
Output is correct |
44 |
Correct |
2 ms |
14172 KB |
Output is correct |
45 |
Correct |
2 ms |
14428 KB |
Output is correct |
46 |
Correct |
3 ms |
14172 KB |
Output is correct |
47 |
Correct |
3 ms |
14172 KB |
Output is correct |
48 |
Correct |
3 ms |
14428 KB |
Output is correct |
49 |
Correct |
3 ms |
14172 KB |
Output is correct |
50 |
Correct |
3 ms |
14172 KB |
Output is correct |
51 |
Correct |
3 ms |
14172 KB |
Output is correct |
52 |
Correct |
3 ms |
14168 KB |
Output is correct |
53 |
Correct |
3 ms |
14172 KB |
Output is correct |
54 |
Correct |
3 ms |
16476 KB |
Output is correct |
55 |
Correct |
3 ms |
16472 KB |
Output is correct |
56 |
Correct |
3 ms |
16476 KB |
Output is correct |
57 |
Correct |
3 ms |
16272 KB |
Output is correct |
58 |
Correct |
3 ms |
16476 KB |
Output is correct |
59 |
Correct |
3 ms |
16476 KB |
Output is correct |
60 |
Correct |
3 ms |
16476 KB |
Output is correct |
61 |
Correct |
3 ms |
16476 KB |
Output is correct |
62 |
Correct |
3 ms |
16476 KB |
Output is correct |
63 |
Correct |
3 ms |
16476 KB |
Output is correct |
64 |
Correct |
3 ms |
14428 KB |
Output is correct |
65 |
Correct |
2 ms |
14168 KB |
Output is correct |
66 |
Correct |
4 ms |
14428 KB |
Output is correct |
67 |
Correct |
3 ms |
16472 KB |
Output is correct |
68 |
Correct |
4 ms |
16476 KB |
Output is correct |
69 |
Correct |
4 ms |
20572 KB |
Output is correct |
70 |
Correct |
4 ms |
20572 KB |
Output is correct |
71 |
Correct |
6 ms |
36956 KB |
Output is correct |
72 |
Correct |
6 ms |
34908 KB |
Output is correct |
73 |
Correct |
7 ms |
34908 KB |
Output is correct |
74 |
Correct |
6 ms |
34908 KB |
Output is correct |
75 |
Correct |
6 ms |
36956 KB |
Output is correct |
76 |
Correct |
6 ms |
34908 KB |
Output is correct |
77 |
Correct |
6 ms |
37056 KB |
Output is correct |
78 |
Correct |
5 ms |
34908 KB |
Output is correct |
79 |
Correct |
6 ms |
34908 KB |
Output is correct |
80 |
Correct |
7 ms |
34908 KB |
Output is correct |
81 |
Correct |
5 ms |
30864 KB |
Output is correct |
82 |
Correct |
5 ms |
32680 KB |
Output is correct |
83 |
Correct |
3 ms |
16476 KB |
Output is correct |
84 |
Correct |
4 ms |
14428 KB |
Output is correct |
85 |
Correct |
7 ms |
24668 KB |
Output is correct |
86 |
Correct |
5 ms |
16476 KB |
Output is correct |
87 |
Correct |
6 ms |
20568 KB |
Output is correct |
88 |
Correct |
6 ms |
20572 KB |
Output is correct |
89 |
Correct |
53 ms |
152040 KB |
Output is correct |
90 |
Correct |
45 ms |
139868 KB |
Output is correct |
91 |
Correct |
51 ms |
152144 KB |
Output is correct |
92 |
Correct |
48 ms |
143964 KB |
Output is correct |
93 |
Correct |
48 ms |
146184 KB |
Output is correct |
94 |
Correct |
42 ms |
148048 KB |
Output is correct |
95 |
Correct |
42 ms |
150104 KB |
Output is correct |
96 |
Correct |
41 ms |
142000 KB |
Output is correct |
97 |
Correct |
48 ms |
150108 KB |
Output is correct |
98 |
Correct |
53 ms |
148060 KB |
Output is correct |
99 |
Correct |
53 ms |
152172 KB |
Output is correct |
100 |
Correct |
34 ms |
110936 KB |
Output is correct |
101 |
Correct |
10 ms |
36956 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
12124 KB |
Output is correct |
2 |
Correct |
2 ms |
12376 KB |
Output is correct |
3 |
Correct |
2 ms |
14172 KB |
Output is correct |
4 |
Correct |
3 ms |
14172 KB |
Output is correct |
5 |
Correct |
3 ms |
14172 KB |
Output is correct |
6 |
Correct |
3 ms |
14424 KB |
Output is correct |
7 |
Correct |
2 ms |
14172 KB |
Output is correct |
8 |
Correct |
2 ms |
14172 KB |
Output is correct |
9 |
Correct |
2 ms |
14172 KB |
Output is correct |
10 |
Correct |
3 ms |
14172 KB |
Output is correct |
11 |
Correct |
2 ms |
14424 KB |
Output is correct |
12 |
Correct |
2 ms |
14172 KB |
Output is correct |
13 |
Correct |
3 ms |
16476 KB |
Output is correct |
14 |
Correct |
3 ms |
16476 KB |
Output is correct |
15 |
Correct |
3 ms |
16476 KB |
Output is correct |
16 |
Correct |
3 ms |
16476 KB |
Output is correct |
17 |
Correct |
3 ms |
16476 KB |
Output is correct |
18 |
Correct |
3 ms |
16472 KB |
Output is correct |
19 |
Correct |
3 ms |
14428 KB |
Output is correct |
20 |
Correct |
6 ms |
37052 KB |
Output is correct |
21 |
Correct |
6 ms |
34964 KB |
Output is correct |
22 |
Correct |
5 ms |
34908 KB |
Output is correct |
23 |
Correct |
6 ms |
36884 KB |
Output is correct |
24 |
Correct |
6 ms |
36956 KB |
Output is correct |
25 |
Correct |
6 ms |
37012 KB |
Output is correct |
26 |
Correct |
4 ms |
14424 KB |
Output is correct |
27 |
Correct |
54 ms |
152204 KB |
Output is correct |
28 |
Correct |
49 ms |
143960 KB |
Output is correct |
29 |
Correct |
39 ms |
146152 KB |
Output is correct |
30 |
Correct |
45 ms |
150108 KB |
Output is correct |
31 |
Correct |
46 ms |
143960 KB |
Output is correct |
32 |
Correct |
46 ms |
152352 KB |
Output is correct |
33 |
Correct |
43 ms |
152344 KB |
Output is correct |
34 |
Correct |
2 ms |
12120 KB |
Output is correct |
35 |
Correct |
2 ms |
12124 KB |
Output is correct |
36 |
Correct |
2 ms |
12380 KB |
Output is correct |
37 |
Correct |
2 ms |
14428 KB |
Output is correct |
38 |
Correct |
3 ms |
14172 KB |
Output is correct |
39 |
Correct |
2 ms |
14172 KB |
Output is correct |
40 |
Correct |
2 ms |
14172 KB |
Output is correct |
41 |
Correct |
2 ms |
14172 KB |
Output is correct |
42 |
Correct |
2 ms |
14408 KB |
Output is correct |
43 |
Correct |
2 ms |
14172 KB |
Output is correct |
44 |
Correct |
2 ms |
14172 KB |
Output is correct |
45 |
Correct |
2 ms |
14428 KB |
Output is correct |
46 |
Correct |
3 ms |
14172 KB |
Output is correct |
47 |
Correct |
3 ms |
14172 KB |
Output is correct |
48 |
Correct |
3 ms |
14428 KB |
Output is correct |
49 |
Correct |
3 ms |
14172 KB |
Output is correct |
50 |
Correct |
3 ms |
14172 KB |
Output is correct |
51 |
Correct |
3 ms |
14172 KB |
Output is correct |
52 |
Correct |
3 ms |
14168 KB |
Output is correct |
53 |
Correct |
3 ms |
14172 KB |
Output is correct |
54 |
Correct |
3 ms |
16476 KB |
Output is correct |
55 |
Correct |
3 ms |
16472 KB |
Output is correct |
56 |
Correct |
3 ms |
16476 KB |
Output is correct |
57 |
Correct |
3 ms |
16272 KB |
Output is correct |
58 |
Correct |
3 ms |
16476 KB |
Output is correct |
59 |
Correct |
3 ms |
16476 KB |
Output is correct |
60 |
Correct |
3 ms |
16476 KB |
Output is correct |
61 |
Correct |
3 ms |
16476 KB |
Output is correct |
62 |
Correct |
3 ms |
16476 KB |
Output is correct |
63 |
Correct |
3 ms |
16476 KB |
Output is correct |
64 |
Correct |
3 ms |
14428 KB |
Output is correct |
65 |
Correct |
2 ms |
14168 KB |
Output is correct |
66 |
Correct |
4 ms |
14428 KB |
Output is correct |
67 |
Correct |
3 ms |
16472 KB |
Output is correct |
68 |
Correct |
4 ms |
16476 KB |
Output is correct |
69 |
Correct |
4 ms |
20572 KB |
Output is correct |
70 |
Correct |
4 ms |
20572 KB |
Output is correct |
71 |
Correct |
6 ms |
36956 KB |
Output is correct |
72 |
Correct |
6 ms |
34908 KB |
Output is correct |
73 |
Correct |
7 ms |
34908 KB |
Output is correct |
74 |
Correct |
6 ms |
34908 KB |
Output is correct |
75 |
Correct |
6 ms |
36956 KB |
Output is correct |
76 |
Correct |
6 ms |
34908 KB |
Output is correct |
77 |
Correct |
6 ms |
37056 KB |
Output is correct |
78 |
Correct |
5 ms |
34908 KB |
Output is correct |
79 |
Correct |
6 ms |
34908 KB |
Output is correct |
80 |
Correct |
7 ms |
34908 KB |
Output is correct |
81 |
Correct |
5 ms |
30864 KB |
Output is correct |
82 |
Correct |
5 ms |
32680 KB |
Output is correct |
83 |
Correct |
3 ms |
16476 KB |
Output is correct |
84 |
Correct |
4 ms |
14428 KB |
Output is correct |
85 |
Correct |
7 ms |
24668 KB |
Output is correct |
86 |
Correct |
5 ms |
16476 KB |
Output is correct |
87 |
Correct |
6 ms |
20568 KB |
Output is correct |
88 |
Correct |
6 ms |
20572 KB |
Output is correct |
89 |
Correct |
53 ms |
152040 KB |
Output is correct |
90 |
Correct |
45 ms |
139868 KB |
Output is correct |
91 |
Correct |
51 ms |
152144 KB |
Output is correct |
92 |
Correct |
48 ms |
143964 KB |
Output is correct |
93 |
Correct |
48 ms |
146184 KB |
Output is correct |
94 |
Correct |
42 ms |
148048 KB |
Output is correct |
95 |
Correct |
42 ms |
150104 KB |
Output is correct |
96 |
Correct |
41 ms |
142000 KB |
Output is correct |
97 |
Correct |
48 ms |
150108 KB |
Output is correct |
98 |
Correct |
53 ms |
148060 KB |
Output is correct |
99 |
Correct |
53 ms |
152172 KB |
Output is correct |
100 |
Correct |
34 ms |
110936 KB |
Output is correct |
101 |
Correct |
10 ms |
36956 KB |
Output is correct |
102 |
Correct |
130 ms |
20572 KB |
Output is correct |
103 |
Correct |
334 ms |
35312 KB |
Output is correct |
104 |
Incorrect |
106 ms |
37864 KB |
1st lines differ - on the 1st token, expected: '333334', found: '200000' |
105 |
Halted |
0 ms |
0 KB |
- |