Submission #1086108

# Submission time Handle Problem Language Result Execution time Memory
1086108 2024-09-09T14:56:55 Z Ibrohim0704 Closing Time (IOI23_closing) C++17
100 / 100
366 ms 57076 KB
#include "closing.h"
#include<bits/stdc++.h>
using namespace std;
#define int long long int
vector<pair<int, int>> adj[200005];
int32_t solve1234(int32_t n, int32_t X, int32_t Y, int k) {
    int ans = 0;
    vector<int> vis(n, 0), distx(n, -1), disty(n, -1);
    set<tuple<int, int, int>> pq; // let 0 be x, 1 be y
    distx[X] = 0;
    disty[Y] = 0;
    pq.insert({0, X, 0});
    pq.insert({0, Y, 1});
    while(!pq.empty()) {
        auto [d, a, ind] = *pq.begin();
        pq.erase(*pq.begin());
        if (vis[a] == 0 && distx[a] != -1 && disty[a] != -1) {
            if (ind == 0) {
                if (pq.count({disty[a], a, 1})) {
                    pq.erase({disty[a], a, 1});
                    pq.insert({disty[a]-distx[a], a, 1});
                }
            } else {
                if (pq.count({distx[a], a, 0})) {
                    pq.erase({distx[a], a, 0});
                    pq.insert({distx[a]-disty[a], a, 0});
                }
            }
        }
        vis[a] = d;
        if (k < d) {
            break;
        } else {
            k -= d;
            ans++;
        }
        if (ind == 0) {
            for (auto [b, w] : adj[a]) {
                if (distx[b] != -1) {
                    continue;
                }
                distx[b] = distx[a]+w;
                if (vis[b] >= distx[b]) {
                    pq.insert({0, b, 0});
                } else {
                    pq.insert({(distx[b]-vis[b]), b, 0});
                }
            }
        } else {
            for (auto [b, w] : adj[a]) {
                if (disty[b] != -1) {
                    continue;
                }
                disty[b] = disty[a]+w;
                if (vis[b] >= disty[b]) {
                    pq.insert({0, b, 1});
                } else {
                    pq.insert({(disty[b]-vis[b]), b, 1});
                }
            }
        }
    }
    return ans;
}
int32_t max_score(int32_t n, int32_t X, int32_t Y, int k, vector<int32_t> U, vector<int32_t> V, vector<int32_t> W) {
    int ans = 0, temp = 0;
    vector<int> vis(n, 0), distx(n, -1), disty(n, -1), csing(n, 0), cmult(n, 0);
    for (int i = 0; i < n; i++) {
        adj[i].clear();
    }
    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]});
    }
    temp = solve1234(n, X, Y, k); // subtask 1, 2, 3, 4, it works
    multiset<pair<int, int>> pq, pqex, pqf; // for normal, for disgusting cases, for last check 
    distx[X] = 0;
    disty[Y] = 0;
    queue<int> q;
    q.push(X);
    while(!q.empty()) {
        int a = q.front();
        q.pop();
        for (auto [b, w] : adj[a]) {
            if (distx[b] == -1) {
                distx[b] = distx[a]+w;
                q.push(b);
            }
        }
    }
    q.push(Y);
    while(!q.empty()) {
        int a = q.front();
        q.pop();
        for (auto [b, w] : adj[a]) {
            if (disty[b] == -1) {
                disty[b] = disty[a]+w;
                q.push(b);
            }
        }
    }
    for (int i = 0; i < n; i++) {
        csing[i] = min(distx[i], disty[i]); // x take or y take
        cmult[i] = max(distx[i], disty[i])-csing[i]; // both take
    }
    // best is to take all on path except not but that is checked by my 1st attempt
    for (int i = 0; i < n; i++) {
        if (distx[i]+disty[i] == distx[Y]) {
            k -= csing[i];
            ans++;
            pq.insert({cmult[i], i});
        }
    }
    if (k <= 0) {
        return temp;
    }
    for (int i = 0; i < n; i++) {
        if (distx[i]+disty[i] == distx[Y]) {
            continue;
        }
        if (csing[i] > cmult[i]) {
            pqex.insert({csing[i]+cmult[i], i});
            pqf.insert({csing[i], i});
        } else {
            pq.insert({csing[i], i});
            pq.insert({cmult[i], i});
        }
    }
    while(pq.size() > 1 && !pqex.empty()) {
        auto [c, i3] = *pqex.begin();
        pqex.erase(pqex.begin());
        auto [a, i1] = *pq.begin();
        pq.erase(pq.begin());
        auto [b, i2] = *pq.begin();
        pq.erase(pq.begin());
        if (c > k) {
            pq.insert({a, i1});
            pq.insert({b, i2});
            pqex.insert({c, i3});
            break;
        }
        if (a+b < c) {
            k -= a;
            ans++;
            pq.insert({b, i2});
            pqex.insert({c, i3});
        } else {
            k -= c;
            vis[i3] = 1;
            ans += 2;
            pq.insert({a, i1});
            pq.insert({b, i2});
        }
    }
    while(!pqex.empty()) {
        auto [a, i1] = *pqex.begin();
        pqex.erase(pqex.begin());
        if (a > k) {
            break;
        } else {
            k -= a;
            vis[i1] = 1;
            ans += 2;
        }
    }
    while(!pq.empty()) {
        auto [a, i1] = *pq.begin();
        pq.erase(pq.begin());
        if (a > k) {
            break;
        } else {
            k -= a;
            ans++;
        }
    }
    while(!pqf.empty()) {
        auto [a, i1] = *pqf.begin();
        pqf.erase(pqf.begin());
        if (vis[i1]) {
            continue;
        }
        if (a > k) {
            break;
        } else {
            k -= a;
            ans++;
        }
    }
    return max(temp, ans);
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4956 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 170 ms 36148 KB Output is correct
2 Correct 155 ms 40772 KB Output is correct
3 Correct 58 ms 10120 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 4956 KB Output is correct
2 Correct 4 ms 4952 KB Output is correct
3 Correct 2 ms 4956 KB Output is correct
4 Correct 1 ms 4952 KB Output is correct
5 Correct 2 ms 4956 KB Output is correct
6 Correct 3 ms 4956 KB Output is correct
7 Correct 2 ms 4956 KB Output is correct
8 Correct 2 ms 4952 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 4952 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 4956 KB Output is correct
2 Correct 4 ms 4952 KB Output is correct
3 Correct 2 ms 4956 KB Output is correct
4 Correct 1 ms 4952 KB Output is correct
5 Correct 2 ms 4956 KB Output is correct
6 Correct 3 ms 4956 KB Output is correct
7 Correct 2 ms 4956 KB Output is correct
8 Correct 2 ms 4952 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 4952 KB Output is correct
12 Correct 1 ms 4956 KB Output is correct
13 Correct 2 ms 4956 KB Output is correct
14 Correct 2 ms 5140 KB Output is correct
15 Correct 1 ms 4956 KB Output is correct
16 Correct 2 ms 4988 KB Output is correct
17 Correct 2 ms 4956 KB Output is correct
18 Correct 3 ms 5140 KB Output is correct
19 Correct 2 ms 5212 KB Output is correct
20 Correct 2 ms 5212 KB Output is correct
21 Correct 2 ms 5208 KB Output is correct
22 Correct 2 ms 4956 KB Output is correct
23 Correct 2 ms 5144 KB Output is correct
24 Correct 2 ms 5212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 4956 KB Output is correct
2 Correct 4 ms 4952 KB Output is correct
3 Correct 2 ms 4956 KB Output is correct
4 Correct 1 ms 4952 KB Output is correct
5 Correct 2 ms 4956 KB Output is correct
6 Correct 3 ms 4956 KB Output is correct
7 Correct 2 ms 4956 KB Output is correct
8 Correct 2 ms 4952 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 4952 KB Output is correct
12 Correct 1 ms 4956 KB Output is correct
13 Correct 2 ms 4956 KB Output is correct
14 Correct 2 ms 5140 KB Output is correct
15 Correct 1 ms 4956 KB Output is correct
16 Correct 2 ms 4988 KB Output is correct
17 Correct 2 ms 4956 KB Output is correct
18 Correct 3 ms 5140 KB Output is correct
19 Correct 2 ms 5212 KB Output is correct
20 Correct 2 ms 5212 KB Output is correct
21 Correct 2 ms 5208 KB Output is correct
22 Correct 2 ms 4956 KB Output is correct
23 Correct 2 ms 5144 KB Output is correct
24 Correct 2 ms 5212 KB Output is correct
25 Correct 3 ms 5212 KB Output is correct
26 Correct 7 ms 5724 KB Output is correct
27 Correct 3 ms 5656 KB Output is correct
28 Correct 4 ms 5468 KB Output is correct
29 Correct 3 ms 5724 KB Output is correct
30 Correct 2 ms 5464 KB Output is correct
31 Correct 4 ms 5656 KB Output is correct
32 Correct 5 ms 5468 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4956 KB Output is correct
2 Correct 2 ms 4956 KB Output is correct
3 Correct 4 ms 4952 KB Output is correct
4 Correct 2 ms 4956 KB Output is correct
5 Correct 1 ms 4952 KB Output is correct
6 Correct 2 ms 4956 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 4952 KB Output is correct
11 Correct 2 ms 4956 KB Output is correct
12 Correct 3 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 4956 KB Output is correct
16 Correct 2 ms 4956 KB Output is correct
17 Correct 1 ms 4956 KB Output is correct
18 Correct 2 ms 4956 KB Output is correct
19 Correct 1 ms 4952 KB Output is correct
20 Correct 2 ms 4956 KB Output is correct
21 Correct 3 ms 4956 KB Output is correct
22 Correct 1 ms 4956 KB Output is correct
23 Correct 2 ms 4956 KB Output is correct
24 Correct 2 ms 4956 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4956 KB Output is correct
2 Correct 2 ms 4956 KB Output is correct
3 Correct 4 ms 4952 KB Output is correct
4 Correct 2 ms 4956 KB Output is correct
5 Correct 1 ms 4952 KB Output is correct
6 Correct 2 ms 4956 KB Output is correct
7 Correct 3 ms 4956 KB Output is correct
8 Correct 2 ms 4956 KB Output is correct
9 Correct 2 ms 4952 KB Output is correct
10 Correct 2 ms 4956 KB Output is correct
11 Correct 2 ms 4956 KB Output is correct
12 Correct 2 ms 4952 KB Output is correct
13 Correct 1 ms 4956 KB Output is correct
14 Correct 2 ms 4956 KB Output is correct
15 Correct 2 ms 5140 KB Output is correct
16 Correct 1 ms 4956 KB Output is correct
17 Correct 2 ms 4988 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 4952 KB Output is correct
23 Correct 2 ms 4956 KB Output is correct
24 Correct 3 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 4956 KB Output is correct
28 Correct 2 ms 4956 KB Output is correct
29 Correct 1 ms 4956 KB Output is correct
30 Correct 2 ms 4956 KB Output is correct
31 Correct 1 ms 4952 KB Output is correct
32 Correct 2 ms 4956 KB Output is correct
33 Correct 3 ms 4956 KB Output is correct
34 Correct 1 ms 4956 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 1 ms 4956 KB Output is correct
40 Correct 3 ms 5208 KB Output is correct
41 Correct 2 ms 4956 KB Output is correct
42 Correct 2 ms 4956 KB Output is correct
43 Correct 2 ms 5212 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 4948 KB Output is correct
47 Correct 2 ms 4956 KB Output is correct
48 Correct 3 ms 5212 KB Output is correct
49 Correct 2 ms 4956 KB Output is correct
50 Correct 2 ms 5136 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4956 KB Output is correct
2 Correct 2 ms 4956 KB Output is correct
3 Correct 4 ms 4952 KB Output is correct
4 Correct 2 ms 4956 KB Output is correct
5 Correct 1 ms 4952 KB Output is correct
6 Correct 2 ms 4956 KB Output is correct
7 Correct 3 ms 4956 KB Output is correct
8 Correct 2 ms 4956 KB Output is correct
9 Correct 2 ms 4952 KB Output is correct
10 Correct 2 ms 4956 KB Output is correct
11 Correct 2 ms 4956 KB Output is correct
12 Correct 2 ms 4952 KB Output is correct
13 Correct 1 ms 4956 KB Output is correct
14 Correct 2 ms 4956 KB Output is correct
15 Correct 2 ms 5140 KB Output is correct
16 Correct 1 ms 4956 KB Output is correct
17 Correct 2 ms 4988 KB Output is correct
18 Correct 2 ms 4956 KB Output is correct
19 Correct 3 ms 5140 KB Output is correct
20 Correct 2 ms 5212 KB Output is correct
21 Correct 2 ms 5212 KB Output is correct
22 Correct 2 ms 5208 KB Output is correct
23 Correct 2 ms 4956 KB Output is correct
24 Correct 2 ms 5144 KB Output is correct
25 Correct 2 ms 5212 KB Output is correct
26 Correct 2 ms 4956 KB Output is correct
27 Correct 2 ms 4956 KB Output is correct
28 Correct 2 ms 4956 KB Output is correct
29 Correct 2 ms 4952 KB Output is correct
30 Correct 2 ms 4956 KB Output is correct
31 Correct 3 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 1 ms 4956 KB Output is correct
37 Correct 2 ms 4956 KB Output is correct
38 Correct 1 ms 4952 KB Output is correct
39 Correct 2 ms 4956 KB Output is correct
40 Correct 3 ms 4956 KB Output is correct
41 Correct 1 ms 4956 KB Output is correct
42 Correct 2 ms 4956 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 1 ms 4956 KB Output is correct
47 Correct 3 ms 5208 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 5212 KB Output is correct
51 Correct 2 ms 4956 KB Output is correct
52 Correct 2 ms 4956 KB Output is correct
53 Correct 2 ms 4948 KB Output is correct
54 Correct 2 ms 4956 KB Output is correct
55 Correct 3 ms 5212 KB Output is correct
56 Correct 2 ms 4956 KB Output is correct
57 Correct 2 ms 5136 KB Output is correct
58 Correct 2 ms 4952 KB Output is correct
59 Correct 2 ms 4956 KB Output is correct
60 Correct 2 ms 4952 KB Output is correct
61 Correct 2 ms 5144 KB Output is correct
62 Correct 1 ms 4956 KB Output is correct
63 Correct 2 ms 5212 KB Output is correct
64 Correct 2 ms 5212 KB Output is correct
65 Correct 2 ms 5212 KB Output is correct
66 Correct 2 ms 5212 KB Output is correct
67 Correct 2 ms 4956 KB Output is correct
68 Correct 2 ms 5148 KB Output is correct
69 Correct 2 ms 5208 KB Output is correct
70 Correct 2 ms 4956 KB Output is correct
71 Correct 2 ms 4956 KB Output is correct
72 Correct 3 ms 5212 KB Output is correct
73 Correct 3 ms 5212 KB Output is correct
74 Correct 2 ms 5212 KB Output is correct
75 Correct 2 ms 4956 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4956 KB Output is correct
2 Correct 2 ms 4956 KB Output is correct
3 Correct 4 ms 4952 KB Output is correct
4 Correct 2 ms 4956 KB Output is correct
5 Correct 1 ms 4952 KB Output is correct
6 Correct 2 ms 4956 KB Output is correct
7 Correct 3 ms 4956 KB Output is correct
8 Correct 2 ms 4956 KB Output is correct
9 Correct 2 ms 4952 KB Output is correct
10 Correct 2 ms 4956 KB Output is correct
11 Correct 2 ms 4956 KB Output is correct
12 Correct 2 ms 4952 KB Output is correct
13 Correct 1 ms 4956 KB Output is correct
14 Correct 2 ms 4956 KB Output is correct
15 Correct 2 ms 5140 KB Output is correct
16 Correct 1 ms 4956 KB Output is correct
17 Correct 2 ms 4988 KB Output is correct
18 Correct 2 ms 4956 KB Output is correct
19 Correct 3 ms 5140 KB Output is correct
20 Correct 2 ms 5212 KB Output is correct
21 Correct 2 ms 5212 KB Output is correct
22 Correct 2 ms 5208 KB Output is correct
23 Correct 2 ms 4956 KB Output is correct
24 Correct 2 ms 5144 KB Output is correct
25 Correct 2 ms 5212 KB Output is correct
26 Correct 3 ms 5212 KB Output is correct
27 Correct 7 ms 5724 KB Output is correct
28 Correct 3 ms 5656 KB Output is correct
29 Correct 4 ms 5468 KB Output is correct
30 Correct 3 ms 5724 KB Output is correct
31 Correct 2 ms 5464 KB Output is correct
32 Correct 4 ms 5656 KB Output is correct
33 Correct 5 ms 5468 KB Output is correct
34 Correct 2 ms 4956 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 4952 KB Output is correct
38 Correct 2 ms 4956 KB Output is correct
39 Correct 3 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 2 ms 4956 KB Output is correct
44 Correct 1 ms 4956 KB Output is correct
45 Correct 2 ms 4956 KB Output is correct
46 Correct 1 ms 4952 KB Output is correct
47 Correct 2 ms 4956 KB Output is correct
48 Correct 3 ms 4956 KB Output is correct
49 Correct 1 ms 4956 KB Output is correct
50 Correct 2 ms 4956 KB Output is correct
51 Correct 2 ms 4956 KB Output is correct
52 Correct 2 ms 4956 KB Output is correct
53 Correct 2 ms 4956 KB Output is correct
54 Correct 1 ms 4956 KB Output is correct
55 Correct 3 ms 5208 KB Output is correct
56 Correct 2 ms 4956 KB Output is correct
57 Correct 2 ms 4956 KB Output is correct
58 Correct 2 ms 5212 KB Output is correct
59 Correct 2 ms 4956 KB Output is correct
60 Correct 2 ms 4956 KB Output is correct
61 Correct 2 ms 4948 KB Output is correct
62 Correct 2 ms 4956 KB Output is correct
63 Correct 3 ms 5212 KB Output is correct
64 Correct 2 ms 4956 KB Output is correct
65 Correct 2 ms 5136 KB Output is correct
66 Correct 2 ms 4952 KB Output is correct
67 Correct 2 ms 4956 KB Output is correct
68 Correct 2 ms 4952 KB Output is correct
69 Correct 2 ms 5144 KB Output is correct
70 Correct 1 ms 4956 KB Output is correct
71 Correct 2 ms 5212 KB Output is correct
72 Correct 2 ms 5212 KB Output is correct
73 Correct 2 ms 5212 KB Output is correct
74 Correct 2 ms 5212 KB Output is correct
75 Correct 2 ms 4956 KB Output is correct
76 Correct 2 ms 5148 KB Output is correct
77 Correct 2 ms 5208 KB Output is correct
78 Correct 2 ms 4956 KB Output is correct
79 Correct 2 ms 4956 KB Output is correct
80 Correct 3 ms 5212 KB Output is correct
81 Correct 3 ms 5212 KB Output is correct
82 Correct 2 ms 5212 KB Output is correct
83 Correct 2 ms 4956 KB Output is correct
84 Correct 4 ms 5208 KB Output is correct
85 Correct 5 ms 5212 KB Output is correct
86 Correct 3 ms 5208 KB Output is correct
87 Correct 3 ms 5212 KB Output is correct
88 Correct 4 ms 5048 KB Output is correct
89 Correct 5 ms 5724 KB Output is correct
90 Correct 5 ms 5716 KB Output is correct
91 Correct 3 ms 5724 KB Output is correct
92 Correct 4 ms 5724 KB Output is correct
93 Correct 3 ms 5360 KB Output is correct
94 Correct 4 ms 5464 KB Output is correct
95 Correct 3 ms 5472 KB Output is correct
96 Correct 3 ms 5472 KB Output is correct
97 Correct 4 ms 5724 KB Output is correct
98 Correct 4 ms 5728 KB Output is correct
99 Correct 5 ms 5852 KB Output is correct
100 Correct 4 ms 5472 KB Output is correct
101 Correct 4 ms 5208 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4956 KB Output is correct
2 Correct 2 ms 4956 KB Output is correct
3 Correct 4 ms 4952 KB Output is correct
4 Correct 2 ms 4956 KB Output is correct
5 Correct 1 ms 4952 KB Output is correct
6 Correct 2 ms 4956 KB Output is correct
7 Correct 3 ms 4956 KB Output is correct
8 Correct 2 ms 4956 KB Output is correct
9 Correct 2 ms 4952 KB Output is correct
10 Correct 2 ms 4956 KB Output is correct
11 Correct 2 ms 4956 KB Output is correct
12 Correct 2 ms 4952 KB Output is correct
13 Correct 1 ms 4956 KB Output is correct
14 Correct 2 ms 4956 KB Output is correct
15 Correct 2 ms 5140 KB Output is correct
16 Correct 1 ms 4956 KB Output is correct
17 Correct 2 ms 4988 KB Output is correct
18 Correct 2 ms 4956 KB Output is correct
19 Correct 3 ms 5140 KB Output is correct
20 Correct 2 ms 5212 KB Output is correct
21 Correct 2 ms 5212 KB Output is correct
22 Correct 2 ms 5208 KB Output is correct
23 Correct 2 ms 4956 KB Output is correct
24 Correct 2 ms 5144 KB Output is correct
25 Correct 2 ms 5212 KB Output is correct
26 Correct 3 ms 5212 KB Output is correct
27 Correct 7 ms 5724 KB Output is correct
28 Correct 3 ms 5656 KB Output is correct
29 Correct 4 ms 5468 KB Output is correct
30 Correct 3 ms 5724 KB Output is correct
31 Correct 2 ms 5464 KB Output is correct
32 Correct 4 ms 5656 KB Output is correct
33 Correct 5 ms 5468 KB Output is correct
34 Correct 2 ms 4956 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 4952 KB Output is correct
38 Correct 2 ms 4956 KB Output is correct
39 Correct 3 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 2 ms 4956 KB Output is correct
44 Correct 1 ms 4956 KB Output is correct
45 Correct 2 ms 4956 KB Output is correct
46 Correct 1 ms 4952 KB Output is correct
47 Correct 2 ms 4956 KB Output is correct
48 Correct 3 ms 4956 KB Output is correct
49 Correct 1 ms 4956 KB Output is correct
50 Correct 2 ms 4956 KB Output is correct
51 Correct 2 ms 4956 KB Output is correct
52 Correct 2 ms 4956 KB Output is correct
53 Correct 2 ms 4956 KB Output is correct
54 Correct 1 ms 4956 KB Output is correct
55 Correct 3 ms 5208 KB Output is correct
56 Correct 2 ms 4956 KB Output is correct
57 Correct 2 ms 4956 KB Output is correct
58 Correct 2 ms 5212 KB Output is correct
59 Correct 2 ms 4956 KB Output is correct
60 Correct 2 ms 4956 KB Output is correct
61 Correct 2 ms 4948 KB Output is correct
62 Correct 2 ms 4956 KB Output is correct
63 Correct 3 ms 5212 KB Output is correct
64 Correct 2 ms 4956 KB Output is correct
65 Correct 2 ms 5136 KB Output is correct
66 Correct 2 ms 4952 KB Output is correct
67 Correct 2 ms 4956 KB Output is correct
68 Correct 2 ms 4952 KB Output is correct
69 Correct 2 ms 5144 KB Output is correct
70 Correct 1 ms 4956 KB Output is correct
71 Correct 2 ms 5212 KB Output is correct
72 Correct 2 ms 5212 KB Output is correct
73 Correct 2 ms 5212 KB Output is correct
74 Correct 2 ms 5212 KB Output is correct
75 Correct 2 ms 4956 KB Output is correct
76 Correct 2 ms 5148 KB Output is correct
77 Correct 2 ms 5208 KB Output is correct
78 Correct 2 ms 4956 KB Output is correct
79 Correct 2 ms 4956 KB Output is correct
80 Correct 3 ms 5212 KB Output is correct
81 Correct 3 ms 5212 KB Output is correct
82 Correct 2 ms 5212 KB Output is correct
83 Correct 2 ms 4956 KB Output is correct
84 Correct 4 ms 5208 KB Output is correct
85 Correct 5 ms 5212 KB Output is correct
86 Correct 3 ms 5208 KB Output is correct
87 Correct 3 ms 5212 KB Output is correct
88 Correct 4 ms 5048 KB Output is correct
89 Correct 5 ms 5724 KB Output is correct
90 Correct 5 ms 5716 KB Output is correct
91 Correct 3 ms 5724 KB Output is correct
92 Correct 4 ms 5724 KB Output is correct
93 Correct 3 ms 5360 KB Output is correct
94 Correct 4 ms 5464 KB Output is correct
95 Correct 3 ms 5472 KB Output is correct
96 Correct 3 ms 5472 KB Output is correct
97 Correct 4 ms 5724 KB Output is correct
98 Correct 4 ms 5728 KB Output is correct
99 Correct 5 ms 5852 KB Output is correct
100 Correct 4 ms 5472 KB Output is correct
101 Correct 4 ms 5208 KB Output is correct
102 Correct 129 ms 10220 KB Output is correct
103 Correct 165 ms 10284 KB Output is correct
104 Correct 271 ms 50648 KB Output is correct
105 Correct 132 ms 12916 KB Output is correct
106 Correct 164 ms 12072 KB Output is correct
107 Correct 224 ms 50224 KB Output is correct
108 Correct 278 ms 52100 KB Output is correct
109 Correct 76 ms 37816 KB Output is correct
110 Correct 366 ms 57076 KB Output is correct
111 Correct 153 ms 53464 KB Output is correct
112 Correct 246 ms 56136 KB Output is correct
113 Correct 78 ms 35160 KB Output is correct
114 Correct 251 ms 54892 KB Output is correct
115 Correct 118 ms 41188 KB Output is correct
116 Correct 236 ms 53868 KB Output is correct
117 Correct 131 ms 35316 KB Output is correct
118 Correct 329 ms 56628 KB Output is correct
119 Correct 218 ms 17336 KB Output is correct
120 Correct 116 ms 9848 KB Output is correct