#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll z[400005];
struct node {
ll a, b;
bool operator < (const node &z) const {
return b < z.b;
}
} c[400005];
namespace Cardboard_Box {
int cnt, p[400005], q[400005];
ll d[400005], nu[400005], su[400005];
void add (int x, int v1, ll v2) {
while (x <= cnt) {
nu[x] += v1, su[x] += v2;
x += x & -x;
}
}
int solve (int n, ll K, node *c, int m, ll *z) {
cnt = 0;
for (int i = 1; i <= m; i++) d[++cnt] = z[i];
for (int i = 1; i <= n; i++) {
d[++cnt] = c[i].a;
d[++cnt] = c[i].b - c[i].a;
}
sort (c + 1, c + n + 1);
sort (d + 1, d + cnt + 1);
cnt = unique (d + 1, d + cnt + 1) - d - 1;
ll sum = 0;
memset (nu, 0, cnt + 2 << 3);
memset (su, 0, cnt + 2 << 3);
for (int i = 1; i <= m; i++) {
int pos = lower_bound (d + 1, d + cnt + 1, z[i]) - d;
add (pos, 1, z[i]);
}
for (int i = 1; i <= n; i++) {
p[i] = lower_bound (d + 1, d + cnt + 1, c[i].a) - d;
q[i] = lower_bound (d + 1, d + cnt + 1, c[i].b - c[i].a) - d;
add (p[i], 1, c[i].a);
}
ll ans = 0;
for (int i = 0; i <= n; i++) {
if (i) {
add (p[i], -1, -c[i].a);
add (q[i], 1, c[i].b - c[i].a);
K -= c[i].a;
}
if (K < 0) break;
ll p = 0, num = 0, sum = 0;
for (int j = __lg (cnt); j >= 0; j--) {
int np = p + (1 << j);
if (np > cnt || sum + su[np] > K) continue;
p = np, num += nu[p], sum += su[p];
}
if (p < cnt) num += (K - sum) / d[p + 1];
ans = max (ans, num + i);
}
return ans;
}
}
ll dx[400005], dy[400005];
vector<pair <int, int>> e[400005];
void dfs (int x, int fl, ll *d) {
if (fl == -1) d[x] = 0;
for (pair <int, int> t : e[x]) {
int it = t.first;
if (it == fl) continue;
d[it] = d[x] + t.second;
dfs (it, x, d);
}
}
int max_score (int N, int X, int Y, ll K, vector<int> U, vector<int> V, vector<int> W) {
for (int i = 0; i < N; i++) e[i].clear();
for (int i = 0; i + 1 < N; i++) {
e[U[i]].push_back ({V[i], W[i]});
e[V[i]].push_back ({U[i], W[i]});
}
dfs (X, -1, dx), dfs (Y, -1, dy);
vector<ll> arr;
for (int i = 0; i < N; i++) {
arr.push_back (dx[i]);
arr.push_back (dy[i]);
}
sort (arr.begin(), arr.end());
int ans = 0;
ll sum = 0;
for (int i = 0; i < arr.size(); i++) {
if ((sum += arr[i]) > K) break;
ans++;
}
int n = 0, m = 0, cnt = 0;
for (int i = 0; i < N; i++) {
ll mn = min (dx[i], dy[i]);
ll mx = max (dx[i], dy[i]);
if (dx[i] + dy[i] == dx[Y]) {
cnt++, K -= mn;
z[++ m] = mx - mn;
}
else c[++ n] = {mn, mx};
}
if (K >= 0) ans = max (ans, cnt + Cardboard_Box::solve (n, K, c, m, z));
return ans;
}
Compilation message
closing.cpp: In function 'int Cardboard_Box::solve(int, long long int, node*, int, long long int*)':
closing.cpp:31:22: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
31 | memset (nu, 0, cnt + 2 << 3);
| ~~~~^~~
closing.cpp:32:22: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
32 | memset (su, 0, cnt + 2 << 3);
| ~~~~^~~
closing.cpp:30:6: warning: unused variable 'sum' [-Wunused-variable]
30 | ll sum = 0;
| ^~~
closing.cpp: In function 'int max_score(int, int, int, long long int, std::vector<int>, std::vector<int>, std::vector<int>)':
closing.cpp:88:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
88 | for (int i = 0; i < arr.size(); i++) {
| ~~^~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
25176 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
120 ms |
41476 KB |
Output is correct |
2 |
Correct |
124 ms |
49668 KB |
Output is correct |
3 |
Correct |
66 ms |
21328 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
25424 KB |
Output is correct |
2 |
Correct |
4 ms |
25176 KB |
Output is correct |
3 |
Correct |
4 ms |
25176 KB |
Output is correct |
4 |
Correct |
4 ms |
23132 KB |
Output is correct |
5 |
Correct |
3 ms |
16984 KB |
Output is correct |
6 |
Correct |
4 ms |
25176 KB |
Output is correct |
7 |
Correct |
4 ms |
25180 KB |
Output is correct |
8 |
Correct |
4 ms |
25176 KB |
Output is correct |
9 |
Correct |
3 ms |
16984 KB |
Output is correct |
10 |
Correct |
3 ms |
14936 KB |
Output is correct |
11 |
Correct |
3 ms |
14936 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
25424 KB |
Output is correct |
2 |
Correct |
4 ms |
25176 KB |
Output is correct |
3 |
Correct |
4 ms |
25176 KB |
Output is correct |
4 |
Correct |
4 ms |
23132 KB |
Output is correct |
5 |
Correct |
3 ms |
16984 KB |
Output is correct |
6 |
Correct |
4 ms |
25176 KB |
Output is correct |
7 |
Correct |
4 ms |
25180 KB |
Output is correct |
8 |
Correct |
4 ms |
25176 KB |
Output is correct |
9 |
Correct |
3 ms |
16984 KB |
Output is correct |
10 |
Correct |
3 ms |
14936 KB |
Output is correct |
11 |
Correct |
3 ms |
14936 KB |
Output is correct |
12 |
Correct |
4 ms |
25176 KB |
Output is correct |
13 |
Correct |
5 ms |
25176 KB |
Output is correct |
14 |
Correct |
4 ms |
25176 KB |
Output is correct |
15 |
Correct |
3 ms |
16984 KB |
Output is correct |
16 |
Correct |
3 ms |
14936 KB |
Output is correct |
17 |
Correct |
3 ms |
14940 KB |
Output is correct |
18 |
Correct |
4 ms |
25176 KB |
Output is correct |
19 |
Correct |
4 ms |
25176 KB |
Output is correct |
20 |
Correct |
4 ms |
25176 KB |
Output is correct |
21 |
Correct |
4 ms |
25176 KB |
Output is correct |
22 |
Correct |
3 ms |
16984 KB |
Output is correct |
23 |
Correct |
4 ms |
14936 KB |
Output is correct |
24 |
Correct |
3 ms |
14936 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
25424 KB |
Output is correct |
2 |
Correct |
4 ms |
25176 KB |
Output is correct |
3 |
Correct |
4 ms |
25176 KB |
Output is correct |
4 |
Correct |
4 ms |
23132 KB |
Output is correct |
5 |
Correct |
3 ms |
16984 KB |
Output is correct |
6 |
Correct |
4 ms |
25176 KB |
Output is correct |
7 |
Correct |
4 ms |
25180 KB |
Output is correct |
8 |
Correct |
4 ms |
25176 KB |
Output is correct |
9 |
Correct |
3 ms |
16984 KB |
Output is correct |
10 |
Correct |
3 ms |
14936 KB |
Output is correct |
11 |
Correct |
3 ms |
14936 KB |
Output is correct |
12 |
Correct |
4 ms |
25176 KB |
Output is correct |
13 |
Correct |
5 ms |
25176 KB |
Output is correct |
14 |
Correct |
4 ms |
25176 KB |
Output is correct |
15 |
Correct |
3 ms |
16984 KB |
Output is correct |
16 |
Correct |
3 ms |
14936 KB |
Output is correct |
17 |
Correct |
3 ms |
14940 KB |
Output is correct |
18 |
Correct |
4 ms |
25176 KB |
Output is correct |
19 |
Correct |
4 ms |
25176 KB |
Output is correct |
20 |
Correct |
4 ms |
25176 KB |
Output is correct |
21 |
Correct |
4 ms |
25176 KB |
Output is correct |
22 |
Correct |
3 ms |
16984 KB |
Output is correct |
23 |
Correct |
4 ms |
14936 KB |
Output is correct |
24 |
Correct |
3 ms |
14936 KB |
Output is correct |
25 |
Correct |
5 ms |
25176 KB |
Output is correct |
26 |
Correct |
5 ms |
25432 KB |
Output is correct |
27 |
Correct |
5 ms |
25436 KB |
Output is correct |
28 |
Correct |
5 ms |
25432 KB |
Output is correct |
29 |
Correct |
6 ms |
25432 KB |
Output is correct |
30 |
Correct |
4 ms |
17240 KB |
Output is correct |
31 |
Correct |
4 ms |
15192 KB |
Output is correct |
32 |
Correct |
4 ms |
15192 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
25176 KB |
Output is correct |
2 |
Correct |
5 ms |
25424 KB |
Output is correct |
3 |
Correct |
4 ms |
25176 KB |
Output is correct |
4 |
Correct |
4 ms |
25176 KB |
Output is correct |
5 |
Correct |
4 ms |
23132 KB |
Output is correct |
6 |
Correct |
3 ms |
16984 KB |
Output is correct |
7 |
Correct |
4 ms |
25176 KB |
Output is correct |
8 |
Correct |
4 ms |
25176 KB |
Output is correct |
9 |
Correct |
4 ms |
25176 KB |
Output is correct |
10 |
Correct |
4 ms |
25176 KB |
Output is correct |
11 |
Correct |
4 ms |
25176 KB |
Output is correct |
12 |
Correct |
3 ms |
16984 KB |
Output is correct |
13 |
Correct |
4 ms |
25176 KB |
Output is correct |
14 |
Correct |
4 ms |
25176 KB |
Output is correct |
15 |
Correct |
4 ms |
25176 KB |
Output is correct |
16 |
Correct |
4 ms |
25176 KB |
Output is correct |
17 |
Correct |
3 ms |
16984 KB |
Output is correct |
18 |
Correct |
4 ms |
25176 KB |
Output is correct |
19 |
Correct |
4 ms |
25432 KB |
Output is correct |
20 |
Correct |
4 ms |
25180 KB |
Output is correct |
21 |
Correct |
4 ms |
25176 KB |
Output is correct |
22 |
Correct |
4 ms |
25180 KB |
Output is correct |
23 |
Correct |
4 ms |
25176 KB |
Output is correct |
24 |
Correct |
4 ms |
25176 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
25176 KB |
Output is correct |
2 |
Correct |
5 ms |
25424 KB |
Output is correct |
3 |
Correct |
4 ms |
25176 KB |
Output is correct |
4 |
Correct |
4 ms |
25176 KB |
Output is correct |
5 |
Correct |
4 ms |
23132 KB |
Output is correct |
6 |
Correct |
3 ms |
16984 KB |
Output is correct |
7 |
Correct |
4 ms |
25176 KB |
Output is correct |
8 |
Correct |
4 ms |
25180 KB |
Output is correct |
9 |
Correct |
4 ms |
25176 KB |
Output is correct |
10 |
Correct |
3 ms |
16984 KB |
Output is correct |
11 |
Correct |
3 ms |
14936 KB |
Output is correct |
12 |
Correct |
3 ms |
14936 KB |
Output is correct |
13 |
Correct |
4 ms |
25176 KB |
Output is correct |
14 |
Correct |
5 ms |
25176 KB |
Output is correct |
15 |
Correct |
4 ms |
25176 KB |
Output is correct |
16 |
Correct |
3 ms |
16984 KB |
Output is correct |
17 |
Correct |
3 ms |
14936 KB |
Output is correct |
18 |
Correct |
3 ms |
14940 KB |
Output is correct |
19 |
Correct |
4 ms |
25176 KB |
Output is correct |
20 |
Correct |
4 ms |
25176 KB |
Output is correct |
21 |
Correct |
4 ms |
25176 KB |
Output is correct |
22 |
Correct |
4 ms |
25176 KB |
Output is correct |
23 |
Correct |
4 ms |
25176 KB |
Output is correct |
24 |
Correct |
3 ms |
16984 KB |
Output is correct |
25 |
Correct |
4 ms |
25176 KB |
Output is correct |
26 |
Correct |
4 ms |
25176 KB |
Output is correct |
27 |
Correct |
4 ms |
25176 KB |
Output is correct |
28 |
Correct |
4 ms |
25176 KB |
Output is correct |
29 |
Correct |
3 ms |
16984 KB |
Output is correct |
30 |
Correct |
4 ms |
25176 KB |
Output is correct |
31 |
Correct |
4 ms |
25432 KB |
Output is correct |
32 |
Correct |
4 ms |
25180 KB |
Output is correct |
33 |
Correct |
4 ms |
25176 KB |
Output is correct |
34 |
Correct |
4 ms |
25180 KB |
Output is correct |
35 |
Correct |
4 ms |
25176 KB |
Output is correct |
36 |
Correct |
4 ms |
25176 KB |
Output is correct |
37 |
Correct |
4 ms |
25176 KB |
Output is correct |
38 |
Correct |
4 ms |
25176 KB |
Output is correct |
39 |
Correct |
4 ms |
25176 KB |
Output is correct |
40 |
Correct |
4 ms |
25176 KB |
Output is correct |
41 |
Correct |
4 ms |
25176 KB |
Output is correct |
42 |
Correct |
3 ms |
16984 KB |
Output is correct |
43 |
Correct |
4 ms |
25180 KB |
Output is correct |
44 |
Correct |
4 ms |
25176 KB |
Output is correct |
45 |
Correct |
3 ms |
16984 KB |
Output is correct |
46 |
Correct |
4 ms |
25176 KB |
Output is correct |
47 |
Correct |
4 ms |
25176 KB |
Output is correct |
48 |
Correct |
4 ms |
25176 KB |
Output is correct |
49 |
Correct |
5 ms |
25176 KB |
Output is correct |
50 |
Correct |
4 ms |
25176 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
25176 KB |
Output is correct |
2 |
Correct |
5 ms |
25424 KB |
Output is correct |
3 |
Correct |
4 ms |
25176 KB |
Output is correct |
4 |
Correct |
4 ms |
25176 KB |
Output is correct |
5 |
Correct |
4 ms |
23132 KB |
Output is correct |
6 |
Correct |
3 ms |
16984 KB |
Output is correct |
7 |
Correct |
4 ms |
25176 KB |
Output is correct |
8 |
Correct |
4 ms |
25180 KB |
Output is correct |
9 |
Correct |
4 ms |
25176 KB |
Output is correct |
10 |
Correct |
3 ms |
16984 KB |
Output is correct |
11 |
Correct |
3 ms |
14936 KB |
Output is correct |
12 |
Correct |
3 ms |
14936 KB |
Output is correct |
13 |
Correct |
4 ms |
25176 KB |
Output is correct |
14 |
Correct |
5 ms |
25176 KB |
Output is correct |
15 |
Correct |
4 ms |
25176 KB |
Output is correct |
16 |
Correct |
3 ms |
16984 KB |
Output is correct |
17 |
Correct |
3 ms |
14936 KB |
Output is correct |
18 |
Correct |
3 ms |
14940 KB |
Output is correct |
19 |
Correct |
4 ms |
25176 KB |
Output is correct |
20 |
Correct |
4 ms |
25176 KB |
Output is correct |
21 |
Correct |
4 ms |
25176 KB |
Output is correct |
22 |
Correct |
4 ms |
25176 KB |
Output is correct |
23 |
Correct |
3 ms |
16984 KB |
Output is correct |
24 |
Correct |
4 ms |
14936 KB |
Output is correct |
25 |
Correct |
3 ms |
14936 KB |
Output is correct |
26 |
Correct |
4 ms |
25176 KB |
Output is correct |
27 |
Correct |
4 ms |
25176 KB |
Output is correct |
28 |
Correct |
4 ms |
25176 KB |
Output is correct |
29 |
Correct |
4 ms |
25176 KB |
Output is correct |
30 |
Correct |
4 ms |
25176 KB |
Output is correct |
31 |
Correct |
3 ms |
16984 KB |
Output is correct |
32 |
Correct |
4 ms |
25176 KB |
Output is correct |
33 |
Correct |
4 ms |
25176 KB |
Output is correct |
34 |
Correct |
4 ms |
25176 KB |
Output is correct |
35 |
Correct |
4 ms |
25176 KB |
Output is correct |
36 |
Correct |
3 ms |
16984 KB |
Output is correct |
37 |
Correct |
4 ms |
25176 KB |
Output is correct |
38 |
Correct |
4 ms |
25432 KB |
Output is correct |
39 |
Correct |
4 ms |
25180 KB |
Output is correct |
40 |
Correct |
4 ms |
25176 KB |
Output is correct |
41 |
Correct |
4 ms |
25180 KB |
Output is correct |
42 |
Correct |
4 ms |
25176 KB |
Output is correct |
43 |
Correct |
4 ms |
25176 KB |
Output is correct |
44 |
Correct |
4 ms |
25176 KB |
Output is correct |
45 |
Correct |
4 ms |
25176 KB |
Output is correct |
46 |
Correct |
4 ms |
25176 KB |
Output is correct |
47 |
Correct |
4 ms |
25176 KB |
Output is correct |
48 |
Correct |
4 ms |
25176 KB |
Output is correct |
49 |
Correct |
3 ms |
16984 KB |
Output is correct |
50 |
Correct |
4 ms |
25180 KB |
Output is correct |
51 |
Correct |
4 ms |
25176 KB |
Output is correct |
52 |
Correct |
3 ms |
16984 KB |
Output is correct |
53 |
Correct |
4 ms |
25176 KB |
Output is correct |
54 |
Correct |
4 ms |
25176 KB |
Output is correct |
55 |
Correct |
4 ms |
25176 KB |
Output is correct |
56 |
Correct |
5 ms |
25176 KB |
Output is correct |
57 |
Correct |
4 ms |
25176 KB |
Output is correct |
58 |
Correct |
4 ms |
25176 KB |
Output is correct |
59 |
Correct |
4 ms |
25180 KB |
Output is correct |
60 |
Correct |
6 ms |
25436 KB |
Output is correct |
61 |
Correct |
4 ms |
25180 KB |
Output is correct |
62 |
Correct |
4 ms |
25176 KB |
Output is correct |
63 |
Correct |
4 ms |
25176 KB |
Output is correct |
64 |
Correct |
4 ms |
25180 KB |
Output is correct |
65 |
Correct |
4 ms |
25180 KB |
Output is correct |
66 |
Correct |
4 ms |
25176 KB |
Output is correct |
67 |
Correct |
4 ms |
16984 KB |
Output is correct |
68 |
Correct |
4 ms |
25180 KB |
Output is correct |
69 |
Correct |
4 ms |
25176 KB |
Output is correct |
70 |
Correct |
3 ms |
16984 KB |
Output is correct |
71 |
Correct |
3 ms |
16988 KB |
Output is correct |
72 |
Correct |
5 ms |
25176 KB |
Output is correct |
73 |
Correct |
4 ms |
25176 KB |
Output is correct |
74 |
Correct |
5 ms |
25176 KB |
Output is correct |
75 |
Correct |
5 ms |
25176 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
25176 KB |
Output is correct |
2 |
Correct |
5 ms |
25424 KB |
Output is correct |
3 |
Correct |
4 ms |
25176 KB |
Output is correct |
4 |
Correct |
4 ms |
25176 KB |
Output is correct |
5 |
Correct |
4 ms |
23132 KB |
Output is correct |
6 |
Correct |
3 ms |
16984 KB |
Output is correct |
7 |
Correct |
4 ms |
25176 KB |
Output is correct |
8 |
Correct |
4 ms |
25180 KB |
Output is correct |
9 |
Correct |
4 ms |
25176 KB |
Output is correct |
10 |
Correct |
3 ms |
16984 KB |
Output is correct |
11 |
Correct |
3 ms |
14936 KB |
Output is correct |
12 |
Correct |
3 ms |
14936 KB |
Output is correct |
13 |
Correct |
4 ms |
25176 KB |
Output is correct |
14 |
Correct |
5 ms |
25176 KB |
Output is correct |
15 |
Correct |
4 ms |
25176 KB |
Output is correct |
16 |
Correct |
3 ms |
16984 KB |
Output is correct |
17 |
Correct |
3 ms |
14936 KB |
Output is correct |
18 |
Correct |
3 ms |
14940 KB |
Output is correct |
19 |
Correct |
4 ms |
25176 KB |
Output is correct |
20 |
Correct |
4 ms |
25176 KB |
Output is correct |
21 |
Correct |
4 ms |
25176 KB |
Output is correct |
22 |
Correct |
4 ms |
25176 KB |
Output is correct |
23 |
Correct |
3 ms |
16984 KB |
Output is correct |
24 |
Correct |
4 ms |
14936 KB |
Output is correct |
25 |
Correct |
3 ms |
14936 KB |
Output is correct |
26 |
Correct |
5 ms |
25176 KB |
Output is correct |
27 |
Correct |
5 ms |
25432 KB |
Output is correct |
28 |
Correct |
5 ms |
25436 KB |
Output is correct |
29 |
Correct |
5 ms |
25432 KB |
Output is correct |
30 |
Correct |
6 ms |
25432 KB |
Output is correct |
31 |
Correct |
4 ms |
17240 KB |
Output is correct |
32 |
Correct |
4 ms |
15192 KB |
Output is correct |
33 |
Correct |
4 ms |
15192 KB |
Output is correct |
34 |
Correct |
4 ms |
25176 KB |
Output is correct |
35 |
Correct |
4 ms |
25176 KB |
Output is correct |
36 |
Correct |
4 ms |
25176 KB |
Output is correct |
37 |
Correct |
4 ms |
25176 KB |
Output is correct |
38 |
Correct |
4 ms |
25176 KB |
Output is correct |
39 |
Correct |
3 ms |
16984 KB |
Output is correct |
40 |
Correct |
4 ms |
25176 KB |
Output is correct |
41 |
Correct |
4 ms |
25176 KB |
Output is correct |
42 |
Correct |
4 ms |
25176 KB |
Output is correct |
43 |
Correct |
4 ms |
25176 KB |
Output is correct |
44 |
Correct |
3 ms |
16984 KB |
Output is correct |
45 |
Correct |
4 ms |
25176 KB |
Output is correct |
46 |
Correct |
4 ms |
25432 KB |
Output is correct |
47 |
Correct |
4 ms |
25180 KB |
Output is correct |
48 |
Correct |
4 ms |
25176 KB |
Output is correct |
49 |
Correct |
4 ms |
25180 KB |
Output is correct |
50 |
Correct |
4 ms |
25176 KB |
Output is correct |
51 |
Correct |
4 ms |
25176 KB |
Output is correct |
52 |
Correct |
4 ms |
25176 KB |
Output is correct |
53 |
Correct |
4 ms |
25176 KB |
Output is correct |
54 |
Correct |
4 ms |
25176 KB |
Output is correct |
55 |
Correct |
4 ms |
25176 KB |
Output is correct |
56 |
Correct |
4 ms |
25176 KB |
Output is correct |
57 |
Correct |
3 ms |
16984 KB |
Output is correct |
58 |
Correct |
4 ms |
25180 KB |
Output is correct |
59 |
Correct |
4 ms |
25176 KB |
Output is correct |
60 |
Correct |
3 ms |
16984 KB |
Output is correct |
61 |
Correct |
4 ms |
25176 KB |
Output is correct |
62 |
Correct |
4 ms |
25176 KB |
Output is correct |
63 |
Correct |
4 ms |
25176 KB |
Output is correct |
64 |
Correct |
5 ms |
25176 KB |
Output is correct |
65 |
Correct |
4 ms |
25176 KB |
Output is correct |
66 |
Correct |
4 ms |
25176 KB |
Output is correct |
67 |
Correct |
4 ms |
25180 KB |
Output is correct |
68 |
Correct |
6 ms |
25436 KB |
Output is correct |
69 |
Correct |
4 ms |
25180 KB |
Output is correct |
70 |
Correct |
4 ms |
25176 KB |
Output is correct |
71 |
Correct |
4 ms |
25176 KB |
Output is correct |
72 |
Correct |
4 ms |
25180 KB |
Output is correct |
73 |
Correct |
4 ms |
25180 KB |
Output is correct |
74 |
Correct |
4 ms |
25176 KB |
Output is correct |
75 |
Correct |
4 ms |
16984 KB |
Output is correct |
76 |
Correct |
4 ms |
25180 KB |
Output is correct |
77 |
Correct |
4 ms |
25176 KB |
Output is correct |
78 |
Correct |
3 ms |
16984 KB |
Output is correct |
79 |
Correct |
3 ms |
16988 KB |
Output is correct |
80 |
Correct |
5 ms |
25176 KB |
Output is correct |
81 |
Correct |
4 ms |
25176 KB |
Output is correct |
82 |
Correct |
5 ms |
25176 KB |
Output is correct |
83 |
Correct |
5 ms |
25176 KB |
Output is correct |
84 |
Correct |
5 ms |
25176 KB |
Output is correct |
85 |
Correct |
5 ms |
25176 KB |
Output is correct |
86 |
Correct |
5 ms |
25176 KB |
Output is correct |
87 |
Correct |
5 ms |
25180 KB |
Output is correct |
88 |
Correct |
5 ms |
25176 KB |
Output is correct |
89 |
Correct |
6 ms |
25436 KB |
Output is correct |
90 |
Correct |
6 ms |
25436 KB |
Output is correct |
91 |
Correct |
6 ms |
25436 KB |
Output is correct |
92 |
Correct |
6 ms |
25432 KB |
Output is correct |
93 |
Correct |
4 ms |
17240 KB |
Output is correct |
94 |
Correct |
5 ms |
25436 KB |
Output is correct |
95 |
Correct |
5 ms |
25432 KB |
Output is correct |
96 |
Correct |
5 ms |
17240 KB |
Output is correct |
97 |
Correct |
6 ms |
25432 KB |
Output is correct |
98 |
Correct |
6 ms |
25432 KB |
Output is correct |
99 |
Correct |
6 ms |
25436 KB |
Output is correct |
100 |
Correct |
5 ms |
25432 KB |
Output is correct |
101 |
Correct |
6 ms |
25176 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
25176 KB |
Output is correct |
2 |
Correct |
5 ms |
25424 KB |
Output is correct |
3 |
Correct |
4 ms |
25176 KB |
Output is correct |
4 |
Correct |
4 ms |
25176 KB |
Output is correct |
5 |
Correct |
4 ms |
23132 KB |
Output is correct |
6 |
Correct |
3 ms |
16984 KB |
Output is correct |
7 |
Correct |
4 ms |
25176 KB |
Output is correct |
8 |
Correct |
4 ms |
25180 KB |
Output is correct |
9 |
Correct |
4 ms |
25176 KB |
Output is correct |
10 |
Correct |
3 ms |
16984 KB |
Output is correct |
11 |
Correct |
3 ms |
14936 KB |
Output is correct |
12 |
Correct |
3 ms |
14936 KB |
Output is correct |
13 |
Correct |
4 ms |
25176 KB |
Output is correct |
14 |
Correct |
5 ms |
25176 KB |
Output is correct |
15 |
Correct |
4 ms |
25176 KB |
Output is correct |
16 |
Correct |
3 ms |
16984 KB |
Output is correct |
17 |
Correct |
3 ms |
14936 KB |
Output is correct |
18 |
Correct |
3 ms |
14940 KB |
Output is correct |
19 |
Correct |
4 ms |
25176 KB |
Output is correct |
20 |
Correct |
4 ms |
25176 KB |
Output is correct |
21 |
Correct |
4 ms |
25176 KB |
Output is correct |
22 |
Correct |
4 ms |
25176 KB |
Output is correct |
23 |
Correct |
3 ms |
16984 KB |
Output is correct |
24 |
Correct |
4 ms |
14936 KB |
Output is correct |
25 |
Correct |
3 ms |
14936 KB |
Output is correct |
26 |
Correct |
5 ms |
25176 KB |
Output is correct |
27 |
Correct |
5 ms |
25432 KB |
Output is correct |
28 |
Correct |
5 ms |
25436 KB |
Output is correct |
29 |
Correct |
5 ms |
25432 KB |
Output is correct |
30 |
Correct |
6 ms |
25432 KB |
Output is correct |
31 |
Correct |
4 ms |
17240 KB |
Output is correct |
32 |
Correct |
4 ms |
15192 KB |
Output is correct |
33 |
Correct |
4 ms |
15192 KB |
Output is correct |
34 |
Correct |
4 ms |
25176 KB |
Output is correct |
35 |
Correct |
4 ms |
25176 KB |
Output is correct |
36 |
Correct |
4 ms |
25176 KB |
Output is correct |
37 |
Correct |
4 ms |
25176 KB |
Output is correct |
38 |
Correct |
4 ms |
25176 KB |
Output is correct |
39 |
Correct |
3 ms |
16984 KB |
Output is correct |
40 |
Correct |
4 ms |
25176 KB |
Output is correct |
41 |
Correct |
4 ms |
25176 KB |
Output is correct |
42 |
Correct |
4 ms |
25176 KB |
Output is correct |
43 |
Correct |
4 ms |
25176 KB |
Output is correct |
44 |
Correct |
3 ms |
16984 KB |
Output is correct |
45 |
Correct |
4 ms |
25176 KB |
Output is correct |
46 |
Correct |
4 ms |
25432 KB |
Output is correct |
47 |
Correct |
4 ms |
25180 KB |
Output is correct |
48 |
Correct |
4 ms |
25176 KB |
Output is correct |
49 |
Correct |
4 ms |
25180 KB |
Output is correct |
50 |
Correct |
4 ms |
25176 KB |
Output is correct |
51 |
Correct |
4 ms |
25176 KB |
Output is correct |
52 |
Correct |
4 ms |
25176 KB |
Output is correct |
53 |
Correct |
4 ms |
25176 KB |
Output is correct |
54 |
Correct |
4 ms |
25176 KB |
Output is correct |
55 |
Correct |
4 ms |
25176 KB |
Output is correct |
56 |
Correct |
4 ms |
25176 KB |
Output is correct |
57 |
Correct |
3 ms |
16984 KB |
Output is correct |
58 |
Correct |
4 ms |
25180 KB |
Output is correct |
59 |
Correct |
4 ms |
25176 KB |
Output is correct |
60 |
Correct |
3 ms |
16984 KB |
Output is correct |
61 |
Correct |
4 ms |
25176 KB |
Output is correct |
62 |
Correct |
4 ms |
25176 KB |
Output is correct |
63 |
Correct |
4 ms |
25176 KB |
Output is correct |
64 |
Correct |
5 ms |
25176 KB |
Output is correct |
65 |
Correct |
4 ms |
25176 KB |
Output is correct |
66 |
Correct |
4 ms |
25176 KB |
Output is correct |
67 |
Correct |
4 ms |
25180 KB |
Output is correct |
68 |
Correct |
6 ms |
25436 KB |
Output is correct |
69 |
Correct |
4 ms |
25180 KB |
Output is correct |
70 |
Correct |
4 ms |
25176 KB |
Output is correct |
71 |
Correct |
4 ms |
25176 KB |
Output is correct |
72 |
Correct |
4 ms |
25180 KB |
Output is correct |
73 |
Correct |
4 ms |
25180 KB |
Output is correct |
74 |
Correct |
4 ms |
25176 KB |
Output is correct |
75 |
Correct |
4 ms |
16984 KB |
Output is correct |
76 |
Correct |
4 ms |
25180 KB |
Output is correct |
77 |
Correct |
4 ms |
25176 KB |
Output is correct |
78 |
Correct |
3 ms |
16984 KB |
Output is correct |
79 |
Correct |
3 ms |
16988 KB |
Output is correct |
80 |
Correct |
5 ms |
25176 KB |
Output is correct |
81 |
Correct |
4 ms |
25176 KB |
Output is correct |
82 |
Correct |
5 ms |
25176 KB |
Output is correct |
83 |
Correct |
5 ms |
25176 KB |
Output is correct |
84 |
Correct |
5 ms |
25176 KB |
Output is correct |
85 |
Correct |
5 ms |
25176 KB |
Output is correct |
86 |
Correct |
5 ms |
25176 KB |
Output is correct |
87 |
Correct |
5 ms |
25180 KB |
Output is correct |
88 |
Correct |
5 ms |
25176 KB |
Output is correct |
89 |
Correct |
6 ms |
25436 KB |
Output is correct |
90 |
Correct |
6 ms |
25436 KB |
Output is correct |
91 |
Correct |
6 ms |
25436 KB |
Output is correct |
92 |
Correct |
6 ms |
25432 KB |
Output is correct |
93 |
Correct |
4 ms |
17240 KB |
Output is correct |
94 |
Correct |
5 ms |
25436 KB |
Output is correct |
95 |
Correct |
5 ms |
25432 KB |
Output is correct |
96 |
Correct |
5 ms |
17240 KB |
Output is correct |
97 |
Correct |
6 ms |
25432 KB |
Output is correct |
98 |
Correct |
6 ms |
25432 KB |
Output is correct |
99 |
Correct |
6 ms |
25436 KB |
Output is correct |
100 |
Correct |
5 ms |
25432 KB |
Output is correct |
101 |
Correct |
6 ms |
25176 KB |
Output is correct |
102 |
Correct |
85 ms |
27728 KB |
Output is correct |
103 |
Correct |
82 ms |
27472 KB |
Output is correct |
104 |
Correct |
183 ms |
57528 KB |
Output is correct |
105 |
Correct |
106 ms |
28992 KB |
Output is correct |
106 |
Correct |
123 ms |
28304 KB |
Output is correct |
107 |
Correct |
67 ms |
48700 KB |
Output is correct |
108 |
Correct |
67 ms |
48188 KB |
Output is correct |
109 |
Correct |
84 ms |
46548 KB |
Output is correct |
110 |
Correct |
185 ms |
51128 KB |
Output is correct |
111 |
Correct |
143 ms |
55784 KB |
Output is correct |
112 |
Correct |
164 ms |
50360 KB |
Output is correct |
113 |
Correct |
126 ms |
38072 KB |
Output is correct |
114 |
Correct |
156 ms |
48568 KB |
Output is correct |
115 |
Correct |
93 ms |
57792 KB |
Output is correct |
116 |
Correct |
171 ms |
54200 KB |
Output is correct |
117 |
Correct |
155 ms |
40632 KB |
Output is correct |
118 |
Correct |
177 ms |
51724 KB |
Output is correct |
119 |
Correct |
103 ms |
30288 KB |
Output is correct |
120 |
Correct |
89 ms |
27984 KB |
Output is correct |