Submission #1065418

# Submission time Handle Problem Language Result Execution time Memory
1065418 2024-08-19T07:23:29 Z becaido Closing Time (IOI23_closing) C++17
100 / 100
172 ms 40952 KB
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx,popcnt,sse4,abm")
#include <bits/stdc++.h>
using namespace std;

#ifndef WAIMAI
#include "closing.h"
#else
#include "grader.cpp"
#endif

#ifdef WAIMAI
#define debug(HEHE...) cout << "[" << #HEHE << "] : ", dout(HEHE)
void dout() {cout << '\n';}
template<typename T, typename...U>
void dout(T t, U...u) {cout << t << (sizeof...(u) ? ", " : ""), dout(u...);}
#else
#define debug(...) 7122
#endif

#define ll long long
#define Waimai ios::sync_with_stdio(false), cin.tie(0)
#define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
#define pb emplace_back
#define F first
#define S second

const ll INF = 2e18;
const int SIZE = 2e5 + 5;

int n, x, y, ans;
int id[SIZE], p[SIZE][2];
vector<pair<int, int>> adj[SIZE];
tuple<ll, int, bool> v[SIZE << 1];
ll k, dx[SIZE], dy[SIZE], a[SIZE], b[SIZE];

void build(int s, ll *dis) {
    fill(dis + 1, dis + n + 1, INF);
    queue<int> q;
    dis[s] = 0;
    q.push(s);
    while (q.size()) {
        int pos = q.front();
        q.pop();
        for (auto [np, w] : adj[pos]) if (dis[pos] + w < dis[np]) {
            dis[np] = dis[pos] + w;
            q.push(np);
        }
    }
}

int bit[SIZE << 1];
ll sum[SIZE << 1];
void upd(int pos, int x, ll y) {
    for (; pos <= 2 * n; pos += pos & -pos) {
        bit[pos] += x;
        sum[pos] += y;
    }
}
int sch(ll k) {
    int pos = 0, re = 0;
    for (int i = __lg(2 * n); i >= 0; i--) {
        int nxt = pos + (1 << i);
        if (nxt <= 2 * n && sum[nxt] <= k) {
            k -= sum[nxt];
            re += bit[nxt];
            pos = nxt;
        }
    }
    return re;
}

int max_score(int N, int X, int Y, ll K, vector<int> U, vector<int> V, vector<int> W) {
    n = N, x = X + 1, y = Y + 1, k = K;
    FOR (i, 1, n) adj[i].clear();
    FOR (i, 0, n - 2) {
        U[i]++, V[i]++;
        adj[U[i]].pb(V[i], W[i]);
        adj[V[i]].pb(U[i], W[i]);
    }
    build(x, dx), build(y, dy);
    FOR (i, 1, n) {
        a[i] = min(dx[i], dy[i]);
        b[i] = max(dx[i], dy[i]);
    }
    ans = 0;
    {
        priority_queue<ll, vector<ll>, greater<ll>> pq;
        FOR (i, 1, n) pq.push(a[i]);
        ll cur = 0;
        while (pq.size() && cur + pq.top() <= k) {
            cur += pq.top();
            pq.pop();
            ans++;
        }
    }
    int cnt = 0;
    ll cur = 0;
    fill(bit + 1, bit + 2 * n + 1, 0);
    fill(sum + 1, sum + 2 * n + 1, 0);
    FOR (i, 1, n) if (dx[i] + dy[i] == dx[y]) {
        cnt++;
        cur += a[i];
        a[i] = b[i] - a[i];
        b[i] = INF;
    }
    FOR (i, 1, n) {
        v[i] = {a[i], i, 0};
        v[n + i] = {b[i] - a[i], i, 1};
    }
    sort(v + 1, v + 2 * n + 1);
    FOR (i, 1, 2 * n) {
        auto [val, id, t] = v[i];
        p[id][t] = i;
    }
    FOR (i, 1, n) upd(p[i][0], 1, a[i]);
    if (cur <= k) ans = max(ans, cnt + sch(k - cur));
    iota(id + 1, id + n + 1, 1);
    sort(id + 1, id + n + 1, [&](int i, int j) {
        return b[i] < b[j];
    });
    FOR (i, 1, n) {
        upd(p[id[i]][0], -1, -a[id[i]]);
        if (dx[id[i]] + dy[id[i]] != dx[y]) upd(p[id[i]][1], 1, b[id[i]] - a[id[i]]);
        cnt++;
        cur += a[id[i]];
        if (cur <= k) ans = max(ans, cnt + sch(k - cur));
    }
    return ans;
}

/*
in1
2
7 0 2 10
0 1 2
0 3 3
1 2 4
2 4 2
2 5 5
5 6 3
4 0 3 20
0 1 18
1 2 1
2 3 19
out1
6
3
*/
# Verdict Execution time Memory Grader output
1 Correct 2 ms 16728 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 146 ms 36764 KB Output is correct
2 Correct 125 ms 36276 KB Output is correct
3 Correct 73 ms 19288 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 16732 KB Output is correct
2 Correct 2 ms 16844 KB Output is correct
3 Correct 2 ms 16840 KB Output is correct
4 Correct 3 ms 16728 KB Output is correct
5 Correct 2 ms 16728 KB Output is correct
6 Correct 2 ms 16732 KB Output is correct
7 Correct 2 ms 16732 KB Output is correct
8 Correct 3 ms 16732 KB Output is correct
9 Correct 2 ms 16732 KB Output is correct
10 Correct 2 ms 16732 KB Output is correct
11 Correct 2 ms 16732 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 16732 KB Output is correct
2 Correct 2 ms 16844 KB Output is correct
3 Correct 2 ms 16840 KB Output is correct
4 Correct 3 ms 16728 KB Output is correct
5 Correct 2 ms 16728 KB Output is correct
6 Correct 2 ms 16732 KB Output is correct
7 Correct 2 ms 16732 KB Output is correct
8 Correct 3 ms 16732 KB Output is correct
9 Correct 2 ms 16732 KB Output is correct
10 Correct 2 ms 16732 KB Output is correct
11 Correct 2 ms 16732 KB Output is correct
12 Correct 2 ms 16984 KB Output is correct
13 Correct 2 ms 16732 KB Output is correct
14 Correct 2 ms 16732 KB Output is correct
15 Correct 2 ms 16732 KB Output is correct
16 Correct 2 ms 16732 KB Output is correct
17 Correct 2 ms 16732 KB Output is correct
18 Correct 2 ms 16732 KB Output is correct
19 Correct 3 ms 16732 KB Output is correct
20 Correct 2 ms 16732 KB Output is correct
21 Correct 3 ms 16732 KB Output is correct
22 Correct 2 ms 16732 KB Output is correct
23 Correct 3 ms 16732 KB Output is correct
24 Correct 2 ms 16732 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 16732 KB Output is correct
2 Correct 2 ms 16844 KB Output is correct
3 Correct 2 ms 16840 KB Output is correct
4 Correct 3 ms 16728 KB Output is correct
5 Correct 2 ms 16728 KB Output is correct
6 Correct 2 ms 16732 KB Output is correct
7 Correct 2 ms 16732 KB Output is correct
8 Correct 3 ms 16732 KB Output is correct
9 Correct 2 ms 16732 KB Output is correct
10 Correct 2 ms 16732 KB Output is correct
11 Correct 2 ms 16732 KB Output is correct
12 Correct 2 ms 16984 KB Output is correct
13 Correct 2 ms 16732 KB Output is correct
14 Correct 2 ms 16732 KB Output is correct
15 Correct 2 ms 16732 KB Output is correct
16 Correct 2 ms 16732 KB Output is correct
17 Correct 2 ms 16732 KB Output is correct
18 Correct 2 ms 16732 KB Output is correct
19 Correct 3 ms 16732 KB Output is correct
20 Correct 2 ms 16732 KB Output is correct
21 Correct 3 ms 16732 KB Output is correct
22 Correct 2 ms 16732 KB Output is correct
23 Correct 3 ms 16732 KB Output is correct
24 Correct 2 ms 16732 KB Output is correct
25 Correct 4 ms 16732 KB Output is correct
26 Correct 4 ms 16988 KB Output is correct
27 Correct 3 ms 16988 KB Output is correct
28 Correct 4 ms 16988 KB Output is correct
29 Correct 4 ms 16988 KB Output is correct
30 Correct 3 ms 16988 KB Output is correct
31 Correct 4 ms 16984 KB Output is correct
32 Correct 4 ms 16984 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 16728 KB Output is correct
2 Correct 2 ms 16732 KB Output is correct
3 Correct 2 ms 16844 KB Output is correct
4 Correct 2 ms 16840 KB Output is correct
5 Correct 3 ms 16728 KB Output is correct
6 Correct 2 ms 16728 KB Output is correct
7 Correct 3 ms 16732 KB Output is correct
8 Correct 2 ms 16848 KB Output is correct
9 Correct 3 ms 16732 KB Output is correct
10 Correct 2 ms 16732 KB Output is correct
11 Correct 2 ms 16776 KB Output is correct
12 Correct 3 ms 16732 KB Output is correct
13 Correct 2 ms 16732 KB Output is correct
14 Correct 2 ms 16732 KB Output is correct
15 Correct 3 ms 16732 KB Output is correct
16 Correct 2 ms 16732 KB Output is correct
17 Correct 2 ms 16732 KB Output is correct
18 Correct 2 ms 16728 KB Output is correct
19 Correct 2 ms 16732 KB Output is correct
20 Correct 3 ms 16732 KB Output is correct
21 Correct 2 ms 16732 KB Output is correct
22 Correct 2 ms 16732 KB Output is correct
23 Correct 2 ms 16820 KB Output is correct
24 Correct 3 ms 16732 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 16728 KB Output is correct
2 Correct 2 ms 16732 KB Output is correct
3 Correct 2 ms 16844 KB Output is correct
4 Correct 2 ms 16840 KB Output is correct
5 Correct 3 ms 16728 KB Output is correct
6 Correct 2 ms 16728 KB Output is correct
7 Correct 2 ms 16732 KB Output is correct
8 Correct 2 ms 16732 KB Output is correct
9 Correct 3 ms 16732 KB Output is correct
10 Correct 2 ms 16732 KB Output is correct
11 Correct 2 ms 16732 KB Output is correct
12 Correct 2 ms 16732 KB Output is correct
13 Correct 2 ms 16984 KB Output is correct
14 Correct 2 ms 16732 KB Output is correct
15 Correct 2 ms 16732 KB Output is correct
16 Correct 2 ms 16732 KB Output is correct
17 Correct 2 ms 16732 KB Output is correct
18 Correct 2 ms 16732 KB Output is correct
19 Correct 3 ms 16732 KB Output is correct
20 Correct 2 ms 16848 KB Output is correct
21 Correct 3 ms 16732 KB Output is correct
22 Correct 2 ms 16732 KB Output is correct
23 Correct 2 ms 16776 KB Output is correct
24 Correct 3 ms 16732 KB Output is correct
25 Correct 2 ms 16732 KB Output is correct
26 Correct 2 ms 16732 KB Output is correct
27 Correct 3 ms 16732 KB Output is correct
28 Correct 2 ms 16732 KB Output is correct
29 Correct 2 ms 16732 KB Output is correct
30 Correct 2 ms 16728 KB Output is correct
31 Correct 2 ms 16732 KB Output is correct
32 Correct 3 ms 16732 KB Output is correct
33 Correct 2 ms 16732 KB Output is correct
34 Correct 2 ms 16732 KB Output is correct
35 Correct 2 ms 16820 KB Output is correct
36 Correct 3 ms 16732 KB Output is correct
37 Correct 2 ms 16732 KB Output is correct
38 Correct 2 ms 16732 KB Output is correct
39 Correct 2 ms 16732 KB Output is correct
40 Correct 2 ms 16732 KB Output is correct
41 Correct 2 ms 16732 KB Output is correct
42 Correct 2 ms 16732 KB Output is correct
43 Correct 2 ms 16728 KB Output is correct
44 Correct 2 ms 16732 KB Output is correct
45 Correct 2 ms 16732 KB Output is correct
46 Correct 3 ms 16732 KB Output is correct
47 Correct 3 ms 16732 KB Output is correct
48 Correct 2 ms 16732 KB Output is correct
49 Correct 2 ms 16732 KB Output is correct
50 Correct 2 ms 16732 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 16728 KB Output is correct
2 Correct 2 ms 16732 KB Output is correct
3 Correct 2 ms 16844 KB Output is correct
4 Correct 2 ms 16840 KB Output is correct
5 Correct 3 ms 16728 KB Output is correct
6 Correct 2 ms 16728 KB Output is correct
7 Correct 2 ms 16732 KB Output is correct
8 Correct 2 ms 16732 KB Output is correct
9 Correct 3 ms 16732 KB Output is correct
10 Correct 2 ms 16732 KB Output is correct
11 Correct 2 ms 16732 KB Output is correct
12 Correct 2 ms 16732 KB Output is correct
13 Correct 2 ms 16984 KB Output is correct
14 Correct 2 ms 16732 KB Output is correct
15 Correct 2 ms 16732 KB Output is correct
16 Correct 2 ms 16732 KB Output is correct
17 Correct 2 ms 16732 KB Output is correct
18 Correct 2 ms 16732 KB Output is correct
19 Correct 2 ms 16732 KB Output is correct
20 Correct 3 ms 16732 KB Output is correct
21 Correct 2 ms 16732 KB Output is correct
22 Correct 3 ms 16732 KB Output is correct
23 Correct 2 ms 16732 KB Output is correct
24 Correct 3 ms 16732 KB Output is correct
25 Correct 2 ms 16732 KB Output is correct
26 Correct 3 ms 16732 KB Output is correct
27 Correct 2 ms 16848 KB Output is correct
28 Correct 3 ms 16732 KB Output is correct
29 Correct 2 ms 16732 KB Output is correct
30 Correct 2 ms 16776 KB Output is correct
31 Correct 3 ms 16732 KB Output is correct
32 Correct 2 ms 16732 KB Output is correct
33 Correct 2 ms 16732 KB Output is correct
34 Correct 3 ms 16732 KB Output is correct
35 Correct 2 ms 16732 KB Output is correct
36 Correct 2 ms 16732 KB Output is correct
37 Correct 2 ms 16728 KB Output is correct
38 Correct 2 ms 16732 KB Output is correct
39 Correct 3 ms 16732 KB Output is correct
40 Correct 2 ms 16732 KB Output is correct
41 Correct 2 ms 16732 KB Output is correct
42 Correct 2 ms 16820 KB Output is correct
43 Correct 3 ms 16732 KB Output is correct
44 Correct 2 ms 16732 KB Output is correct
45 Correct 2 ms 16732 KB Output is correct
46 Correct 2 ms 16732 KB Output is correct
47 Correct 2 ms 16732 KB Output is correct
48 Correct 2 ms 16732 KB Output is correct
49 Correct 2 ms 16732 KB Output is correct
50 Correct 2 ms 16728 KB Output is correct
51 Correct 2 ms 16732 KB Output is correct
52 Correct 2 ms 16732 KB Output is correct
53 Correct 3 ms 16732 KB Output is correct
54 Correct 3 ms 16732 KB Output is correct
55 Correct 2 ms 16732 KB Output is correct
56 Correct 2 ms 16732 KB Output is correct
57 Correct 2 ms 16732 KB Output is correct
58 Correct 3 ms 16844 KB Output is correct
59 Correct 3 ms 16732 KB Output is correct
60 Correct 2 ms 16732 KB Output is correct
61 Correct 3 ms 16844 KB Output is correct
62 Correct 3 ms 16728 KB Output is correct
63 Correct 4 ms 16728 KB Output is correct
64 Correct 3 ms 16732 KB Output is correct
65 Correct 2 ms 16880 KB Output is correct
66 Correct 3 ms 16732 KB Output is correct
67 Correct 2 ms 16732 KB Output is correct
68 Correct 3 ms 16732 KB Output is correct
69 Correct 3 ms 16732 KB Output is correct
70 Correct 2 ms 16844 KB Output is correct
71 Correct 3 ms 16732 KB Output is correct
72 Correct 2 ms 16732 KB Output is correct
73 Correct 3 ms 16824 KB Output is correct
74 Correct 3 ms 16732 KB Output is correct
75 Correct 2 ms 16732 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 16728 KB Output is correct
2 Correct 2 ms 16732 KB Output is correct
3 Correct 2 ms 16844 KB Output is correct
4 Correct 2 ms 16840 KB Output is correct
5 Correct 3 ms 16728 KB Output is correct
6 Correct 2 ms 16728 KB Output is correct
7 Correct 2 ms 16732 KB Output is correct
8 Correct 2 ms 16732 KB Output is correct
9 Correct 3 ms 16732 KB Output is correct
10 Correct 2 ms 16732 KB Output is correct
11 Correct 2 ms 16732 KB Output is correct
12 Correct 2 ms 16732 KB Output is correct
13 Correct 2 ms 16984 KB Output is correct
14 Correct 2 ms 16732 KB Output is correct
15 Correct 2 ms 16732 KB Output is correct
16 Correct 2 ms 16732 KB Output is correct
17 Correct 2 ms 16732 KB Output is correct
18 Correct 2 ms 16732 KB Output is correct
19 Correct 2 ms 16732 KB Output is correct
20 Correct 3 ms 16732 KB Output is correct
21 Correct 2 ms 16732 KB Output is correct
22 Correct 3 ms 16732 KB Output is correct
23 Correct 2 ms 16732 KB Output is correct
24 Correct 3 ms 16732 KB Output is correct
25 Correct 2 ms 16732 KB Output is correct
26 Correct 4 ms 16732 KB Output is correct
27 Correct 4 ms 16988 KB Output is correct
28 Correct 3 ms 16988 KB Output is correct
29 Correct 4 ms 16988 KB Output is correct
30 Correct 4 ms 16988 KB Output is correct
31 Correct 3 ms 16988 KB Output is correct
32 Correct 4 ms 16984 KB Output is correct
33 Correct 4 ms 16984 KB Output is correct
34 Correct 3 ms 16732 KB Output is correct
35 Correct 2 ms 16848 KB Output is correct
36 Correct 3 ms 16732 KB Output is correct
37 Correct 2 ms 16732 KB Output is correct
38 Correct 2 ms 16776 KB Output is correct
39 Correct 3 ms 16732 KB Output is correct
40 Correct 2 ms 16732 KB Output is correct
41 Correct 2 ms 16732 KB Output is correct
42 Correct 3 ms 16732 KB Output is correct
43 Correct 2 ms 16732 KB Output is correct
44 Correct 2 ms 16732 KB Output is correct
45 Correct 2 ms 16728 KB Output is correct
46 Correct 2 ms 16732 KB Output is correct
47 Correct 3 ms 16732 KB Output is correct
48 Correct 2 ms 16732 KB Output is correct
49 Correct 2 ms 16732 KB Output is correct
50 Correct 2 ms 16820 KB Output is correct
51 Correct 3 ms 16732 KB Output is correct
52 Correct 2 ms 16732 KB Output is correct
53 Correct 2 ms 16732 KB Output is correct
54 Correct 2 ms 16732 KB Output is correct
55 Correct 2 ms 16732 KB Output is correct
56 Correct 2 ms 16732 KB Output is correct
57 Correct 2 ms 16732 KB Output is correct
58 Correct 2 ms 16728 KB Output is correct
59 Correct 2 ms 16732 KB Output is correct
60 Correct 2 ms 16732 KB Output is correct
61 Correct 3 ms 16732 KB Output is correct
62 Correct 3 ms 16732 KB Output is correct
63 Correct 2 ms 16732 KB Output is correct
64 Correct 2 ms 16732 KB Output is correct
65 Correct 2 ms 16732 KB Output is correct
66 Correct 3 ms 16844 KB Output is correct
67 Correct 3 ms 16732 KB Output is correct
68 Correct 2 ms 16732 KB Output is correct
69 Correct 3 ms 16844 KB Output is correct
70 Correct 3 ms 16728 KB Output is correct
71 Correct 4 ms 16728 KB Output is correct
72 Correct 3 ms 16732 KB Output is correct
73 Correct 2 ms 16880 KB Output is correct
74 Correct 3 ms 16732 KB Output is correct
75 Correct 2 ms 16732 KB Output is correct
76 Correct 3 ms 16732 KB Output is correct
77 Correct 3 ms 16732 KB Output is correct
78 Correct 2 ms 16844 KB Output is correct
79 Correct 3 ms 16732 KB Output is correct
80 Correct 2 ms 16732 KB Output is correct
81 Correct 3 ms 16824 KB Output is correct
82 Correct 3 ms 16732 KB Output is correct
83 Correct 2 ms 16732 KB Output is correct
84 Correct 4 ms 16728 KB Output is correct
85 Correct 3 ms 16732 KB Output is correct
86 Correct 3 ms 16932 KB Output is correct
87 Correct 4 ms 16732 KB Output is correct
88 Correct 4 ms 16988 KB Output is correct
89 Correct 4 ms 16988 KB Output is correct
90 Correct 4 ms 16988 KB Output is correct
91 Correct 4 ms 16988 KB Output is correct
92 Correct 4 ms 16988 KB Output is correct
93 Correct 4 ms 16988 KB Output is correct
94 Correct 4 ms 17160 KB Output is correct
95 Correct 4 ms 16988 KB Output is correct
96 Correct 4 ms 16984 KB Output is correct
97 Correct 4 ms 16988 KB Output is correct
98 Correct 4 ms 16988 KB Output is correct
99 Correct 4 ms 16984 KB Output is correct
100 Correct 3 ms 16988 KB Output is correct
101 Correct 4 ms 16988 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 16728 KB Output is correct
2 Correct 2 ms 16732 KB Output is correct
3 Correct 2 ms 16844 KB Output is correct
4 Correct 2 ms 16840 KB Output is correct
5 Correct 3 ms 16728 KB Output is correct
6 Correct 2 ms 16728 KB Output is correct
7 Correct 2 ms 16732 KB Output is correct
8 Correct 2 ms 16732 KB Output is correct
9 Correct 3 ms 16732 KB Output is correct
10 Correct 2 ms 16732 KB Output is correct
11 Correct 2 ms 16732 KB Output is correct
12 Correct 2 ms 16732 KB Output is correct
13 Correct 2 ms 16984 KB Output is correct
14 Correct 2 ms 16732 KB Output is correct
15 Correct 2 ms 16732 KB Output is correct
16 Correct 2 ms 16732 KB Output is correct
17 Correct 2 ms 16732 KB Output is correct
18 Correct 2 ms 16732 KB Output is correct
19 Correct 2 ms 16732 KB Output is correct
20 Correct 3 ms 16732 KB Output is correct
21 Correct 2 ms 16732 KB Output is correct
22 Correct 3 ms 16732 KB Output is correct
23 Correct 2 ms 16732 KB Output is correct
24 Correct 3 ms 16732 KB Output is correct
25 Correct 2 ms 16732 KB Output is correct
26 Correct 4 ms 16732 KB Output is correct
27 Correct 4 ms 16988 KB Output is correct
28 Correct 3 ms 16988 KB Output is correct
29 Correct 4 ms 16988 KB Output is correct
30 Correct 4 ms 16988 KB Output is correct
31 Correct 3 ms 16988 KB Output is correct
32 Correct 4 ms 16984 KB Output is correct
33 Correct 4 ms 16984 KB Output is correct
34 Correct 3 ms 16732 KB Output is correct
35 Correct 2 ms 16848 KB Output is correct
36 Correct 3 ms 16732 KB Output is correct
37 Correct 2 ms 16732 KB Output is correct
38 Correct 2 ms 16776 KB Output is correct
39 Correct 3 ms 16732 KB Output is correct
40 Correct 2 ms 16732 KB Output is correct
41 Correct 2 ms 16732 KB Output is correct
42 Correct 3 ms 16732 KB Output is correct
43 Correct 2 ms 16732 KB Output is correct
44 Correct 2 ms 16732 KB Output is correct
45 Correct 2 ms 16728 KB Output is correct
46 Correct 2 ms 16732 KB Output is correct
47 Correct 3 ms 16732 KB Output is correct
48 Correct 2 ms 16732 KB Output is correct
49 Correct 2 ms 16732 KB Output is correct
50 Correct 2 ms 16820 KB Output is correct
51 Correct 3 ms 16732 KB Output is correct
52 Correct 2 ms 16732 KB Output is correct
53 Correct 2 ms 16732 KB Output is correct
54 Correct 2 ms 16732 KB Output is correct
55 Correct 2 ms 16732 KB Output is correct
56 Correct 2 ms 16732 KB Output is correct
57 Correct 2 ms 16732 KB Output is correct
58 Correct 2 ms 16728 KB Output is correct
59 Correct 2 ms 16732 KB Output is correct
60 Correct 2 ms 16732 KB Output is correct
61 Correct 3 ms 16732 KB Output is correct
62 Correct 3 ms 16732 KB Output is correct
63 Correct 2 ms 16732 KB Output is correct
64 Correct 2 ms 16732 KB Output is correct
65 Correct 2 ms 16732 KB Output is correct
66 Correct 3 ms 16844 KB Output is correct
67 Correct 3 ms 16732 KB Output is correct
68 Correct 2 ms 16732 KB Output is correct
69 Correct 3 ms 16844 KB Output is correct
70 Correct 3 ms 16728 KB Output is correct
71 Correct 4 ms 16728 KB Output is correct
72 Correct 3 ms 16732 KB Output is correct
73 Correct 2 ms 16880 KB Output is correct
74 Correct 3 ms 16732 KB Output is correct
75 Correct 2 ms 16732 KB Output is correct
76 Correct 3 ms 16732 KB Output is correct
77 Correct 3 ms 16732 KB Output is correct
78 Correct 2 ms 16844 KB Output is correct
79 Correct 3 ms 16732 KB Output is correct
80 Correct 2 ms 16732 KB Output is correct
81 Correct 3 ms 16824 KB Output is correct
82 Correct 3 ms 16732 KB Output is correct
83 Correct 2 ms 16732 KB Output is correct
84 Correct 4 ms 16728 KB Output is correct
85 Correct 3 ms 16732 KB Output is correct
86 Correct 3 ms 16932 KB Output is correct
87 Correct 4 ms 16732 KB Output is correct
88 Correct 4 ms 16988 KB Output is correct
89 Correct 4 ms 16988 KB Output is correct
90 Correct 4 ms 16988 KB Output is correct
91 Correct 4 ms 16988 KB Output is correct
92 Correct 4 ms 16988 KB Output is correct
93 Correct 4 ms 16988 KB Output is correct
94 Correct 4 ms 17160 KB Output is correct
95 Correct 4 ms 16988 KB Output is correct
96 Correct 4 ms 16984 KB Output is correct
97 Correct 4 ms 16988 KB Output is correct
98 Correct 4 ms 16988 KB Output is correct
99 Correct 4 ms 16984 KB Output is correct
100 Correct 3 ms 16988 KB Output is correct
101 Correct 4 ms 16988 KB Output is correct
102 Correct 86 ms 21840 KB Output is correct
103 Correct 84 ms 22088 KB Output is correct
104 Correct 160 ms 40608 KB Output is correct
105 Correct 99 ms 22780 KB Output is correct
106 Correct 108 ms 22928 KB Output is correct
107 Correct 88 ms 38424 KB Output is correct
108 Correct 91 ms 39056 KB Output is correct
109 Correct 75 ms 37896 KB Output is correct
110 Correct 167 ms 40864 KB Output is correct
111 Correct 113 ms 38748 KB Output is correct
112 Correct 139 ms 40132 KB Output is correct
113 Correct 141 ms 39696 KB Output is correct
114 Correct 140 ms 40136 KB Output is correct
115 Correct 103 ms 38168 KB Output is correct
116 Correct 147 ms 40260 KB Output is correct
117 Correct 153 ms 39668 KB Output is correct
118 Correct 172 ms 40952 KB Output is correct
119 Correct 110 ms 26792 KB Output is correct
120 Correct 79 ms 21548 KB Output is correct