#include "bits/stdc++.h"
#include "closing.h"
#define FOR(i, begin, end) for(int i=(begin); i<(end); i++)
#define sz(x) ((int)(x).size())
#define pb push_back
#define s second
#define f first
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef long long ll;
const int N=3e3+10;
ll k, d[N][2], dp[2*N][N], mn[N], mx[N];
vector<pii> ad[N];
int n, x, y;
void build(int u, int in, int pst=-1) {
for(auto [nxt, w] : ad[u]) {
if(nxt==pst) continue;
d[nxt][in]=d[u][in]+w;
build(nxt, in, u);
}
}
vi path, now;
void get_path(int u, int pst=-1) {
now.pb(u);
if(u==y) {
path=now;
return;
}
for(auto [it, w] : ad[u]) {
if(it==pst) continue;
get_path(it, u);
}
now.pop_back();
}
int max_score(int N, int X, int Y, long long K, std::vector<int> U, std::vector<int> V, std::vector<int> W) {
path.clear(); now.clear();
n=N; x=X; y=Y; k=K;
FOR(i, 0, n) ad[i].clear();
FOR(i, 0, n-1) {
ad[U[i]].pb({V[i],W[i]});
ad[V[i]].pb({U[i],W[i]});
}
d[x][0]=d[y][1]=0;
build(x, 0);
build(y, 1);
get_path(x);
FOR(i, 0, n) mn[i+1]=min(d[i][0], d[i][1]), mx[i+1]=max(d[i][0], d[i][1]);
vector<ll> inf;
FOR(i, 1, n+1) inf.pb(mn[i]);
sort(inf.begin(), inf.end());
ll now_sum=0; int ans=0;
for(auto it : inf) {
if(now_sum+it>k) break;
now_sum+=it;
ans++;
}
now_sum=0;
vector dif(n+1, false);
for(auto it : path) {
dif[it+1]=true;
now_sum+=mn[it+1];
}
FOR(i, 0, 2*n+1) FOR(j, 0, n+1) dp[i][j]=1e18;
FOR(j, 0, n+1) dp[sz(path)][j]=now_sum;
FOR(i, 1, 2*n+1) {
FOR(j, 1, n+1) {
if(dif[j]) {
if(i>=1) dp[i][j]=min(dp[i][j], dp[i-1][j-1]+mx[j]-mn[j]);
}
else {
if(i>=1) dp[i][j]=min(dp[i][j], dp[i-1][j-1]+mn[j]);
if(i>=2) dp[i][j]=min(dp[i][j], dp[i-2][j-1]+mx[j]);
}
dp[i][j]=min(dp[i][j], dp[i][j-1]);
}
}
for(int i=2*n; i>=0; i--) {
if(dp[i][n]<=k) ans=max(ans, i);
}
return ans;
}
/*
1
5 0 3 11
0 1 5
1 2 1
2 3 6
3 4 5
1
7 0 2 10
0 1 2
0 3 3
1 2 4
2 4 2
2 5 5
5 6 3
1
4 0 3 20
0 1 18
1 2 1
2 3 19
1
8 1 3 14
0 1 3
1 2 2
2 3 1
3 4 5
4 5 2
5 6 3
6 7 1
*/
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
74 ms |
38056 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Correct |
1 ms |
2396 KB |
Output is correct |
5 |
Correct |
1 ms |
2396 KB |
Output is correct |
6 |
Correct |
1 ms |
4444 KB |
Output is correct |
7 |
Correct |
1 ms |
4444 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Correct |
1 ms |
2396 KB |
Output is correct |
5 |
Correct |
1 ms |
2396 KB |
Output is correct |
6 |
Correct |
1 ms |
4444 KB |
Output is correct |
7 |
Correct |
1 ms |
4444 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
6492 KB |
Output is correct |
13 |
Correct |
1 ms |
6492 KB |
Output is correct |
14 |
Correct |
1 ms |
6492 KB |
Output is correct |
15 |
Correct |
1 ms |
6492 KB |
Output is correct |
16 |
Correct |
1 ms |
6492 KB |
Output is correct |
17 |
Correct |
1 ms |
6492 KB |
Output is correct |
18 |
Correct |
1 ms |
2396 KB |
Output is correct |
19 |
Correct |
4 ms |
25180 KB |
Output is correct |
20 |
Correct |
4 ms |
23176 KB |
Output is correct |
21 |
Correct |
4 ms |
23128 KB |
Output is correct |
22 |
Correct |
5 ms |
25180 KB |
Output is correct |
23 |
Correct |
5 ms |
25092 KB |
Output is correct |
24 |
Correct |
5 ms |
25176 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Correct |
1 ms |
2396 KB |
Output is correct |
5 |
Correct |
1 ms |
2396 KB |
Output is correct |
6 |
Correct |
1 ms |
4444 KB |
Output is correct |
7 |
Correct |
1 ms |
4444 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
6492 KB |
Output is correct |
13 |
Correct |
1 ms |
6492 KB |
Output is correct |
14 |
Correct |
1 ms |
6492 KB |
Output is correct |
15 |
Correct |
1 ms |
6492 KB |
Output is correct |
16 |
Correct |
1 ms |
6492 KB |
Output is correct |
17 |
Correct |
1 ms |
6492 KB |
Output is correct |
18 |
Correct |
1 ms |
2396 KB |
Output is correct |
19 |
Correct |
4 ms |
25180 KB |
Output is correct |
20 |
Correct |
4 ms |
23176 KB |
Output is correct |
21 |
Correct |
4 ms |
23128 KB |
Output is correct |
22 |
Correct |
5 ms |
25180 KB |
Output is correct |
23 |
Correct |
5 ms |
25092 KB |
Output is correct |
24 |
Correct |
5 ms |
25176 KB |
Output is correct |
25 |
Correct |
2 ms |
4696 KB |
Output is correct |
26 |
Correct |
93 ms |
142424 KB |
Output is correct |
27 |
Correct |
81 ms |
132312 KB |
Output is correct |
28 |
Correct |
78 ms |
133212 KB |
Output is correct |
29 |
Correct |
84 ms |
138720 KB |
Output is correct |
30 |
Correct |
69 ms |
131668 KB |
Output is correct |
31 |
Correct |
79 ms |
142392 KB |
Output is correct |
32 |
Correct |
85 ms |
142416 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Correct |
1 ms |
2396 KB |
Output is correct |
5 |
Correct |
1 ms |
2396 KB |
Output is correct |
6 |
Correct |
1 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
2396 KB |
Output is correct |
8 |
Correct |
0 ms |
2396 KB |
Output is correct |
9 |
Correct |
1 ms |
2396 KB |
Output is correct |
10 |
Correct |
0 ms |
2396 KB |
Output is correct |
11 |
Correct |
1 ms |
2396 KB |
Output is correct |
12 |
Correct |
0 ms |
2396 KB |
Output is correct |
13 |
Correct |
1 ms |
2396 KB |
Output is correct |
14 |
Correct |
1 ms |
2396 KB |
Output is correct |
15 |
Correct |
0 ms |
2396 KB |
Output is correct |
16 |
Correct |
1 ms |
2392 KB |
Output is correct |
17 |
Correct |
1 ms |
2396 KB |
Output is correct |
18 |
Correct |
1 ms |
2396 KB |
Output is correct |
19 |
Correct |
1 ms |
2396 KB |
Output is correct |
20 |
Correct |
1 ms |
2652 KB |
Output is correct |
21 |
Correct |
1 ms |
2396 KB |
Output is correct |
22 |
Correct |
1 ms |
2392 KB |
Output is correct |
23 |
Correct |
0 ms |
2396 KB |
Output is correct |
24 |
Correct |
1 ms |
2396 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Correct |
1 ms |
2396 KB |
Output is correct |
5 |
Correct |
1 ms |
2396 KB |
Output is correct |
6 |
Correct |
1 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
4444 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
6492 KB |
Output is correct |
14 |
Correct |
1 ms |
6492 KB |
Output is correct |
15 |
Correct |
1 ms |
6492 KB |
Output is correct |
16 |
Correct |
1 ms |
6492 KB |
Output is correct |
17 |
Correct |
1 ms |
6492 KB |
Output is correct |
18 |
Correct |
1 ms |
6492 KB |
Output is correct |
19 |
Correct |
1 ms |
2396 KB |
Output is correct |
20 |
Correct |
0 ms |
2396 KB |
Output is correct |
21 |
Correct |
1 ms |
2396 KB |
Output is correct |
22 |
Correct |
0 ms |
2396 KB |
Output is correct |
23 |
Correct |
1 ms |
2396 KB |
Output is correct |
24 |
Correct |
0 ms |
2396 KB |
Output is correct |
25 |
Correct |
1 ms |
2396 KB |
Output is correct |
26 |
Correct |
1 ms |
2396 KB |
Output is correct |
27 |
Correct |
0 ms |
2396 KB |
Output is correct |
28 |
Correct |
1 ms |
2392 KB |
Output is correct |
29 |
Correct |
1 ms |
2396 KB |
Output is correct |
30 |
Correct |
1 ms |
2396 KB |
Output is correct |
31 |
Correct |
1 ms |
2396 KB |
Output is correct |
32 |
Correct |
1 ms |
2652 KB |
Output is correct |
33 |
Correct |
1 ms |
2396 KB |
Output is correct |
34 |
Correct |
1 ms |
2392 KB |
Output is correct |
35 |
Correct |
0 ms |
2396 KB |
Output is correct |
36 |
Correct |
1 ms |
2396 KB |
Output is correct |
37 |
Correct |
1 ms |
2396 KB |
Output is correct |
38 |
Correct |
1 ms |
2396 KB |
Output is correct |
39 |
Correct |
1 ms |
6492 KB |
Output is correct |
40 |
Correct |
1 ms |
6492 KB |
Output is correct |
41 |
Correct |
1 ms |
6488 KB |
Output is correct |
42 |
Correct |
1 ms |
6492 KB |
Output is correct |
43 |
Correct |
1 ms |
6492 KB |
Output is correct |
44 |
Correct |
1 ms |
6492 KB |
Output is correct |
45 |
Correct |
1 ms |
6492 KB |
Output is correct |
46 |
Correct |
1 ms |
6656 KB |
Output is correct |
47 |
Correct |
1 ms |
6492 KB |
Output is correct |
48 |
Correct |
1 ms |
4444 KB |
Output is correct |
49 |
Correct |
1 ms |
4444 KB |
Output is correct |
50 |
Correct |
1 ms |
2396 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Correct |
1 ms |
2396 KB |
Output is correct |
5 |
Correct |
1 ms |
2396 KB |
Output is correct |
6 |
Correct |
1 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
4444 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
6492 KB |
Output is correct |
14 |
Correct |
1 ms |
6492 KB |
Output is correct |
15 |
Correct |
1 ms |
6492 KB |
Output is correct |
16 |
Correct |
1 ms |
6492 KB |
Output is correct |
17 |
Correct |
1 ms |
6492 KB |
Output is correct |
18 |
Correct |
1 ms |
6492 KB |
Output is correct |
19 |
Correct |
1 ms |
2396 KB |
Output is correct |
20 |
Correct |
4 ms |
25180 KB |
Output is correct |
21 |
Correct |
4 ms |
23176 KB |
Output is correct |
22 |
Correct |
4 ms |
23128 KB |
Output is correct |
23 |
Correct |
5 ms |
25180 KB |
Output is correct |
24 |
Correct |
5 ms |
25092 KB |
Output is correct |
25 |
Correct |
5 ms |
25176 KB |
Output is correct |
26 |
Correct |
1 ms |
2396 KB |
Output is correct |
27 |
Correct |
0 ms |
2396 KB |
Output is correct |
28 |
Correct |
1 ms |
2396 KB |
Output is correct |
29 |
Correct |
0 ms |
2396 KB |
Output is correct |
30 |
Correct |
1 ms |
2396 KB |
Output is correct |
31 |
Correct |
0 ms |
2396 KB |
Output is correct |
32 |
Correct |
1 ms |
2396 KB |
Output is correct |
33 |
Correct |
1 ms |
2396 KB |
Output is correct |
34 |
Correct |
0 ms |
2396 KB |
Output is correct |
35 |
Correct |
1 ms |
2392 KB |
Output is correct |
36 |
Correct |
1 ms |
2396 KB |
Output is correct |
37 |
Correct |
1 ms |
2396 KB |
Output is correct |
38 |
Correct |
1 ms |
2396 KB |
Output is correct |
39 |
Correct |
1 ms |
2652 KB |
Output is correct |
40 |
Correct |
1 ms |
2396 KB |
Output is correct |
41 |
Correct |
1 ms |
2392 KB |
Output is correct |
42 |
Correct |
0 ms |
2396 KB |
Output is correct |
43 |
Correct |
1 ms |
2396 KB |
Output is correct |
44 |
Correct |
1 ms |
2396 KB |
Output is correct |
45 |
Correct |
1 ms |
2396 KB |
Output is correct |
46 |
Correct |
1 ms |
6492 KB |
Output is correct |
47 |
Correct |
1 ms |
6492 KB |
Output is correct |
48 |
Correct |
1 ms |
6488 KB |
Output is correct |
49 |
Correct |
1 ms |
6492 KB |
Output is correct |
50 |
Correct |
1 ms |
6492 KB |
Output is correct |
51 |
Correct |
1 ms |
6492 KB |
Output is correct |
52 |
Correct |
1 ms |
6492 KB |
Output is correct |
53 |
Correct |
1 ms |
6656 KB |
Output is correct |
54 |
Correct |
1 ms |
6492 KB |
Output is correct |
55 |
Correct |
1 ms |
4444 KB |
Output is correct |
56 |
Correct |
1 ms |
4444 KB |
Output is correct |
57 |
Correct |
1 ms |
2396 KB |
Output is correct |
58 |
Correct |
1 ms |
2396 KB |
Output is correct |
59 |
Correct |
1 ms |
6492 KB |
Output is correct |
60 |
Correct |
1 ms |
6492 KB |
Output is correct |
61 |
Correct |
2 ms |
8768 KB |
Output is correct |
62 |
Correct |
2 ms |
8536 KB |
Output is correct |
63 |
Correct |
4 ms |
25180 KB |
Output is correct |
64 |
Correct |
4 ms |
23136 KB |
Output is correct |
65 |
Correct |
4 ms |
23132 KB |
Output is correct |
66 |
Correct |
4 ms |
23128 KB |
Output is correct |
67 |
Correct |
4 ms |
25228 KB |
Output is correct |
68 |
Correct |
4 ms |
23132 KB |
Output is correct |
69 |
Correct |
4 ms |
25176 KB |
Output is correct |
70 |
Correct |
4 ms |
23132 KB |
Output is correct |
71 |
Correct |
4 ms |
23164 KB |
Output is correct |
72 |
Correct |
4 ms |
25180 KB |
Output is correct |
73 |
Correct |
3 ms |
19036 KB |
Output is correct |
74 |
Correct |
3 ms |
21084 KB |
Output is correct |
75 |
Correct |
1 ms |
6492 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Correct |
1 ms |
2396 KB |
Output is correct |
5 |
Correct |
1 ms |
2396 KB |
Output is correct |
6 |
Correct |
1 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
4444 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
6492 KB |
Output is correct |
14 |
Correct |
1 ms |
6492 KB |
Output is correct |
15 |
Correct |
1 ms |
6492 KB |
Output is correct |
16 |
Correct |
1 ms |
6492 KB |
Output is correct |
17 |
Correct |
1 ms |
6492 KB |
Output is correct |
18 |
Correct |
1 ms |
6492 KB |
Output is correct |
19 |
Correct |
1 ms |
2396 KB |
Output is correct |
20 |
Correct |
4 ms |
25180 KB |
Output is correct |
21 |
Correct |
4 ms |
23176 KB |
Output is correct |
22 |
Correct |
4 ms |
23128 KB |
Output is correct |
23 |
Correct |
5 ms |
25180 KB |
Output is correct |
24 |
Correct |
5 ms |
25092 KB |
Output is correct |
25 |
Correct |
5 ms |
25176 KB |
Output is correct |
26 |
Correct |
2 ms |
4696 KB |
Output is correct |
27 |
Correct |
93 ms |
142424 KB |
Output is correct |
28 |
Correct |
81 ms |
132312 KB |
Output is correct |
29 |
Correct |
78 ms |
133212 KB |
Output is correct |
30 |
Correct |
84 ms |
138720 KB |
Output is correct |
31 |
Correct |
69 ms |
131668 KB |
Output is correct |
32 |
Correct |
79 ms |
142392 KB |
Output is correct |
33 |
Correct |
85 ms |
142416 KB |
Output is correct |
34 |
Correct |
1 ms |
2396 KB |
Output is correct |
35 |
Correct |
0 ms |
2396 KB |
Output is correct |
36 |
Correct |
1 ms |
2396 KB |
Output is correct |
37 |
Correct |
0 ms |
2396 KB |
Output is correct |
38 |
Correct |
1 ms |
2396 KB |
Output is correct |
39 |
Correct |
0 ms |
2396 KB |
Output is correct |
40 |
Correct |
1 ms |
2396 KB |
Output is correct |
41 |
Correct |
1 ms |
2396 KB |
Output is correct |
42 |
Correct |
0 ms |
2396 KB |
Output is correct |
43 |
Correct |
1 ms |
2392 KB |
Output is correct |
44 |
Correct |
1 ms |
2396 KB |
Output is correct |
45 |
Correct |
1 ms |
2396 KB |
Output is correct |
46 |
Correct |
1 ms |
2396 KB |
Output is correct |
47 |
Correct |
1 ms |
2652 KB |
Output is correct |
48 |
Correct |
1 ms |
2396 KB |
Output is correct |
49 |
Correct |
1 ms |
2392 KB |
Output is correct |
50 |
Correct |
0 ms |
2396 KB |
Output is correct |
51 |
Correct |
1 ms |
2396 KB |
Output is correct |
52 |
Correct |
1 ms |
2396 KB |
Output is correct |
53 |
Correct |
1 ms |
2396 KB |
Output is correct |
54 |
Correct |
1 ms |
6492 KB |
Output is correct |
55 |
Correct |
1 ms |
6492 KB |
Output is correct |
56 |
Correct |
1 ms |
6488 KB |
Output is correct |
57 |
Correct |
1 ms |
6492 KB |
Output is correct |
58 |
Correct |
1 ms |
6492 KB |
Output is correct |
59 |
Correct |
1 ms |
6492 KB |
Output is correct |
60 |
Correct |
1 ms |
6492 KB |
Output is correct |
61 |
Correct |
1 ms |
6656 KB |
Output is correct |
62 |
Correct |
1 ms |
6492 KB |
Output is correct |
63 |
Correct |
1 ms |
4444 KB |
Output is correct |
64 |
Correct |
1 ms |
4444 KB |
Output is correct |
65 |
Correct |
1 ms |
2396 KB |
Output is correct |
66 |
Correct |
1 ms |
2396 KB |
Output is correct |
67 |
Correct |
1 ms |
6492 KB |
Output is correct |
68 |
Correct |
1 ms |
6492 KB |
Output is correct |
69 |
Correct |
2 ms |
8768 KB |
Output is correct |
70 |
Correct |
2 ms |
8536 KB |
Output is correct |
71 |
Correct |
4 ms |
25180 KB |
Output is correct |
72 |
Correct |
4 ms |
23136 KB |
Output is correct |
73 |
Correct |
4 ms |
23132 KB |
Output is correct |
74 |
Correct |
4 ms |
23128 KB |
Output is correct |
75 |
Correct |
4 ms |
25228 KB |
Output is correct |
76 |
Correct |
4 ms |
23132 KB |
Output is correct |
77 |
Correct |
4 ms |
25176 KB |
Output is correct |
78 |
Correct |
4 ms |
23132 KB |
Output is correct |
79 |
Correct |
4 ms |
23164 KB |
Output is correct |
80 |
Correct |
4 ms |
25180 KB |
Output is correct |
81 |
Correct |
3 ms |
19036 KB |
Output is correct |
82 |
Correct |
3 ms |
21084 KB |
Output is correct |
83 |
Correct |
1 ms |
6492 KB |
Output is correct |
84 |
Correct |
3 ms |
4700 KB |
Output is correct |
85 |
Correct |
7 ms |
14940 KB |
Output is correct |
86 |
Correct |
4 ms |
6780 KB |
Output is correct |
87 |
Correct |
5 ms |
8796 KB |
Output is correct |
88 |
Correct |
5 ms |
8844 KB |
Output is correct |
89 |
Correct |
78 ms |
142168 KB |
Output is correct |
90 |
Correct |
67 ms |
128828 KB |
Output is correct |
91 |
Correct |
85 ms |
141396 KB |
Output is correct |
92 |
Correct |
68 ms |
131932 KB |
Output is correct |
93 |
Correct |
69 ms |
133440 KB |
Output is correct |
94 |
Correct |
75 ms |
135760 KB |
Output is correct |
95 |
Correct |
82 ms |
138840 KB |
Output is correct |
96 |
Correct |
79 ms |
129640 KB |
Output is correct |
97 |
Correct |
79 ms |
138316 KB |
Output is correct |
98 |
Correct |
77 ms |
136272 KB |
Output is correct |
99 |
Correct |
90 ms |
142172 KB |
Output is correct |
100 |
Correct |
43 ms |
99160 KB |
Output is correct |
101 |
Correct |
11 ms |
25180 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Correct |
1 ms |
2396 KB |
Output is correct |
5 |
Correct |
1 ms |
2396 KB |
Output is correct |
6 |
Correct |
1 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
4444 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
6492 KB |
Output is correct |
14 |
Correct |
1 ms |
6492 KB |
Output is correct |
15 |
Correct |
1 ms |
6492 KB |
Output is correct |
16 |
Correct |
1 ms |
6492 KB |
Output is correct |
17 |
Correct |
1 ms |
6492 KB |
Output is correct |
18 |
Correct |
1 ms |
6492 KB |
Output is correct |
19 |
Correct |
1 ms |
2396 KB |
Output is correct |
20 |
Correct |
4 ms |
25180 KB |
Output is correct |
21 |
Correct |
4 ms |
23176 KB |
Output is correct |
22 |
Correct |
4 ms |
23128 KB |
Output is correct |
23 |
Correct |
5 ms |
25180 KB |
Output is correct |
24 |
Correct |
5 ms |
25092 KB |
Output is correct |
25 |
Correct |
5 ms |
25176 KB |
Output is correct |
26 |
Correct |
2 ms |
4696 KB |
Output is correct |
27 |
Correct |
93 ms |
142424 KB |
Output is correct |
28 |
Correct |
81 ms |
132312 KB |
Output is correct |
29 |
Correct |
78 ms |
133212 KB |
Output is correct |
30 |
Correct |
84 ms |
138720 KB |
Output is correct |
31 |
Correct |
69 ms |
131668 KB |
Output is correct |
32 |
Correct |
79 ms |
142392 KB |
Output is correct |
33 |
Correct |
85 ms |
142416 KB |
Output is correct |
34 |
Correct |
1 ms |
2396 KB |
Output is correct |
35 |
Correct |
0 ms |
2396 KB |
Output is correct |
36 |
Correct |
1 ms |
2396 KB |
Output is correct |
37 |
Correct |
0 ms |
2396 KB |
Output is correct |
38 |
Correct |
1 ms |
2396 KB |
Output is correct |
39 |
Correct |
0 ms |
2396 KB |
Output is correct |
40 |
Correct |
1 ms |
2396 KB |
Output is correct |
41 |
Correct |
1 ms |
2396 KB |
Output is correct |
42 |
Correct |
0 ms |
2396 KB |
Output is correct |
43 |
Correct |
1 ms |
2392 KB |
Output is correct |
44 |
Correct |
1 ms |
2396 KB |
Output is correct |
45 |
Correct |
1 ms |
2396 KB |
Output is correct |
46 |
Correct |
1 ms |
2396 KB |
Output is correct |
47 |
Correct |
1 ms |
2652 KB |
Output is correct |
48 |
Correct |
1 ms |
2396 KB |
Output is correct |
49 |
Correct |
1 ms |
2392 KB |
Output is correct |
50 |
Correct |
0 ms |
2396 KB |
Output is correct |
51 |
Correct |
1 ms |
2396 KB |
Output is correct |
52 |
Correct |
1 ms |
2396 KB |
Output is correct |
53 |
Correct |
1 ms |
2396 KB |
Output is correct |
54 |
Correct |
1 ms |
6492 KB |
Output is correct |
55 |
Correct |
1 ms |
6492 KB |
Output is correct |
56 |
Correct |
1 ms |
6488 KB |
Output is correct |
57 |
Correct |
1 ms |
6492 KB |
Output is correct |
58 |
Correct |
1 ms |
6492 KB |
Output is correct |
59 |
Correct |
1 ms |
6492 KB |
Output is correct |
60 |
Correct |
1 ms |
6492 KB |
Output is correct |
61 |
Correct |
1 ms |
6656 KB |
Output is correct |
62 |
Correct |
1 ms |
6492 KB |
Output is correct |
63 |
Correct |
1 ms |
4444 KB |
Output is correct |
64 |
Correct |
1 ms |
4444 KB |
Output is correct |
65 |
Correct |
1 ms |
2396 KB |
Output is correct |
66 |
Correct |
1 ms |
2396 KB |
Output is correct |
67 |
Correct |
1 ms |
6492 KB |
Output is correct |
68 |
Correct |
1 ms |
6492 KB |
Output is correct |
69 |
Correct |
2 ms |
8768 KB |
Output is correct |
70 |
Correct |
2 ms |
8536 KB |
Output is correct |
71 |
Correct |
4 ms |
25180 KB |
Output is correct |
72 |
Correct |
4 ms |
23136 KB |
Output is correct |
73 |
Correct |
4 ms |
23132 KB |
Output is correct |
74 |
Correct |
4 ms |
23128 KB |
Output is correct |
75 |
Correct |
4 ms |
25228 KB |
Output is correct |
76 |
Correct |
4 ms |
23132 KB |
Output is correct |
77 |
Correct |
4 ms |
25176 KB |
Output is correct |
78 |
Correct |
4 ms |
23132 KB |
Output is correct |
79 |
Correct |
4 ms |
23164 KB |
Output is correct |
80 |
Correct |
4 ms |
25180 KB |
Output is correct |
81 |
Correct |
3 ms |
19036 KB |
Output is correct |
82 |
Correct |
3 ms |
21084 KB |
Output is correct |
83 |
Correct |
1 ms |
6492 KB |
Output is correct |
84 |
Correct |
3 ms |
4700 KB |
Output is correct |
85 |
Correct |
7 ms |
14940 KB |
Output is correct |
86 |
Correct |
4 ms |
6780 KB |
Output is correct |
87 |
Correct |
5 ms |
8796 KB |
Output is correct |
88 |
Correct |
5 ms |
8844 KB |
Output is correct |
89 |
Correct |
78 ms |
142168 KB |
Output is correct |
90 |
Correct |
67 ms |
128828 KB |
Output is correct |
91 |
Correct |
85 ms |
141396 KB |
Output is correct |
92 |
Correct |
68 ms |
131932 KB |
Output is correct |
93 |
Correct |
69 ms |
133440 KB |
Output is correct |
94 |
Correct |
75 ms |
135760 KB |
Output is correct |
95 |
Correct |
82 ms |
138840 KB |
Output is correct |
96 |
Correct |
79 ms |
129640 KB |
Output is correct |
97 |
Correct |
79 ms |
138316 KB |
Output is correct |
98 |
Correct |
77 ms |
136272 KB |
Output is correct |
99 |
Correct |
90 ms |
142172 KB |
Output is correct |
100 |
Correct |
43 ms |
99160 KB |
Output is correct |
101 |
Correct |
11 ms |
25180 KB |
Output is correct |
102 |
Correct |
169 ms |
11612 KB |
Output is correct |
103 |
Correct |
508 ms |
26096 KB |
Output is correct |
104 |
Runtime error |
65 ms |
38736 KB |
Execution killed with signal 11 |
105 |
Halted |
0 ms |
0 KB |
- |