답안 #1031453

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1031453 2024-07-22T21:02:29 Z aaaaaarroz 봉쇄 시간 (IOI23_closing) C++17
83 / 100
1000 ms 36724 KB
    #include <bits/stdc++.h>
     
    using namespace std;
     
    #define sz(x) int(x.size())
    #define all(x) begin(x), end(x)
     
    using ll = long long;
    using ii = pair<int, int>;
     
    const ll INF = 1e18;
    const int MAX_N = 2e5 + 9;
     
    vector<ii> adj[MAX_N];
    pair<ll, ll> val[MAX_N];
    int n;
     
    void dfs(int u, vector<ll> &dist, int p = -1, ll d = 0) {
        dist[u] = d;
        for (auto [v, w] : adj[u]) {
            if (v != p) dfs(v, dist, u, d + w);
        }
    }
     
    int non_overlaping(ll K) {
        vector<ll> v(n);
        for (int i = 0; i < n; i++) {
            v[i] = val[i].first;
        }
        sort(all(v));
        int ans = 0;
        for (int i = 0; i < n; i++) {
            if (v[i] <= K) {
                K -= v[i];
                ans++;
            }
        }
        return ans;
    }
     
    int max_score(int N, int X, int Y, ll K, vector<int> U, vector<int> V, vector<int> W) {
        n = N;
        for (int i = 0; i < n; i++) adj[i].clear(); 
        for (int i = 0; i < n - 1; i++) {
            adj[U[i]].emplace_back(V[i], W[i]);
            adj[V[i]].emplace_back(U[i], W[i]);
        }
        vector<ll> distToX(n), distToY(n);
        dfs(X, distToX), dfs(Y, distToY);
        bool flag = false;
        for (int i = 0; i < n; i++) {
            val[i] = minmax(distToX[i], distToY[i]);
            if (val[i].second <= K) flag = true;
        }
        if (!flag) return non_overlaping(K);
        vector<bool> path(n, false);
        path[Y] = true;
        int u = Y;
        while (u != X) {
            for (auto [v, w] : adj[u]) {
                if (distToX[v] + w == distToX[u]) {
                    u = v;
                    break;
                }
            }
            path[u] = true;
        }
        vector<ll> prevDP(2 * n + 1, INF);
        prevDP[0] = 0;
        for (int i = 0; i < n; i++) {
            vector<ll> currDP(2 * n + 1, INF);
            if (!path[i]) currDP = prevDP;
            for (int j = 1; j <= 2 * n; j++) {
                currDP[j] = min(currDP[j], prevDP[j - 1] + val[i].first);
            }
            for (int j = 2; j <= 2 * n; j++) {
                currDP[j] = min(currDP[j], prevDP[j - 2] + val[i].second);
            }
            prevDP = currDP;
        }
        for (int i = 2 * n; i >= 0; i--) {
            if (prevDP[i] <= K) return max(i, non_overlaping(K));
        }
        return non_overlaping(K);
    }
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 5980 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 82 ms 30712 KB Output is correct
2 Correct 84 ms 32836 KB Output is correct
3 Correct 50 ms 11016 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 5976 KB Output is correct
2 Correct 2 ms 5980 KB Output is correct
3 Correct 2 ms 5980 KB Output is correct
4 Correct 1 ms 5980 KB Output is correct
5 Correct 2 ms 5980 KB Output is correct
6 Correct 2 ms 5980 KB Output is correct
7 Correct 2 ms 5980 KB Output is correct
8 Correct 2 ms 6040 KB Output is correct
9 Correct 1 ms 5980 KB Output is correct
10 Correct 1 ms 5980 KB Output is correct
11 Correct 2 ms 5980 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 5976 KB Output is correct
2 Correct 2 ms 5980 KB Output is correct
3 Correct 2 ms 5980 KB Output is correct
4 Correct 1 ms 5980 KB Output is correct
5 Correct 2 ms 5980 KB Output is correct
6 Correct 2 ms 5980 KB Output is correct
7 Correct 2 ms 5980 KB Output is correct
8 Correct 2 ms 6040 KB Output is correct
9 Correct 1 ms 5980 KB Output is correct
10 Correct 1 ms 5980 KB Output is correct
11 Correct 2 ms 5980 KB Output is correct
12 Correct 2 ms 6040 KB Output is correct
13 Correct 2 ms 5980 KB Output is correct
14 Correct 2 ms 5980 KB Output is correct
15 Correct 2 ms 5980 KB Output is correct
16 Correct 2 ms 6044 KB Output is correct
17 Correct 2 ms 5980 KB Output is correct
18 Correct 2 ms 6044 KB Output is correct
19 Correct 3 ms 5980 KB Output is correct
20 Correct 4 ms 5980 KB Output is correct
21 Correct 3 ms 5980 KB Output is correct
22 Correct 3 ms 5980 KB Output is correct
23 Correct 3 ms 6056 KB Output is correct
24 Correct 5 ms 5980 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 5976 KB Output is correct
2 Correct 2 ms 5980 KB Output is correct
3 Correct 2 ms 5980 KB Output is correct
4 Correct 1 ms 5980 KB Output is correct
5 Correct 2 ms 5980 KB Output is correct
6 Correct 2 ms 5980 KB Output is correct
7 Correct 2 ms 5980 KB Output is correct
8 Correct 2 ms 6040 KB Output is correct
9 Correct 1 ms 5980 KB Output is correct
10 Correct 1 ms 5980 KB Output is correct
11 Correct 2 ms 5980 KB Output is correct
12 Correct 2 ms 6040 KB Output is correct
13 Correct 2 ms 5980 KB Output is correct
14 Correct 2 ms 5980 KB Output is correct
15 Correct 2 ms 5980 KB Output is correct
16 Correct 2 ms 6044 KB Output is correct
17 Correct 2 ms 5980 KB Output is correct
18 Correct 2 ms 6044 KB Output is correct
19 Correct 3 ms 5980 KB Output is correct
20 Correct 4 ms 5980 KB Output is correct
21 Correct 3 ms 5980 KB Output is correct
22 Correct 3 ms 5980 KB Output is correct
23 Correct 3 ms 6056 KB Output is correct
24 Correct 5 ms 5980 KB Output is correct
25 Correct 3 ms 6056 KB Output is correct
26 Correct 39 ms 6496 KB Output is correct
27 Correct 34 ms 6236 KB Output is correct
28 Correct 32 ms 6488 KB Output is correct
29 Correct 35 ms 6492 KB Output is correct
30 Correct 33 ms 6236 KB Output is correct
31 Correct 37 ms 6492 KB Output is correct
32 Correct 36 ms 6492 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 5980 KB Output is correct
2 Correct 2 ms 5976 KB Output is correct
3 Correct 2 ms 5980 KB Output is correct
4 Correct 2 ms 5980 KB Output is correct
5 Correct 1 ms 5980 KB Output is correct
6 Correct 2 ms 5980 KB Output is correct
7 Correct 3 ms 5976 KB Output is correct
8 Correct 2 ms 5980 KB Output is correct
9 Correct 2 ms 6048 KB Output is correct
10 Correct 2 ms 5980 KB Output is correct
11 Correct 2 ms 5980 KB Output is correct
12 Correct 2 ms 5980 KB Output is correct
13 Correct 1 ms 5980 KB Output is correct
14 Correct 1 ms 5980 KB Output is correct
15 Correct 1 ms 5980 KB Output is correct
16 Correct 2 ms 5980 KB Output is correct
17 Correct 2 ms 5980 KB Output is correct
18 Correct 3 ms 5976 KB Output is correct
19 Correct 2 ms 5980 KB Output is correct
20 Correct 2 ms 5980 KB Output is correct
21 Correct 2 ms 6048 KB Output is correct
22 Correct 2 ms 5980 KB Output is correct
23 Correct 2 ms 5980 KB Output is correct
24 Correct 2 ms 5980 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 5980 KB Output is correct
2 Correct 2 ms 5976 KB Output is correct
3 Correct 2 ms 5980 KB Output is correct
4 Correct 2 ms 5980 KB Output is correct
5 Correct 1 ms 5980 KB Output is correct
6 Correct 2 ms 5980 KB Output is correct
7 Correct 2 ms 5980 KB Output is correct
8 Correct 2 ms 5980 KB Output is correct
9 Correct 2 ms 6040 KB Output is correct
10 Correct 1 ms 5980 KB Output is correct
11 Correct 1 ms 5980 KB Output is correct
12 Correct 2 ms 5980 KB Output is correct
13 Correct 2 ms 6040 KB Output is correct
14 Correct 2 ms 5980 KB Output is correct
15 Correct 2 ms 5980 KB Output is correct
16 Correct 2 ms 5980 KB Output is correct
17 Correct 2 ms 6044 KB Output is correct
18 Correct 2 ms 5980 KB Output is correct
19 Correct 3 ms 5976 KB Output is correct
20 Correct 2 ms 5980 KB Output is correct
21 Correct 2 ms 6048 KB Output is correct
22 Correct 2 ms 5980 KB Output is correct
23 Correct 2 ms 5980 KB Output is correct
24 Correct 2 ms 5980 KB Output is correct
25 Correct 1 ms 5980 KB Output is correct
26 Correct 1 ms 5980 KB Output is correct
27 Correct 1 ms 5980 KB Output is correct
28 Correct 2 ms 5980 KB Output is correct
29 Correct 2 ms 5980 KB Output is correct
30 Correct 3 ms 5976 KB Output is correct
31 Correct 2 ms 5980 KB Output is correct
32 Correct 2 ms 5980 KB Output is correct
33 Correct 2 ms 6048 KB Output is correct
34 Correct 2 ms 5980 KB Output is correct
35 Correct 2 ms 5980 KB Output is correct
36 Correct 2 ms 5980 KB Output is correct
37 Correct 2 ms 5980 KB Output is correct
38 Correct 2 ms 5980 KB Output is correct
39 Correct 2 ms 5980 KB Output is correct
40 Correct 2 ms 5980 KB Output is correct
41 Correct 2 ms 5980 KB Output is correct
42 Correct 2 ms 6040 KB Output is correct
43 Correct 1 ms 5976 KB Output is correct
44 Correct 2 ms 5980 KB Output is correct
45 Correct 2 ms 5980 KB Output is correct
46 Correct 2 ms 5980 KB Output is correct
47 Correct 2 ms 5980 KB Output is correct
48 Correct 2 ms 5976 KB Output is correct
49 Correct 2 ms 5980 KB Output is correct
50 Correct 2 ms 5980 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 5980 KB Output is correct
2 Correct 2 ms 5976 KB Output is correct
3 Correct 2 ms 5980 KB Output is correct
4 Correct 2 ms 5980 KB Output is correct
5 Correct 1 ms 5980 KB Output is correct
6 Correct 2 ms 5980 KB Output is correct
7 Correct 2 ms 5980 KB Output is correct
8 Correct 2 ms 5980 KB Output is correct
9 Correct 2 ms 6040 KB Output is correct
10 Correct 1 ms 5980 KB Output is correct
11 Correct 1 ms 5980 KB Output is correct
12 Correct 2 ms 5980 KB Output is correct
13 Correct 2 ms 6040 KB Output is correct
14 Correct 2 ms 5980 KB Output is correct
15 Correct 2 ms 5980 KB Output is correct
16 Correct 2 ms 5980 KB Output is correct
17 Correct 2 ms 6044 KB Output is correct
18 Correct 2 ms 5980 KB Output is correct
19 Correct 2 ms 6044 KB Output is correct
20 Correct 3 ms 5980 KB Output is correct
21 Correct 4 ms 5980 KB Output is correct
22 Correct 3 ms 5980 KB Output is correct
23 Correct 3 ms 5980 KB Output is correct
24 Correct 3 ms 6056 KB Output is correct
25 Correct 5 ms 5980 KB Output is correct
26 Correct 3 ms 5976 KB Output is correct
27 Correct 2 ms 5980 KB Output is correct
28 Correct 2 ms 6048 KB Output is correct
29 Correct 2 ms 5980 KB Output is correct
30 Correct 2 ms 5980 KB Output is correct
31 Correct 2 ms 5980 KB Output is correct
32 Correct 1 ms 5980 KB Output is correct
33 Correct 1 ms 5980 KB Output is correct
34 Correct 1 ms 5980 KB Output is correct
35 Correct 2 ms 5980 KB Output is correct
36 Correct 2 ms 5980 KB Output is correct
37 Correct 3 ms 5976 KB Output is correct
38 Correct 2 ms 5980 KB Output is correct
39 Correct 2 ms 5980 KB Output is correct
40 Correct 2 ms 6048 KB Output is correct
41 Correct 2 ms 5980 KB Output is correct
42 Correct 2 ms 5980 KB Output is correct
43 Correct 2 ms 5980 KB Output is correct
44 Correct 2 ms 5980 KB Output is correct
45 Correct 2 ms 5980 KB Output is correct
46 Correct 2 ms 5980 KB Output is correct
47 Correct 2 ms 5980 KB Output is correct
48 Correct 2 ms 5980 KB Output is correct
49 Correct 2 ms 6040 KB Output is correct
50 Correct 1 ms 5976 KB Output is correct
51 Correct 2 ms 5980 KB Output is correct
52 Correct 2 ms 5980 KB Output is correct
53 Correct 2 ms 5980 KB Output is correct
54 Correct 2 ms 5980 KB Output is correct
55 Correct 2 ms 5976 KB Output is correct
56 Correct 2 ms 5980 KB Output is correct
57 Correct 2 ms 5980 KB Output is correct
58 Correct 2 ms 5980 KB Output is correct
59 Correct 2 ms 5980 KB Output is correct
60 Correct 2 ms 5980 KB Output is correct
61 Correct 2 ms 5980 KB Output is correct
62 Correct 2 ms 5980 KB Output is correct
63 Correct 4 ms 6044 KB Output is correct
64 Correct 3 ms 5976 KB Output is correct
65 Correct 3 ms 6068 KB Output is correct
66 Correct 3 ms 5984 KB Output is correct
67 Correct 3 ms 5980 KB Output is correct
68 Correct 3 ms 5980 KB Output is correct
69 Correct 2 ms 6048 KB Output is correct
70 Correct 3 ms 5980 KB Output is correct
71 Correct 3 ms 5980 KB Output is correct
72 Correct 3 ms 6108 KB Output is correct
73 Correct 3 ms 5980 KB Output is correct
74 Correct 3 ms 5980 KB Output is correct
75 Correct 2 ms 5980 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 5980 KB Output is correct
2 Correct 2 ms 5976 KB Output is correct
3 Correct 2 ms 5980 KB Output is correct
4 Correct 2 ms 5980 KB Output is correct
5 Correct 1 ms 5980 KB Output is correct
6 Correct 2 ms 5980 KB Output is correct
7 Correct 2 ms 5980 KB Output is correct
8 Correct 2 ms 5980 KB Output is correct
9 Correct 2 ms 6040 KB Output is correct
10 Correct 1 ms 5980 KB Output is correct
11 Correct 1 ms 5980 KB Output is correct
12 Correct 2 ms 5980 KB Output is correct
13 Correct 2 ms 6040 KB Output is correct
14 Correct 2 ms 5980 KB Output is correct
15 Correct 2 ms 5980 KB Output is correct
16 Correct 2 ms 5980 KB Output is correct
17 Correct 2 ms 6044 KB Output is correct
18 Correct 2 ms 5980 KB Output is correct
19 Correct 2 ms 6044 KB Output is correct
20 Correct 3 ms 5980 KB Output is correct
21 Correct 4 ms 5980 KB Output is correct
22 Correct 3 ms 5980 KB Output is correct
23 Correct 3 ms 5980 KB Output is correct
24 Correct 3 ms 6056 KB Output is correct
25 Correct 5 ms 5980 KB Output is correct
26 Correct 3 ms 6056 KB Output is correct
27 Correct 39 ms 6496 KB Output is correct
28 Correct 34 ms 6236 KB Output is correct
29 Correct 32 ms 6488 KB Output is correct
30 Correct 35 ms 6492 KB Output is correct
31 Correct 33 ms 6236 KB Output is correct
32 Correct 37 ms 6492 KB Output is correct
33 Correct 36 ms 6492 KB Output is correct
34 Correct 3 ms 5976 KB Output is correct
35 Correct 2 ms 5980 KB Output is correct
36 Correct 2 ms 6048 KB Output is correct
37 Correct 2 ms 5980 KB Output is correct
38 Correct 2 ms 5980 KB Output is correct
39 Correct 2 ms 5980 KB Output is correct
40 Correct 1 ms 5980 KB Output is correct
41 Correct 1 ms 5980 KB Output is correct
42 Correct 1 ms 5980 KB Output is correct
43 Correct 2 ms 5980 KB Output is correct
44 Correct 2 ms 5980 KB Output is correct
45 Correct 3 ms 5976 KB Output is correct
46 Correct 2 ms 5980 KB Output is correct
47 Correct 2 ms 5980 KB Output is correct
48 Correct 2 ms 6048 KB Output is correct
49 Correct 2 ms 5980 KB Output is correct
50 Correct 2 ms 5980 KB Output is correct
51 Correct 2 ms 5980 KB Output is correct
52 Correct 2 ms 5980 KB Output is correct
53 Correct 2 ms 5980 KB Output is correct
54 Correct 2 ms 5980 KB Output is correct
55 Correct 2 ms 5980 KB Output is correct
56 Correct 2 ms 5980 KB Output is correct
57 Correct 2 ms 6040 KB Output is correct
58 Correct 1 ms 5976 KB Output is correct
59 Correct 2 ms 5980 KB Output is correct
60 Correct 2 ms 5980 KB Output is correct
61 Correct 2 ms 5980 KB Output is correct
62 Correct 2 ms 5980 KB Output is correct
63 Correct 2 ms 5976 KB Output is correct
64 Correct 2 ms 5980 KB Output is correct
65 Correct 2 ms 5980 KB Output is correct
66 Correct 2 ms 5980 KB Output is correct
67 Correct 2 ms 5980 KB Output is correct
68 Correct 2 ms 5980 KB Output is correct
69 Correct 2 ms 5980 KB Output is correct
70 Correct 2 ms 5980 KB Output is correct
71 Correct 4 ms 6044 KB Output is correct
72 Correct 3 ms 5976 KB Output is correct
73 Correct 3 ms 6068 KB Output is correct
74 Correct 3 ms 5984 KB Output is correct
75 Correct 3 ms 5980 KB Output is correct
76 Correct 3 ms 5980 KB Output is correct
77 Correct 2 ms 6048 KB Output is correct
78 Correct 3 ms 5980 KB Output is correct
79 Correct 3 ms 5980 KB Output is correct
80 Correct 3 ms 6108 KB Output is correct
81 Correct 3 ms 5980 KB Output is correct
82 Correct 3 ms 5980 KB Output is correct
83 Correct 2 ms 5980 KB Output is correct
84 Correct 3 ms 6056 KB Output is correct
85 Correct 5 ms 5980 KB Output is correct
86 Correct 3 ms 5980 KB Output is correct
87 Correct 4 ms 6096 KB Output is correct
88 Correct 4 ms 5980 KB Output is correct
89 Correct 43 ms 6236 KB Output is correct
90 Correct 32 ms 6236 KB Output is correct
91 Correct 39 ms 6232 KB Output is correct
92 Correct 34 ms 6236 KB Output is correct
93 Correct 35 ms 6408 KB Output is correct
94 Correct 34 ms 6232 KB Output is correct
95 Correct 43 ms 6492 KB Output is correct
96 Correct 35 ms 6304 KB Output is correct
97 Correct 37 ms 6236 KB Output is correct
98 Correct 37 ms 6232 KB Output is correct
99 Correct 39 ms 6428 KB Output is correct
100 Correct 26 ms 6236 KB Output is correct
101 Correct 7 ms 5276 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 5980 KB Output is correct
2 Correct 2 ms 5976 KB Output is correct
3 Correct 2 ms 5980 KB Output is correct
4 Correct 2 ms 5980 KB Output is correct
5 Correct 1 ms 5980 KB Output is correct
6 Correct 2 ms 5980 KB Output is correct
7 Correct 2 ms 5980 KB Output is correct
8 Correct 2 ms 5980 KB Output is correct
9 Correct 2 ms 6040 KB Output is correct
10 Correct 1 ms 5980 KB Output is correct
11 Correct 1 ms 5980 KB Output is correct
12 Correct 2 ms 5980 KB Output is correct
13 Correct 2 ms 6040 KB Output is correct
14 Correct 2 ms 5980 KB Output is correct
15 Correct 2 ms 5980 KB Output is correct
16 Correct 2 ms 5980 KB Output is correct
17 Correct 2 ms 6044 KB Output is correct
18 Correct 2 ms 5980 KB Output is correct
19 Correct 2 ms 6044 KB Output is correct
20 Correct 3 ms 5980 KB Output is correct
21 Correct 4 ms 5980 KB Output is correct
22 Correct 3 ms 5980 KB Output is correct
23 Correct 3 ms 5980 KB Output is correct
24 Correct 3 ms 6056 KB Output is correct
25 Correct 5 ms 5980 KB Output is correct
26 Correct 3 ms 6056 KB Output is correct
27 Correct 39 ms 6496 KB Output is correct
28 Correct 34 ms 6236 KB Output is correct
29 Correct 32 ms 6488 KB Output is correct
30 Correct 35 ms 6492 KB Output is correct
31 Correct 33 ms 6236 KB Output is correct
32 Correct 37 ms 6492 KB Output is correct
33 Correct 36 ms 6492 KB Output is correct
34 Correct 3 ms 5976 KB Output is correct
35 Correct 2 ms 5980 KB Output is correct
36 Correct 2 ms 6048 KB Output is correct
37 Correct 2 ms 5980 KB Output is correct
38 Correct 2 ms 5980 KB Output is correct
39 Correct 2 ms 5980 KB Output is correct
40 Correct 1 ms 5980 KB Output is correct
41 Correct 1 ms 5980 KB Output is correct
42 Correct 1 ms 5980 KB Output is correct
43 Correct 2 ms 5980 KB Output is correct
44 Correct 2 ms 5980 KB Output is correct
45 Correct 3 ms 5976 KB Output is correct
46 Correct 2 ms 5980 KB Output is correct
47 Correct 2 ms 5980 KB Output is correct
48 Correct 2 ms 6048 KB Output is correct
49 Correct 2 ms 5980 KB Output is correct
50 Correct 2 ms 5980 KB Output is correct
51 Correct 2 ms 5980 KB Output is correct
52 Correct 2 ms 5980 KB Output is correct
53 Correct 2 ms 5980 KB Output is correct
54 Correct 2 ms 5980 KB Output is correct
55 Correct 2 ms 5980 KB Output is correct
56 Correct 2 ms 5980 KB Output is correct
57 Correct 2 ms 6040 KB Output is correct
58 Correct 1 ms 5976 KB Output is correct
59 Correct 2 ms 5980 KB Output is correct
60 Correct 2 ms 5980 KB Output is correct
61 Correct 2 ms 5980 KB Output is correct
62 Correct 2 ms 5980 KB Output is correct
63 Correct 2 ms 5976 KB Output is correct
64 Correct 2 ms 5980 KB Output is correct
65 Correct 2 ms 5980 KB Output is correct
66 Correct 2 ms 5980 KB Output is correct
67 Correct 2 ms 5980 KB Output is correct
68 Correct 2 ms 5980 KB Output is correct
69 Correct 2 ms 5980 KB Output is correct
70 Correct 2 ms 5980 KB Output is correct
71 Correct 4 ms 6044 KB Output is correct
72 Correct 3 ms 5976 KB Output is correct
73 Correct 3 ms 6068 KB Output is correct
74 Correct 3 ms 5984 KB Output is correct
75 Correct 3 ms 5980 KB Output is correct
76 Correct 3 ms 5980 KB Output is correct
77 Correct 2 ms 6048 KB Output is correct
78 Correct 3 ms 5980 KB Output is correct
79 Correct 3 ms 5980 KB Output is correct
80 Correct 3 ms 6108 KB Output is correct
81 Correct 3 ms 5980 KB Output is correct
82 Correct 3 ms 5980 KB Output is correct
83 Correct 2 ms 5980 KB Output is correct
84 Correct 3 ms 6056 KB Output is correct
85 Correct 5 ms 5980 KB Output is correct
86 Correct 3 ms 5980 KB Output is correct
87 Correct 4 ms 6096 KB Output is correct
88 Correct 4 ms 5980 KB Output is correct
89 Correct 43 ms 6236 KB Output is correct
90 Correct 32 ms 6236 KB Output is correct
91 Correct 39 ms 6232 KB Output is correct
92 Correct 34 ms 6236 KB Output is correct
93 Correct 35 ms 6408 KB Output is correct
94 Correct 34 ms 6232 KB Output is correct
95 Correct 43 ms 6492 KB Output is correct
96 Correct 35 ms 6304 KB Output is correct
97 Correct 37 ms 6236 KB Output is correct
98 Correct 37 ms 6232 KB Output is correct
99 Correct 39 ms 6428 KB Output is correct
100 Correct 26 ms 6236 KB Output is correct
101 Correct 7 ms 5276 KB Output is correct
102 Correct 157 ms 10068 KB Output is correct
103 Correct 346 ms 10328 KB Output is correct
104 Execution timed out 1051 ms 36724 KB Time limit exceeded
105 Halted 0 ms 0 KB -