Submission #999542

# Submission time Handle Problem Language Result Execution time Memory
999542 2024-06-15T17:58:00 Z mdn2002 Closing Time (IOI23_closing) C++17
100 / 100
384 ms 80640 KB
/*
Mayoeba Yabureru
*/
#include<bits/stdc++.h>
using namespace std;

int max_score(int n, int x, int y, long long k, vector<int> U, vector<int> V, vector<int> W) {
    x ++, y ++;
    vector dis(n + 1, vector<long long>(2));
    vector<vector<pair<int, long long>>> gr(n + 1);

    for (int i = 0; i < n - 1; i ++) {
        int u = U[i] + 1, v = V[i] + 1, w = W[i];
        gr[u].push_back({v, w});
        gr[v].push_back({u, w});
    }

    function<void(int, int, int)> dfs = [&] (int v, int p, int wt) {
        for (auto [u, w] : gr[v]) {
            if (u == p) continue;
            dis[u][wt] = dis[v][wt] + w;
            dfs(u, v, wt);
        }
    };
    dfs(x, 0, 0), dfs(y, 0, 1);

    vector<int> vc, path, onpath(n + 1);
    function<void(int, int)> go = [&] (int v, int p) {
        vc.push_back(v);
        if (v == y) path = vc;
        for (auto [u, w] : gr[v]) {
            if (u == p) continue;
            go(u, v);
        }
        vc.pop_back();
    };
    go(x, 0);

    int ans = 0;
    function f = [&] {
        vector<int> did(n + 1);
        multiset<pair<long long, int>> s;
        for (int i = 1; i <= n; i ++) {
            s.insert({dis[i][0], i});
            s.insert({dis[i][1], i});
        }
        int cnt = 0;
        vector<int> v;

        while (s.size()) {
            auto [x, y] = *s.begin();
            s.erase(s.begin());
            if (did[y]) continue;
            if (x > k) break;
            k -= x;
            did[y] = 1;
            cnt ++;
        }
        if (k >= 0) return cnt;
        return -100000000;
    };

    long long kk = k;
    ans = f();
    k = kk;

    int cnt = 0;
    vector cost (n + 1, vector<long long> (2));
    for (int i = 1; i <= n; i ++) {
        cost[i][0] = min(dis[i][0], dis[i][1]);
        cost[i][1] = max(dis[i][0], dis[i][1]) - cost[i][0];
    }

    for (auto x : path) {
        k -= cost[x][0];
        cnt ++;
        onpath[x] = 1;
    }
    if (k < 0) return ans;

    set<pair<long long, int>> s, ss;
    for (int i = 1; i <= n; i ++) {
        if (onpath[i]) s.insert({cost[i][1], i});
        else {
            if (cost[i][0] > cost[i][1]) ss.insert({cost[i][0] + cost[i][1], i});
            else s.insert({cost[i][0], i});
        }
    }

    while (s.size()) {
        if (ss.size() == 0) {
            auto [a, x] = *s.begin();
            s.erase(s.begin());
            if (a > k) break;
            k -= a;
            cnt ++;
            onpath[x] ++;
            if (onpath[x] == 1) s.insert({cost[x][1], x});
        }
        else {
            long long mn = 1e17;
            auto [a, x] = *ss.begin();
            auto [b, y] = *s.begin();

            if (s.size() != 1) {
                auto [c, z] = * ++s.begin();
                mn = min(mn, b + c);
            }

            if (onpath[y] == 0) mn = min(mn, dis[y][0] + dis[y][1]);

            if (mn <= a || a > k) {
                s.erase(s.begin());
                if (b > k) break;
                k -= b;
                cnt ++;
                onpath[y] ++;
                if (onpath[y] == 1) s.insert({cost[y][1], y});
            }
            else {
                ss.erase(ss.begin());
                if (a > k) break;
                k -= a;
                cnt += 2;
            }
        }
    }

    multiset<pair<long long, int>> mss;
    while (ss.size()) {
        auto [a, x] = *ss.begin();
        ss.erase(ss.begin());
        mss.insert({cost[x][0], x});
    }

    while (mss.size()) {
        auto [a, x] = *mss.begin();
        mss.erase(mss.begin());
        if (a > k) break;
        k -= a;
        cnt ++;
    }
    return max(cnt, ans);
}
/*
1
7 0 2 10
0 1 2
0 3 3
1 2 4
2 4 2
2 5 5
5 6 3

*/
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 295 ms 68676 KB Output is correct
2 Correct 289 ms 77900 KB Output is correct
3 Correct 115 ms 5432 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 344 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 1 ms 348 KB Output is correct
17 Correct 0 ms 344 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 1 ms 440 KB Output is correct
20 Correct 1 ms 604 KB Output is correct
21 Correct 1 ms 604 KB Output is correct
22 Correct 1 ms 600 KB Output is correct
23 Correct 1 ms 604 KB Output is correct
24 Correct 1 ms 600 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 344 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 1 ms 348 KB Output is correct
17 Correct 0 ms 344 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 1 ms 440 KB Output is correct
20 Correct 1 ms 604 KB Output is correct
21 Correct 1 ms 604 KB Output is correct
22 Correct 1 ms 600 KB Output is correct
23 Correct 1 ms 604 KB Output is correct
24 Correct 1 ms 600 KB Output is correct
25 Correct 2 ms 348 KB Output is correct
26 Correct 2 ms 1372 KB Output is correct
27 Correct 2 ms 1372 KB Output is correct
28 Correct 3 ms 1372 KB Output is correct
29 Correct 3 ms 1372 KB Output is correct
30 Correct 2 ms 1372 KB Output is correct
31 Correct 2 ms 1628 KB Output is correct
32 Correct 2 ms 1628 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 1 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 344 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 1 ms 792 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 1 ms 348 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 1 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 344 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 1 ms 792 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 344 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 1 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 456 KB Output is correct
43 Correct 0 ms 348 KB Output is correct
44 Correct 0 ms 348 KB Output is correct
45 Correct 0 ms 348 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 0 ms 344 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 1 ms 348 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 1 ms 348 KB Output is correct
20 Correct 1 ms 440 KB Output is correct
21 Correct 1 ms 604 KB Output is correct
22 Correct 1 ms 604 KB Output is correct
23 Correct 1 ms 600 KB Output is correct
24 Correct 1 ms 604 KB Output is correct
25 Correct 1 ms 600 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 1 ms 348 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 344 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 1 ms 792 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 0 ms 348 KB Output is correct
44 Correct 0 ms 344 KB Output is correct
45 Correct 0 ms 348 KB Output is correct
46 Correct 1 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 0 ms 348 KB Output is correct
49 Correct 0 ms 456 KB Output is correct
50 Correct 0 ms 348 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 0 ms 344 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 1 ms 348 KB Output is correct
59 Correct 1 ms 344 KB Output is correct
60 Correct 1 ms 348 KB Output is correct
61 Correct 1 ms 348 KB Output is correct
62 Correct 1 ms 348 KB Output is correct
63 Correct 1 ms 348 KB Output is correct
64 Correct 1 ms 348 KB Output is correct
65 Correct 1 ms 348 KB Output is correct
66 Correct 1 ms 348 KB Output is correct
67 Correct 1 ms 348 KB Output is correct
68 Correct 1 ms 604 KB Output is correct
69 Correct 1 ms 604 KB Output is correct
70 Correct 1 ms 348 KB Output is correct
71 Correct 1 ms 504 KB Output is correct
72 Correct 1 ms 344 KB Output is correct
73 Correct 1 ms 348 KB Output is correct
74 Correct 1 ms 348 KB Output is correct
75 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 1 ms 348 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 1 ms 348 KB Output is correct
20 Correct 1 ms 440 KB Output is correct
21 Correct 1 ms 604 KB Output is correct
22 Correct 1 ms 604 KB Output is correct
23 Correct 1 ms 600 KB Output is correct
24 Correct 1 ms 604 KB Output is correct
25 Correct 1 ms 600 KB Output is correct
26 Correct 2 ms 348 KB Output is correct
27 Correct 2 ms 1372 KB Output is correct
28 Correct 2 ms 1372 KB Output is correct
29 Correct 3 ms 1372 KB Output is correct
30 Correct 3 ms 1372 KB Output is correct
31 Correct 2 ms 1372 KB Output is correct
32 Correct 2 ms 1628 KB Output is correct
33 Correct 2 ms 1628 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 1 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 344 KB Output is correct
43 Correct 0 ms 348 KB Output is correct
44 Correct 0 ms 348 KB Output is correct
45 Correct 0 ms 348 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 1 ms 792 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 0 ms 348 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 344 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 1 ms 348 KB Output is correct
55 Correct 0 ms 348 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 0 ms 456 KB Output is correct
58 Correct 0 ms 348 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 348 KB Output is correct
62 Correct 0 ms 348 KB Output is correct
63 Correct 0 ms 344 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 0 ms 348 KB Output is correct
66 Correct 1 ms 348 KB Output is correct
67 Correct 1 ms 344 KB Output is correct
68 Correct 1 ms 348 KB Output is correct
69 Correct 1 ms 348 KB Output is correct
70 Correct 1 ms 348 KB Output is correct
71 Correct 1 ms 348 KB Output is correct
72 Correct 1 ms 348 KB Output is correct
73 Correct 1 ms 348 KB Output is correct
74 Correct 1 ms 348 KB Output is correct
75 Correct 1 ms 348 KB Output is correct
76 Correct 1 ms 604 KB Output is correct
77 Correct 1 ms 604 KB Output is correct
78 Correct 1 ms 348 KB Output is correct
79 Correct 1 ms 504 KB Output is correct
80 Correct 1 ms 344 KB Output is correct
81 Correct 1 ms 348 KB Output is correct
82 Correct 1 ms 348 KB Output is correct
83 Correct 1 ms 348 KB Output is correct
84 Correct 3 ms 604 KB Output is correct
85 Correct 3 ms 344 KB Output is correct
86 Correct 3 ms 348 KB Output is correct
87 Correct 3 ms 348 KB Output is correct
88 Correct 3 ms 348 KB Output is correct
89 Correct 3 ms 1116 KB Output is correct
90 Correct 3 ms 1116 KB Output is correct
91 Correct 3 ms 1116 KB Output is correct
92 Correct 3 ms 1172 KB Output is correct
93 Correct 3 ms 1272 KB Output is correct
94 Correct 2 ms 1372 KB Output is correct
95 Correct 3 ms 1372 KB Output is correct
96 Correct 2 ms 1364 KB Output is correct
97 Correct 3 ms 1372 KB Output is correct
98 Correct 3 ms 1116 KB Output is correct
99 Correct 3 ms 1124 KB Output is correct
100 Correct 3 ms 924 KB Output is correct
101 Correct 3 ms 604 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 1 ms 348 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 1 ms 348 KB Output is correct
20 Correct 1 ms 440 KB Output is correct
21 Correct 1 ms 604 KB Output is correct
22 Correct 1 ms 604 KB Output is correct
23 Correct 1 ms 600 KB Output is correct
24 Correct 1 ms 604 KB Output is correct
25 Correct 1 ms 600 KB Output is correct
26 Correct 2 ms 348 KB Output is correct
27 Correct 2 ms 1372 KB Output is correct
28 Correct 2 ms 1372 KB Output is correct
29 Correct 3 ms 1372 KB Output is correct
30 Correct 3 ms 1372 KB Output is correct
31 Correct 2 ms 1372 KB Output is correct
32 Correct 2 ms 1628 KB Output is correct
33 Correct 2 ms 1628 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 1 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 344 KB Output is correct
43 Correct 0 ms 348 KB Output is correct
44 Correct 0 ms 348 KB Output is correct
45 Correct 0 ms 348 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 1 ms 792 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 0 ms 348 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 344 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 1 ms 348 KB Output is correct
55 Correct 0 ms 348 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 0 ms 456 KB Output is correct
58 Correct 0 ms 348 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 348 KB Output is correct
62 Correct 0 ms 348 KB Output is correct
63 Correct 0 ms 344 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 0 ms 348 KB Output is correct
66 Correct 1 ms 348 KB Output is correct
67 Correct 1 ms 344 KB Output is correct
68 Correct 1 ms 348 KB Output is correct
69 Correct 1 ms 348 KB Output is correct
70 Correct 1 ms 348 KB Output is correct
71 Correct 1 ms 348 KB Output is correct
72 Correct 1 ms 348 KB Output is correct
73 Correct 1 ms 348 KB Output is correct
74 Correct 1 ms 348 KB Output is correct
75 Correct 1 ms 348 KB Output is correct
76 Correct 1 ms 604 KB Output is correct
77 Correct 1 ms 604 KB Output is correct
78 Correct 1 ms 348 KB Output is correct
79 Correct 1 ms 504 KB Output is correct
80 Correct 1 ms 344 KB Output is correct
81 Correct 1 ms 348 KB Output is correct
82 Correct 1 ms 348 KB Output is correct
83 Correct 1 ms 348 KB Output is correct
84 Correct 3 ms 604 KB Output is correct
85 Correct 3 ms 344 KB Output is correct
86 Correct 3 ms 348 KB Output is correct
87 Correct 3 ms 348 KB Output is correct
88 Correct 3 ms 348 KB Output is correct
89 Correct 3 ms 1116 KB Output is correct
90 Correct 3 ms 1116 KB Output is correct
91 Correct 3 ms 1116 KB Output is correct
92 Correct 3 ms 1172 KB Output is correct
93 Correct 3 ms 1272 KB Output is correct
94 Correct 2 ms 1372 KB Output is correct
95 Correct 3 ms 1372 KB Output is correct
96 Correct 2 ms 1364 KB Output is correct
97 Correct 3 ms 1372 KB Output is correct
98 Correct 3 ms 1116 KB Output is correct
99 Correct 3 ms 1124 KB Output is correct
100 Correct 3 ms 924 KB Output is correct
101 Correct 3 ms 604 KB Output is correct
102 Correct 149 ms 5496 KB Output is correct
103 Correct 143 ms 5716 KB Output is correct
104 Correct 375 ms 73420 KB Output is correct
105 Correct 195 ms 7840 KB Output is correct
106 Correct 177 ms 7552 KB Output is correct
107 Correct 188 ms 54048 KB Output is correct
108 Correct 203 ms 56504 KB Output is correct
109 Correct 152 ms 76796 KB Output is correct
110 Correct 346 ms 61952 KB Output is correct
111 Correct 186 ms 69588 KB Output is correct
112 Correct 365 ms 60696 KB Output is correct
113 Correct 262 ms 58840 KB Output is correct
114 Correct 369 ms 60440 KB Output is correct
115 Correct 191 ms 80640 KB Output is correct
116 Correct 358 ms 64380 KB Output is correct
117 Correct 291 ms 67536 KB Output is correct
118 Correct 384 ms 61424 KB Output is correct
119 Correct 201 ms 12480 KB Output is correct
120 Correct 144 ms 4948 KB Output is correct