#include <bits/stdc++.h>
#include "closing.h"
using namespace std;
#define int long long
#define inf 0x3F3F3F3F3F3F3F3F
struct BIT
{
int n;
vector<long long> ft;
void init(int N)
{
n = N + 5;
ft.assign(n + 5, 0);
}
void add(int pos, long long val)
{
for (pos = pos + 1; pos <= n; pos += pos & -pos) ft[pos] += val;
}
long long get(int pos, long long res = 0)
{
for (pos = pos + 1; pos > 0; pos -= pos & -pos) res += ft[pos];
return res;
}
};
const int MXN = 2e5 + 5;
int n, x, y;
long long k;
vector<array<long long, 2>> adj[MXN];
long long d[2][MXN], p[3][MXN];
vector<int> pt, PT;
int in[MXN], IN[MXN];
void dfs(int a, int p, int t)
{
PT.push_back(a);
if (a != p && a == y) pt = PT;
for (const array<long long, 2> &v : adj[a])
{
if (v[0] == p) continue;
d[t][v[0]] = d[t][a] + v[1];
dfs(v[0], a, t);
}
PT.pop_back();
}
void getcomp(int a, int p, vector<int> &comp)
{
for (array<long long, 2> &v : adj[a])
{
if (v[0] == p || IN[v[0]]) continue;
getcomp(v[0], a, comp);
}
comp.push_back(a);
}
#undef int long long
int max_score(int N, int X, int Y, long long K, vector<int> U, vector<int> V, vector<int> W)
{
#define int long long
n = N, x = X, y = Y, k = K;
for (int i = 0; i < n; i++)
{
d[0][i] = d[1][i] = 0;
adj[i].clear();
IN[i] = 0;
}
for (int i = 0; i < n - 1; i++)
{
adj[U[i]].push_back({V[i], W[i]});
adj[V[i]].push_back({U[i], W[i]});
}
dfs(x, x, 0);
dfs(y, y, 1);
int ans = 0;
{
vector<long long> v;
for (int i = 0; i < n; i++) v.push_back(min(d[0][i], d[1][i]));
sort(v.begin(), v.end());
long long k1 = k;
for (int i = 0; i < n; i++)
{
k1 -= v[i];
if (k1 < 0) break;
ans++;
}
}
int dp[n + 1][2 * n + 1];
for (int i = 0; i <= n; i++) for (int j = 0; j <= 2 * n; j++) dp[i][j] = inf;
dp[0][0] = 0;
for (int &i : pt) IN[i] = 1, dp[0][0] += min(d[0][i], d[1][i]);
for (int i = 1; i <= n; i++)
{
int val[3] = {0, min(d[0][i - 1], d[1][i - 1]), max(d[0][i - 1], d[1][i - 1])};
if (IN[i - 1]) val[1] = max(d[0][i - 1], d[1][i - 1]) - min(d[0][i - 1], d[1][i - 1]), val[2] = inf;
for (int j = 0; j <= 2 * n; j++)
{
for (int k = 0; j + k <= 2 * n && k < 3; k++)
{
dp[i][j + k] = min(dp[i][j + k], dp[i - 1][j] + val[k]);
}
}
}
for (int i = 2 * n; i >= 0; i--)
{
if (dp[n][i] <= k) return max(ans, i + (int)pt.size());
}
return ans;
#undef int
}
Compilation message
closing.cpp:59:12: warning: extra tokens at end of #undef directive
59 | #undef int long long
| ^~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
4956 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1092 ms |
2097152 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
4956 KB |
Output is correct |
2 |
Correct |
2 ms |
4956 KB |
Output is correct |
3 |
Correct |
2 ms |
4956 KB |
Output is correct |
4 |
Correct |
3 ms |
4956 KB |
Output is correct |
5 |
Correct |
2 ms |
4956 KB |
Output is correct |
6 |
Correct |
2 ms |
5212 KB |
Output is correct |
7 |
Correct |
2 ms |
4956 KB |
Output is correct |
8 |
Correct |
2 ms |
4956 KB |
Output is correct |
9 |
Correct |
2 ms |
4956 KB |
Output is correct |
10 |
Correct |
2 ms |
5212 KB |
Output is correct |
11 |
Correct |
3 ms |
5212 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
4956 KB |
Output is correct |
2 |
Correct |
2 ms |
4956 KB |
Output is correct |
3 |
Correct |
2 ms |
4956 KB |
Output is correct |
4 |
Correct |
3 ms |
4956 KB |
Output is correct |
5 |
Correct |
2 ms |
4956 KB |
Output is correct |
6 |
Correct |
2 ms |
5212 KB |
Output is correct |
7 |
Correct |
2 ms |
4956 KB |
Output is correct |
8 |
Correct |
2 ms |
4956 KB |
Output is correct |
9 |
Correct |
2 ms |
4956 KB |
Output is correct |
10 |
Correct |
2 ms |
5212 KB |
Output is correct |
11 |
Correct |
3 ms |
5212 KB |
Output is correct |
12 |
Correct |
3 ms |
5216 KB |
Output is correct |
13 |
Correct |
3 ms |
5460 KB |
Output is correct |
14 |
Correct |
2 ms |
5208 KB |
Output is correct |
15 |
Correct |
2 ms |
5212 KB |
Output is correct |
16 |
Correct |
3 ms |
5212 KB |
Output is correct |
17 |
Correct |
2 ms |
5212 KB |
Output is correct |
18 |
Correct |
2 ms |
4952 KB |
Output is correct |
19 |
Correct |
6 ms |
9048 KB |
Output is correct |
20 |
Correct |
5 ms |
8480 KB |
Output is correct |
21 |
Correct |
5 ms |
8796 KB |
Output is correct |
22 |
Correct |
6 ms |
9052 KB |
Output is correct |
23 |
Correct |
6 ms |
9156 KB |
Output is correct |
24 |
Correct |
6 ms |
8996 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
4956 KB |
Output is correct |
2 |
Correct |
2 ms |
4956 KB |
Output is correct |
3 |
Correct |
2 ms |
4956 KB |
Output is correct |
4 |
Correct |
3 ms |
4956 KB |
Output is correct |
5 |
Correct |
2 ms |
4956 KB |
Output is correct |
6 |
Correct |
2 ms |
5212 KB |
Output is correct |
7 |
Correct |
2 ms |
4956 KB |
Output is correct |
8 |
Correct |
2 ms |
4956 KB |
Output is correct |
9 |
Correct |
2 ms |
4956 KB |
Output is correct |
10 |
Correct |
2 ms |
5212 KB |
Output is correct |
11 |
Correct |
3 ms |
5212 KB |
Output is correct |
12 |
Correct |
3 ms |
5216 KB |
Output is correct |
13 |
Correct |
3 ms |
5460 KB |
Output is correct |
14 |
Correct |
2 ms |
5208 KB |
Output is correct |
15 |
Correct |
2 ms |
5212 KB |
Output is correct |
16 |
Correct |
3 ms |
5212 KB |
Output is correct |
17 |
Correct |
2 ms |
5212 KB |
Output is correct |
18 |
Correct |
2 ms |
4952 KB |
Output is correct |
19 |
Correct |
6 ms |
9048 KB |
Output is correct |
20 |
Correct |
5 ms |
8480 KB |
Output is correct |
21 |
Correct |
5 ms |
8796 KB |
Output is correct |
22 |
Correct |
6 ms |
9052 KB |
Output is correct |
23 |
Correct |
6 ms |
9156 KB |
Output is correct |
24 |
Correct |
6 ms |
8996 KB |
Output is correct |
25 |
Correct |
4 ms |
5208 KB |
Output is correct |
26 |
Correct |
154 ms |
146768 KB |
Output is correct |
27 |
Correct |
127 ms |
127268 KB |
Output is correct |
28 |
Correct |
126 ms |
128852 KB |
Output is correct |
29 |
Correct |
137 ms |
139128 KB |
Output is correct |
30 |
Correct |
127 ms |
126000 KB |
Output is correct |
31 |
Correct |
143 ms |
146512 KB |
Output is correct |
32 |
Correct |
144 ms |
146516 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
4956 KB |
Output is correct |
2 |
Correct |
2 ms |
4956 KB |
Output is correct |
3 |
Correct |
2 ms |
4956 KB |
Output is correct |
4 |
Correct |
2 ms |
4956 KB |
Output is correct |
5 |
Correct |
3 ms |
4956 KB |
Output is correct |
6 |
Correct |
2 ms |
4956 KB |
Output is correct |
7 |
Correct |
2 ms |
4952 KB |
Output is correct |
8 |
Correct |
3 ms |
4952 KB |
Output is correct |
9 |
Correct |
2 ms |
4956 KB |
Output is correct |
10 |
Correct |
2 ms |
5148 KB |
Output is correct |
11 |
Correct |
2 ms |
4956 KB |
Output is correct |
12 |
Correct |
2 ms |
4956 KB |
Output is correct |
13 |
Correct |
2 ms |
4956 KB |
Output is correct |
14 |
Correct |
2 ms |
4956 KB |
Output is correct |
15 |
Correct |
2 ms |
4952 KB |
Output is correct |
16 |
Correct |
2 ms |
4956 KB |
Output is correct |
17 |
Correct |
2 ms |
4956 KB |
Output is correct |
18 |
Correct |
2 ms |
4956 KB |
Output is correct |
19 |
Correct |
2 ms |
4956 KB |
Output is correct |
20 |
Correct |
2 ms |
4956 KB |
Output is correct |
21 |
Correct |
2 ms |
4956 KB |
Output is correct |
22 |
Correct |
2 ms |
4956 KB |
Output is correct |
23 |
Correct |
2 ms |
4956 KB |
Output is correct |
24 |
Correct |
3 ms |
4956 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
4956 KB |
Output is correct |
2 |
Correct |
2 ms |
4956 KB |
Output is correct |
3 |
Correct |
2 ms |
4956 KB |
Output is correct |
4 |
Correct |
2 ms |
4956 KB |
Output is correct |
5 |
Correct |
3 ms |
4956 KB |
Output is correct |
6 |
Correct |
2 ms |
4956 KB |
Output is correct |
7 |
Correct |
2 ms |
5212 KB |
Output is correct |
8 |
Correct |
2 ms |
4956 KB |
Output is correct |
9 |
Correct |
2 ms |
4956 KB |
Output is correct |
10 |
Correct |
2 ms |
4956 KB |
Output is correct |
11 |
Correct |
2 ms |
5212 KB |
Output is correct |
12 |
Correct |
3 ms |
5212 KB |
Output is correct |
13 |
Correct |
3 ms |
5216 KB |
Output is correct |
14 |
Correct |
3 ms |
5460 KB |
Output is correct |
15 |
Correct |
2 ms |
5208 KB |
Output is correct |
16 |
Correct |
2 ms |
5212 KB |
Output is correct |
17 |
Correct |
3 ms |
5212 KB |
Output is correct |
18 |
Correct |
2 ms |
5212 KB |
Output is correct |
19 |
Correct |
2 ms |
4952 KB |
Output is correct |
20 |
Correct |
3 ms |
4952 KB |
Output is correct |
21 |
Correct |
2 ms |
4956 KB |
Output is correct |
22 |
Correct |
2 ms |
5148 KB |
Output is correct |
23 |
Correct |
2 ms |
4956 KB |
Output is correct |
24 |
Correct |
2 ms |
4956 KB |
Output is correct |
25 |
Correct |
2 ms |
4956 KB |
Output is correct |
26 |
Correct |
2 ms |
4956 KB |
Output is correct |
27 |
Correct |
2 ms |
4952 KB |
Output is correct |
28 |
Correct |
2 ms |
4956 KB |
Output is correct |
29 |
Correct |
2 ms |
4956 KB |
Output is correct |
30 |
Correct |
2 ms |
4956 KB |
Output is correct |
31 |
Correct |
2 ms |
4956 KB |
Output is correct |
32 |
Correct |
2 ms |
4956 KB |
Output is correct |
33 |
Correct |
2 ms |
4956 KB |
Output is correct |
34 |
Correct |
2 ms |
4956 KB |
Output is correct |
35 |
Correct |
2 ms |
4956 KB |
Output is correct |
36 |
Correct |
3 ms |
4956 KB |
Output is correct |
37 |
Correct |
3 ms |
4952 KB |
Output is correct |
38 |
Correct |
2 ms |
4956 KB |
Output is correct |
39 |
Correct |
3 ms |
5212 KB |
Output is correct |
40 |
Correct |
2 ms |
5212 KB |
Output is correct |
41 |
Correct |
2 ms |
5212 KB |
Output is correct |
42 |
Correct |
2 ms |
5212 KB |
Output is correct |
43 |
Correct |
3 ms |
5208 KB |
Output is correct |
44 |
Correct |
3 ms |
5212 KB |
Output is correct |
45 |
Correct |
3 ms |
5212 KB |
Output is correct |
46 |
Correct |
2 ms |
5212 KB |
Output is correct |
47 |
Correct |
2 ms |
5212 KB |
Output is correct |
48 |
Correct |
2 ms |
5148 KB |
Output is correct |
49 |
Correct |
3 ms |
5212 KB |
Output is correct |
50 |
Correct |
2 ms |
4956 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
4956 KB |
Output is correct |
2 |
Correct |
2 ms |
4956 KB |
Output is correct |
3 |
Correct |
2 ms |
4956 KB |
Output is correct |
4 |
Correct |
2 ms |
4956 KB |
Output is correct |
5 |
Correct |
3 ms |
4956 KB |
Output is correct |
6 |
Correct |
2 ms |
4956 KB |
Output is correct |
7 |
Correct |
2 ms |
5212 KB |
Output is correct |
8 |
Correct |
2 ms |
4956 KB |
Output is correct |
9 |
Correct |
2 ms |
4956 KB |
Output is correct |
10 |
Correct |
2 ms |
4956 KB |
Output is correct |
11 |
Correct |
2 ms |
5212 KB |
Output is correct |
12 |
Correct |
3 ms |
5212 KB |
Output is correct |
13 |
Correct |
3 ms |
5216 KB |
Output is correct |
14 |
Correct |
3 ms |
5460 KB |
Output is correct |
15 |
Correct |
2 ms |
5208 KB |
Output is correct |
16 |
Correct |
2 ms |
5212 KB |
Output is correct |
17 |
Correct |
3 ms |
5212 KB |
Output is correct |
18 |
Correct |
2 ms |
5212 KB |
Output is correct |
19 |
Correct |
2 ms |
4952 KB |
Output is correct |
20 |
Correct |
6 ms |
9048 KB |
Output is correct |
21 |
Correct |
5 ms |
8480 KB |
Output is correct |
22 |
Correct |
5 ms |
8796 KB |
Output is correct |
23 |
Correct |
6 ms |
9052 KB |
Output is correct |
24 |
Correct |
6 ms |
9156 KB |
Output is correct |
25 |
Correct |
6 ms |
8996 KB |
Output is correct |
26 |
Correct |
2 ms |
4952 KB |
Output is correct |
27 |
Correct |
3 ms |
4952 KB |
Output is correct |
28 |
Correct |
2 ms |
4956 KB |
Output is correct |
29 |
Correct |
2 ms |
5148 KB |
Output is correct |
30 |
Correct |
2 ms |
4956 KB |
Output is correct |
31 |
Correct |
2 ms |
4956 KB |
Output is correct |
32 |
Correct |
2 ms |
4956 KB |
Output is correct |
33 |
Correct |
2 ms |
4956 KB |
Output is correct |
34 |
Correct |
2 ms |
4952 KB |
Output is correct |
35 |
Correct |
2 ms |
4956 KB |
Output is correct |
36 |
Correct |
2 ms |
4956 KB |
Output is correct |
37 |
Correct |
2 ms |
4956 KB |
Output is correct |
38 |
Correct |
2 ms |
4956 KB |
Output is correct |
39 |
Correct |
2 ms |
4956 KB |
Output is correct |
40 |
Correct |
2 ms |
4956 KB |
Output is correct |
41 |
Correct |
2 ms |
4956 KB |
Output is correct |
42 |
Correct |
2 ms |
4956 KB |
Output is correct |
43 |
Correct |
3 ms |
4956 KB |
Output is correct |
44 |
Correct |
3 ms |
4952 KB |
Output is correct |
45 |
Correct |
2 ms |
4956 KB |
Output is correct |
46 |
Correct |
3 ms |
5212 KB |
Output is correct |
47 |
Correct |
2 ms |
5212 KB |
Output is correct |
48 |
Correct |
2 ms |
5212 KB |
Output is correct |
49 |
Correct |
2 ms |
5212 KB |
Output is correct |
50 |
Correct |
3 ms |
5208 KB |
Output is correct |
51 |
Correct |
3 ms |
5212 KB |
Output is correct |
52 |
Correct |
3 ms |
5212 KB |
Output is correct |
53 |
Correct |
2 ms |
5212 KB |
Output is correct |
54 |
Correct |
2 ms |
5212 KB |
Output is correct |
55 |
Correct |
2 ms |
5148 KB |
Output is correct |
56 |
Correct |
3 ms |
5212 KB |
Output is correct |
57 |
Correct |
2 ms |
4956 KB |
Output is correct |
58 |
Correct |
3 ms |
4956 KB |
Output is correct |
59 |
Correct |
2 ms |
5212 KB |
Output is correct |
60 |
Correct |
2 ms |
5212 KB |
Output is correct |
61 |
Correct |
3 ms |
5468 KB |
Output is correct |
62 |
Correct |
3 ms |
5468 KB |
Output is correct |
63 |
Correct |
6 ms |
9056 KB |
Output is correct |
64 |
Correct |
5 ms |
8460 KB |
Output is correct |
65 |
Correct |
6 ms |
8284 KB |
Output is correct |
66 |
Correct |
5 ms |
8540 KB |
Output is correct |
67 |
Correct |
6 ms |
9092 KB |
Output is correct |
68 |
Correct |
5 ms |
8280 KB |
Output is correct |
69 |
Correct |
6 ms |
9052 KB |
Output is correct |
70 |
Correct |
6 ms |
8796 KB |
Output is correct |
71 |
Correct |
7 ms |
8508 KB |
Output is correct |
72 |
Correct |
6 ms |
8796 KB |
Output is correct |
73 |
Correct |
5 ms |
7516 KB |
Output is correct |
74 |
Correct |
5 ms |
7772 KB |
Output is correct |
75 |
Correct |
2 ms |
5212 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
4956 KB |
Output is correct |
2 |
Correct |
2 ms |
4956 KB |
Output is correct |
3 |
Correct |
2 ms |
4956 KB |
Output is correct |
4 |
Correct |
2 ms |
4956 KB |
Output is correct |
5 |
Correct |
3 ms |
4956 KB |
Output is correct |
6 |
Correct |
2 ms |
4956 KB |
Output is correct |
7 |
Correct |
2 ms |
5212 KB |
Output is correct |
8 |
Correct |
2 ms |
4956 KB |
Output is correct |
9 |
Correct |
2 ms |
4956 KB |
Output is correct |
10 |
Correct |
2 ms |
4956 KB |
Output is correct |
11 |
Correct |
2 ms |
5212 KB |
Output is correct |
12 |
Correct |
3 ms |
5212 KB |
Output is correct |
13 |
Correct |
3 ms |
5216 KB |
Output is correct |
14 |
Correct |
3 ms |
5460 KB |
Output is correct |
15 |
Correct |
2 ms |
5208 KB |
Output is correct |
16 |
Correct |
2 ms |
5212 KB |
Output is correct |
17 |
Correct |
3 ms |
5212 KB |
Output is correct |
18 |
Correct |
2 ms |
5212 KB |
Output is correct |
19 |
Correct |
2 ms |
4952 KB |
Output is correct |
20 |
Correct |
6 ms |
9048 KB |
Output is correct |
21 |
Correct |
5 ms |
8480 KB |
Output is correct |
22 |
Correct |
5 ms |
8796 KB |
Output is correct |
23 |
Correct |
6 ms |
9052 KB |
Output is correct |
24 |
Correct |
6 ms |
9156 KB |
Output is correct |
25 |
Correct |
6 ms |
8996 KB |
Output is correct |
26 |
Correct |
4 ms |
5208 KB |
Output is correct |
27 |
Correct |
154 ms |
146768 KB |
Output is correct |
28 |
Correct |
127 ms |
127268 KB |
Output is correct |
29 |
Correct |
126 ms |
128852 KB |
Output is correct |
30 |
Correct |
137 ms |
139128 KB |
Output is correct |
31 |
Correct |
127 ms |
126000 KB |
Output is correct |
32 |
Correct |
143 ms |
146512 KB |
Output is correct |
33 |
Correct |
144 ms |
146516 KB |
Output is correct |
34 |
Correct |
2 ms |
4952 KB |
Output is correct |
35 |
Correct |
3 ms |
4952 KB |
Output is correct |
36 |
Correct |
2 ms |
4956 KB |
Output is correct |
37 |
Correct |
2 ms |
5148 KB |
Output is correct |
38 |
Correct |
2 ms |
4956 KB |
Output is correct |
39 |
Correct |
2 ms |
4956 KB |
Output is correct |
40 |
Correct |
2 ms |
4956 KB |
Output is correct |
41 |
Correct |
2 ms |
4956 KB |
Output is correct |
42 |
Correct |
2 ms |
4952 KB |
Output is correct |
43 |
Correct |
2 ms |
4956 KB |
Output is correct |
44 |
Correct |
2 ms |
4956 KB |
Output is correct |
45 |
Correct |
2 ms |
4956 KB |
Output is correct |
46 |
Correct |
2 ms |
4956 KB |
Output is correct |
47 |
Correct |
2 ms |
4956 KB |
Output is correct |
48 |
Correct |
2 ms |
4956 KB |
Output is correct |
49 |
Correct |
2 ms |
4956 KB |
Output is correct |
50 |
Correct |
2 ms |
4956 KB |
Output is correct |
51 |
Correct |
3 ms |
4956 KB |
Output is correct |
52 |
Correct |
3 ms |
4952 KB |
Output is correct |
53 |
Correct |
2 ms |
4956 KB |
Output is correct |
54 |
Correct |
3 ms |
5212 KB |
Output is correct |
55 |
Correct |
2 ms |
5212 KB |
Output is correct |
56 |
Correct |
2 ms |
5212 KB |
Output is correct |
57 |
Correct |
2 ms |
5212 KB |
Output is correct |
58 |
Correct |
3 ms |
5208 KB |
Output is correct |
59 |
Correct |
3 ms |
5212 KB |
Output is correct |
60 |
Correct |
3 ms |
5212 KB |
Output is correct |
61 |
Correct |
2 ms |
5212 KB |
Output is correct |
62 |
Correct |
2 ms |
5212 KB |
Output is correct |
63 |
Correct |
2 ms |
5148 KB |
Output is correct |
64 |
Correct |
3 ms |
5212 KB |
Output is correct |
65 |
Correct |
2 ms |
4956 KB |
Output is correct |
66 |
Correct |
3 ms |
4956 KB |
Output is correct |
67 |
Correct |
2 ms |
5212 KB |
Output is correct |
68 |
Correct |
2 ms |
5212 KB |
Output is correct |
69 |
Correct |
3 ms |
5468 KB |
Output is correct |
70 |
Correct |
3 ms |
5468 KB |
Output is correct |
71 |
Correct |
6 ms |
9056 KB |
Output is correct |
72 |
Correct |
5 ms |
8460 KB |
Output is correct |
73 |
Correct |
6 ms |
8284 KB |
Output is correct |
74 |
Correct |
5 ms |
8540 KB |
Output is correct |
75 |
Correct |
6 ms |
9092 KB |
Output is correct |
76 |
Correct |
5 ms |
8280 KB |
Output is correct |
77 |
Correct |
6 ms |
9052 KB |
Output is correct |
78 |
Correct |
6 ms |
8796 KB |
Output is correct |
79 |
Correct |
7 ms |
8508 KB |
Output is correct |
80 |
Correct |
6 ms |
8796 KB |
Output is correct |
81 |
Correct |
5 ms |
7516 KB |
Output is correct |
82 |
Correct |
5 ms |
7772 KB |
Output is correct |
83 |
Correct |
2 ms |
5212 KB |
Output is correct |
84 |
Correct |
4 ms |
5212 KB |
Output is correct |
85 |
Correct |
9 ms |
6236 KB |
Output is correct |
86 |
Correct |
5 ms |
5164 KB |
Output is correct |
87 |
Correct |
6 ms |
5468 KB |
Output is correct |
88 |
Correct |
7 ms |
5616 KB |
Output is correct |
89 |
Correct |
151 ms |
146500 KB |
Output is correct |
90 |
Correct |
126 ms |
120908 KB |
Output is correct |
91 |
Correct |
157 ms |
144980 KB |
Output is correct |
92 |
Correct |
141 ms |
126832 KB |
Output is correct |
93 |
Correct |
133 ms |
129364 KB |
Output is correct |
94 |
Correct |
132 ms |
132900 KB |
Output is correct |
95 |
Correct |
140 ms |
139348 KB |
Output is correct |
96 |
Correct |
125 ms |
122708 KB |
Output is correct |
97 |
Correct |
139 ms |
138836 KB |
Output is correct |
98 |
Correct |
127 ms |
135252 KB |
Output is correct |
99 |
Correct |
152 ms |
146388 KB |
Output is correct |
100 |
Correct |
79 ms |
73480 KB |
Output is correct |
101 |
Correct |
13 ms |
9304 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
4956 KB |
Output is correct |
2 |
Correct |
2 ms |
4956 KB |
Output is correct |
3 |
Correct |
2 ms |
4956 KB |
Output is correct |
4 |
Correct |
2 ms |
4956 KB |
Output is correct |
5 |
Correct |
3 ms |
4956 KB |
Output is correct |
6 |
Correct |
2 ms |
4956 KB |
Output is correct |
7 |
Correct |
2 ms |
5212 KB |
Output is correct |
8 |
Correct |
2 ms |
4956 KB |
Output is correct |
9 |
Correct |
2 ms |
4956 KB |
Output is correct |
10 |
Correct |
2 ms |
4956 KB |
Output is correct |
11 |
Correct |
2 ms |
5212 KB |
Output is correct |
12 |
Correct |
3 ms |
5212 KB |
Output is correct |
13 |
Correct |
3 ms |
5216 KB |
Output is correct |
14 |
Correct |
3 ms |
5460 KB |
Output is correct |
15 |
Correct |
2 ms |
5208 KB |
Output is correct |
16 |
Correct |
2 ms |
5212 KB |
Output is correct |
17 |
Correct |
3 ms |
5212 KB |
Output is correct |
18 |
Correct |
2 ms |
5212 KB |
Output is correct |
19 |
Correct |
2 ms |
4952 KB |
Output is correct |
20 |
Correct |
6 ms |
9048 KB |
Output is correct |
21 |
Correct |
5 ms |
8480 KB |
Output is correct |
22 |
Correct |
5 ms |
8796 KB |
Output is correct |
23 |
Correct |
6 ms |
9052 KB |
Output is correct |
24 |
Correct |
6 ms |
9156 KB |
Output is correct |
25 |
Correct |
6 ms |
8996 KB |
Output is correct |
26 |
Correct |
4 ms |
5208 KB |
Output is correct |
27 |
Correct |
154 ms |
146768 KB |
Output is correct |
28 |
Correct |
127 ms |
127268 KB |
Output is correct |
29 |
Correct |
126 ms |
128852 KB |
Output is correct |
30 |
Correct |
137 ms |
139128 KB |
Output is correct |
31 |
Correct |
127 ms |
126000 KB |
Output is correct |
32 |
Correct |
143 ms |
146512 KB |
Output is correct |
33 |
Correct |
144 ms |
146516 KB |
Output is correct |
34 |
Correct |
2 ms |
4952 KB |
Output is correct |
35 |
Correct |
3 ms |
4952 KB |
Output is correct |
36 |
Correct |
2 ms |
4956 KB |
Output is correct |
37 |
Correct |
2 ms |
5148 KB |
Output is correct |
38 |
Correct |
2 ms |
4956 KB |
Output is correct |
39 |
Correct |
2 ms |
4956 KB |
Output is correct |
40 |
Correct |
2 ms |
4956 KB |
Output is correct |
41 |
Correct |
2 ms |
4956 KB |
Output is correct |
42 |
Correct |
2 ms |
4952 KB |
Output is correct |
43 |
Correct |
2 ms |
4956 KB |
Output is correct |
44 |
Correct |
2 ms |
4956 KB |
Output is correct |
45 |
Correct |
2 ms |
4956 KB |
Output is correct |
46 |
Correct |
2 ms |
4956 KB |
Output is correct |
47 |
Correct |
2 ms |
4956 KB |
Output is correct |
48 |
Correct |
2 ms |
4956 KB |
Output is correct |
49 |
Correct |
2 ms |
4956 KB |
Output is correct |
50 |
Correct |
2 ms |
4956 KB |
Output is correct |
51 |
Correct |
3 ms |
4956 KB |
Output is correct |
52 |
Correct |
3 ms |
4952 KB |
Output is correct |
53 |
Correct |
2 ms |
4956 KB |
Output is correct |
54 |
Correct |
3 ms |
5212 KB |
Output is correct |
55 |
Correct |
2 ms |
5212 KB |
Output is correct |
56 |
Correct |
2 ms |
5212 KB |
Output is correct |
57 |
Correct |
2 ms |
5212 KB |
Output is correct |
58 |
Correct |
3 ms |
5208 KB |
Output is correct |
59 |
Correct |
3 ms |
5212 KB |
Output is correct |
60 |
Correct |
3 ms |
5212 KB |
Output is correct |
61 |
Correct |
2 ms |
5212 KB |
Output is correct |
62 |
Correct |
2 ms |
5212 KB |
Output is correct |
63 |
Correct |
2 ms |
5148 KB |
Output is correct |
64 |
Correct |
3 ms |
5212 KB |
Output is correct |
65 |
Correct |
2 ms |
4956 KB |
Output is correct |
66 |
Correct |
3 ms |
4956 KB |
Output is correct |
67 |
Correct |
2 ms |
5212 KB |
Output is correct |
68 |
Correct |
2 ms |
5212 KB |
Output is correct |
69 |
Correct |
3 ms |
5468 KB |
Output is correct |
70 |
Correct |
3 ms |
5468 KB |
Output is correct |
71 |
Correct |
6 ms |
9056 KB |
Output is correct |
72 |
Correct |
5 ms |
8460 KB |
Output is correct |
73 |
Correct |
6 ms |
8284 KB |
Output is correct |
74 |
Correct |
5 ms |
8540 KB |
Output is correct |
75 |
Correct |
6 ms |
9092 KB |
Output is correct |
76 |
Correct |
5 ms |
8280 KB |
Output is correct |
77 |
Correct |
6 ms |
9052 KB |
Output is correct |
78 |
Correct |
6 ms |
8796 KB |
Output is correct |
79 |
Correct |
7 ms |
8508 KB |
Output is correct |
80 |
Correct |
6 ms |
8796 KB |
Output is correct |
81 |
Correct |
5 ms |
7516 KB |
Output is correct |
82 |
Correct |
5 ms |
7772 KB |
Output is correct |
83 |
Correct |
2 ms |
5212 KB |
Output is correct |
84 |
Correct |
4 ms |
5212 KB |
Output is correct |
85 |
Correct |
9 ms |
6236 KB |
Output is correct |
86 |
Correct |
5 ms |
5164 KB |
Output is correct |
87 |
Correct |
6 ms |
5468 KB |
Output is correct |
88 |
Correct |
7 ms |
5616 KB |
Output is correct |
89 |
Correct |
151 ms |
146500 KB |
Output is correct |
90 |
Correct |
126 ms |
120908 KB |
Output is correct |
91 |
Correct |
157 ms |
144980 KB |
Output is correct |
92 |
Correct |
141 ms |
126832 KB |
Output is correct |
93 |
Correct |
133 ms |
129364 KB |
Output is correct |
94 |
Correct |
132 ms |
132900 KB |
Output is correct |
95 |
Correct |
140 ms |
139348 KB |
Output is correct |
96 |
Correct |
125 ms |
122708 KB |
Output is correct |
97 |
Correct |
139 ms |
138836 KB |
Output is correct |
98 |
Correct |
127 ms |
135252 KB |
Output is correct |
99 |
Correct |
152 ms |
146388 KB |
Output is correct |
100 |
Correct |
79 ms |
73480 KB |
Output is correct |
101 |
Correct |
13 ms |
9304 KB |
Output is correct |
102 |
Correct |
173 ms |
10416 KB |
Output is correct |
103 |
Correct |
561 ms |
12840 KB |
Output is correct |
104 |
Execution timed out |
1120 ms |
2097152 KB |
Time limit exceeded |
105 |
Halted |
0 ms |
0 KB |
- |