Submission #848710

# Submission time Handle Problem Language Result Execution time Memory
848710 2023-09-13T10:38:29 Z math_rabbit_1028 Closing Time (IOI23_closing) C++17
83 / 100
1000 ms 44260 KB
#include "closing.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
 
int n, x, y, ch[202020], ans;
ll k, need[202020], dis[202020];
vector< pair<int, ll> > adj[202020];
priority_queue<pll> pq;
 
int L, midp;
vector< pair<int, ll> > path;
void find_path(int v) {
    for (int i = 0; i < adj[v].size(); i++) {
        if (path.back().first == y) return;
        int u = adj[v][i].first; ll w = adj[v][i].second;
        if (ch[u] == 1) continue;
        ch[u] = 1;
        path.push_back({u, w});
        find_path(u);
        if (path.back().first != y) path.pop_back();
    }
}

int not_intersect() {
    int cnt = 0;
    for (int i = 0; i < n; i++) ch[i] = 0;
    while (!pq.empty()) pq.pop();

    pq.push({-0, x});
    pq.push({-0, y});
 
    while (!pq.empty()) {
        int v = pq.top().second; ll w = -pq.top().first;
        pq.pop();
        if (k - w >= 0) {
            cnt++;
            k -= w;
        }
        else break;
 
        ch[v] = 1;
        for (int i = 0; i < (int)adj[v].size(); i++) {
            if (ch[adj[v][i].first] == 1) continue;
            if (v == path[midp - 1].first && adj[v][i].first == path[midp].first) continue; 
            if (v == path[midp].first && adj[v][i].first == path[midp - 1].first) continue; 
            pq.push({-w-adj[v][i].second, adj[v][i].first});
        }
    }

    return cnt;
}
 
ll dp[404040], nxt[404040];
void update(ll a, ll b) {
    for (int i = 0; i <= 2*n; i++) {
        ll val = dp[i];
        if (i >= 1) val = min(val, dp[i - 1] + a);
        if (i >= 2) val = min(val, dp[i - 2] + b);
        nxt[i] = val;
    }
    for (int i = 0; i <= 2*n; i++) dp[i] = nxt[i];
}
void DFS(int v, ll a, ll b) {
    for (int i = 0; i < adj[v].size(); i++) {
        int u = adj[v][i].first; ll w = adj[v][i].second;
        if (ch[u] == 1) continue;
        ch[u] = 1;
        update(a + w, b + w);
        DFS(u, a + w, b + w);
    }
}

int intersect() {
    for (int i = 0; i < n; i++) ch[i] = 0;
    for (int i = 0; i <= L; i++) ch[path[i].first] = 1;
    for (int i = 0; i <= 2*n; i++) dp[i] = 2e18;
    dp[0] = 0;

    for (int i = 0; i < midp; i++) need[i] = dis[i] - dis[0];
    for (int i = midp; i <= L; i++) need[i] = dis[L] - dis[i];
    for (int i = 1; i <= L; i++) k -= need[i];

    if (k < 0) return 0;

    for (int i = 0; i < midp; i++) {
        assert(dis[L] - dis[i] - need[i] >= 0);
        update(dis[L] - dis[i] - need[i], 2e18);
        ll a = dis[i] - dis[0];
        ll b = dis[L] - dis[i];
        assert(a <= b);
        DFS(path[i].first, a, b);
    }
    for (int i = midp; i <= L; i++) {
        assert(dis[i] - dis[0] - need[i] >= 0);
        update(dis[i] - dis[0] - need[i], 2e18);
        ll a = dis[L] - dis[i];
        ll b = dis[i] - dis[0];
        assert(a <= b);
        DFS(path[i].first, a, b);
    }

    int out = upper_bound(dp, dp + 2*n + 1, k) - dp - 1;
    return L + out + 1;
}
 
int max_score(int N, int X, int Y, ll K, vector<int> U, vector<int> V, vector<int> W) {
    n = N, x = X, y = Y, k = K;
 
    ans = 0;
    for (int i = 0; i < n; i++) adj[i].clear();
    path.clear();
 
    for (int i = 0; i < (int)U.size(); i++) {
        adj[U[i]].push_back({V[i], W[i]});
        adj[V[i]].push_back({U[i], W[i]});
    }
 
    for (int i = 0; i < n; i++) ch[i] = 0;
    path.push_back({x, 0});
    ch[x] = 1;
    find_path(x);
    assert(path.back().first == y);
    L = path.size() - 1;

    for (int i = 1; i <= L; i++) dis[i] = dis[i - 1] + path[i].second;
    
    for (int i = 0; i <= L; i++) {
        if (dis[i] - dis[0] > dis[L] - dis[i]) {
            midp = i;
            break;
        }
    }

    k = K;
    ans = not_intersect();
    
    k = K;
    ans = max(ans, intersect());
 
    return ans;
}

Compilation message

closing.cpp: In function 'void find_path(int)':
closing.cpp:15:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   15 |     for (int i = 0; i < adj[v].size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~
closing.cpp: In function 'void DFS(int, ll, ll)':
closing.cpp:66:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   66 |     for (int i = 0; i < adj[v].size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 2 ms 12632 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 81 ms 33640 KB Output is correct
2 Correct 87 ms 40036 KB Output is correct
3 Correct 45 ms 15184 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 12632 KB Output is correct
2 Correct 2 ms 12632 KB Output is correct
3 Correct 2 ms 12632 KB Output is correct
4 Correct 2 ms 12632 KB Output is correct
5 Correct 2 ms 12632 KB Output is correct
6 Correct 2 ms 12636 KB Output is correct
7 Correct 2 ms 12632 KB Output is correct
8 Correct 2 ms 12632 KB Output is correct
9 Correct 2 ms 12632 KB Output is correct
10 Correct 2 ms 12632 KB Output is correct
11 Correct 2 ms 12632 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 12632 KB Output is correct
2 Correct 2 ms 12632 KB Output is correct
3 Correct 2 ms 12632 KB Output is correct
4 Correct 2 ms 12632 KB Output is correct
5 Correct 2 ms 12632 KB Output is correct
6 Correct 2 ms 12636 KB Output is correct
7 Correct 2 ms 12632 KB Output is correct
8 Correct 2 ms 12632 KB Output is correct
9 Correct 2 ms 12632 KB Output is correct
10 Correct 2 ms 12632 KB Output is correct
11 Correct 2 ms 12632 KB Output is correct
12 Correct 2 ms 12632 KB Output is correct
13 Correct 2 ms 12888 KB Output is correct
14 Correct 2 ms 12632 KB Output is correct
15 Correct 2 ms 12632 KB Output is correct
16 Correct 2 ms 12632 KB Output is correct
17 Correct 2 ms 12636 KB Output is correct
18 Correct 2 ms 12632 KB Output is correct
19 Correct 3 ms 12632 KB Output is correct
20 Correct 3 ms 12888 KB Output is correct
21 Correct 3 ms 12636 KB Output is correct
22 Correct 2 ms 12632 KB Output is correct
23 Correct 2 ms 12632 KB Output is correct
24 Correct 2 ms 12632 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 12632 KB Output is correct
2 Correct 2 ms 12632 KB Output is correct
3 Correct 2 ms 12632 KB Output is correct
4 Correct 2 ms 12632 KB Output is correct
5 Correct 2 ms 12632 KB Output is correct
6 Correct 2 ms 12636 KB Output is correct
7 Correct 2 ms 12632 KB Output is correct
8 Correct 2 ms 12632 KB Output is correct
9 Correct 2 ms 12632 KB Output is correct
10 Correct 2 ms 12632 KB Output is correct
11 Correct 2 ms 12632 KB Output is correct
12 Correct 2 ms 12632 KB Output is correct
13 Correct 2 ms 12888 KB Output is correct
14 Correct 2 ms 12632 KB Output is correct
15 Correct 2 ms 12632 KB Output is correct
16 Correct 2 ms 12632 KB Output is correct
17 Correct 2 ms 12636 KB Output is correct
18 Correct 2 ms 12632 KB Output is correct
19 Correct 3 ms 12632 KB Output is correct
20 Correct 3 ms 12888 KB Output is correct
21 Correct 3 ms 12636 KB Output is correct
22 Correct 2 ms 12632 KB Output is correct
23 Correct 2 ms 12632 KB Output is correct
24 Correct 2 ms 12632 KB Output is correct
25 Correct 3 ms 12632 KB Output is correct
26 Correct 29 ms 13144 KB Output is correct
27 Correct 25 ms 13220 KB Output is correct
28 Correct 25 ms 13144 KB Output is correct
29 Correct 27 ms 13144 KB Output is correct
30 Correct 3 ms 13144 KB Output is correct
31 Correct 3 ms 13148 KB Output is correct
32 Correct 4 ms 13276 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 12632 KB Output is correct
2 Correct 2 ms 12632 KB Output is correct
3 Correct 2 ms 12632 KB Output is correct
4 Correct 2 ms 12632 KB Output is correct
5 Correct 2 ms 12632 KB Output is correct
6 Correct 2 ms 12632 KB Output is correct
7 Correct 2 ms 12632 KB Output is correct
8 Correct 2 ms 12636 KB Output is correct
9 Correct 2 ms 12632 KB Output is correct
10 Correct 2 ms 12636 KB Output is correct
11 Correct 2 ms 12792 KB Output is correct
12 Correct 2 ms 12984 KB Output is correct
13 Correct 2 ms 12628 KB Output is correct
14 Correct 2 ms 12632 KB Output is correct
15 Correct 2 ms 12632 KB Output is correct
16 Correct 2 ms 12632 KB Output is correct
17 Correct 2 ms 12632 KB Output is correct
18 Correct 2 ms 12632 KB Output is correct
19 Correct 2 ms 12632 KB Output is correct
20 Correct 2 ms 12748 KB Output is correct
21 Correct 2 ms 12888 KB Output is correct
22 Correct 3 ms 12748 KB Output is correct
23 Correct 2 ms 12632 KB Output is correct
24 Correct 2 ms 12636 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 12632 KB Output is correct
2 Correct 2 ms 12632 KB Output is correct
3 Correct 2 ms 12632 KB Output is correct
4 Correct 2 ms 12632 KB Output is correct
5 Correct 2 ms 12632 KB Output is correct
6 Correct 2 ms 12632 KB Output is correct
7 Correct 2 ms 12636 KB Output is correct
8 Correct 2 ms 12632 KB Output is correct
9 Correct 2 ms 12632 KB Output is correct
10 Correct 2 ms 12632 KB Output is correct
11 Correct 2 ms 12632 KB Output is correct
12 Correct 2 ms 12632 KB Output is correct
13 Correct 2 ms 12632 KB Output is correct
14 Correct 2 ms 12888 KB Output is correct
15 Correct 2 ms 12632 KB Output is correct
16 Correct 2 ms 12632 KB Output is correct
17 Correct 2 ms 12632 KB Output is correct
18 Correct 2 ms 12636 KB Output is correct
19 Correct 2 ms 12632 KB Output is correct
20 Correct 2 ms 12636 KB Output is correct
21 Correct 2 ms 12632 KB Output is correct
22 Correct 2 ms 12636 KB Output is correct
23 Correct 2 ms 12792 KB Output is correct
24 Correct 2 ms 12984 KB Output is correct
25 Correct 2 ms 12628 KB Output is correct
26 Correct 2 ms 12632 KB Output is correct
27 Correct 2 ms 12632 KB Output is correct
28 Correct 2 ms 12632 KB Output is correct
29 Correct 2 ms 12632 KB Output is correct
30 Correct 2 ms 12632 KB Output is correct
31 Correct 2 ms 12632 KB Output is correct
32 Correct 2 ms 12748 KB Output is correct
33 Correct 2 ms 12888 KB Output is correct
34 Correct 3 ms 12748 KB Output is correct
35 Correct 2 ms 12632 KB Output is correct
36 Correct 2 ms 12636 KB Output is correct
37 Correct 2 ms 12632 KB Output is correct
38 Correct 2 ms 12632 KB Output is correct
39 Correct 2 ms 12632 KB Output is correct
40 Correct 2 ms 12632 KB Output is correct
41 Correct 2 ms 12632 KB Output is correct
42 Correct 3 ms 12892 KB Output is correct
43 Correct 2 ms 12632 KB Output is correct
44 Correct 2 ms 12632 KB Output is correct
45 Correct 2 ms 12632 KB Output is correct
46 Correct 2 ms 12632 KB Output is correct
47 Correct 2 ms 12632 KB Output is correct
48 Correct 2 ms 12632 KB Output is correct
49 Correct 2 ms 12636 KB Output is correct
50 Correct 2 ms 12744 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 12632 KB Output is correct
2 Correct 2 ms 12632 KB Output is correct
3 Correct 2 ms 12632 KB Output is correct
4 Correct 2 ms 12632 KB Output is correct
5 Correct 2 ms 12632 KB Output is correct
6 Correct 2 ms 12632 KB Output is correct
7 Correct 2 ms 12636 KB Output is correct
8 Correct 2 ms 12632 KB Output is correct
9 Correct 2 ms 12632 KB Output is correct
10 Correct 2 ms 12632 KB Output is correct
11 Correct 2 ms 12632 KB Output is correct
12 Correct 2 ms 12632 KB Output is correct
13 Correct 2 ms 12632 KB Output is correct
14 Correct 2 ms 12888 KB Output is correct
15 Correct 2 ms 12632 KB Output is correct
16 Correct 2 ms 12632 KB Output is correct
17 Correct 2 ms 12632 KB Output is correct
18 Correct 2 ms 12636 KB Output is correct
19 Correct 2 ms 12632 KB Output is correct
20 Correct 3 ms 12632 KB Output is correct
21 Correct 3 ms 12888 KB Output is correct
22 Correct 3 ms 12636 KB Output is correct
23 Correct 2 ms 12632 KB Output is correct
24 Correct 2 ms 12632 KB Output is correct
25 Correct 2 ms 12632 KB Output is correct
26 Correct 2 ms 12632 KB Output is correct
27 Correct 2 ms 12636 KB Output is correct
28 Correct 2 ms 12632 KB Output is correct
29 Correct 2 ms 12636 KB Output is correct
30 Correct 2 ms 12792 KB Output is correct
31 Correct 2 ms 12984 KB Output is correct
32 Correct 2 ms 12628 KB Output is correct
33 Correct 2 ms 12632 KB Output is correct
34 Correct 2 ms 12632 KB Output is correct
35 Correct 2 ms 12632 KB Output is correct
36 Correct 2 ms 12632 KB Output is correct
37 Correct 2 ms 12632 KB Output is correct
38 Correct 2 ms 12632 KB Output is correct
39 Correct 2 ms 12748 KB Output is correct
40 Correct 2 ms 12888 KB Output is correct
41 Correct 3 ms 12748 KB Output is correct
42 Correct 2 ms 12632 KB Output is correct
43 Correct 2 ms 12636 KB Output is correct
44 Correct 2 ms 12632 KB Output is correct
45 Correct 2 ms 12632 KB Output is correct
46 Correct 2 ms 12632 KB Output is correct
47 Correct 2 ms 12632 KB Output is correct
48 Correct 2 ms 12632 KB Output is correct
49 Correct 3 ms 12892 KB Output is correct
50 Correct 2 ms 12632 KB Output is correct
51 Correct 2 ms 12632 KB Output is correct
52 Correct 2 ms 12632 KB Output is correct
53 Correct 2 ms 12632 KB Output is correct
54 Correct 2 ms 12632 KB Output is correct
55 Correct 2 ms 12632 KB Output is correct
56 Correct 2 ms 12636 KB Output is correct
57 Correct 2 ms 12744 KB Output is correct
58 Correct 2 ms 12632 KB Output is correct
59 Correct 2 ms 12632 KB Output is correct
60 Correct 2 ms 12632 KB Output is correct
61 Correct 3 ms 12632 KB Output is correct
62 Correct 2 ms 12632 KB Output is correct
63 Correct 3 ms 12632 KB Output is correct
64 Correct 3 ms 12632 KB Output is correct
65 Correct 3 ms 12632 KB Output is correct
66 Correct 3 ms 12632 KB Output is correct
67 Correct 2 ms 12632 KB Output is correct
68 Correct 3 ms 12632 KB Output is correct
69 Correct 3 ms 12632 KB Output is correct
70 Correct 2 ms 12888 KB Output is correct
71 Correct 2 ms 12632 KB Output is correct
72 Correct 3 ms 12632 KB Output is correct
73 Correct 3 ms 12632 KB Output is correct
74 Correct 3 ms 12632 KB Output is correct
75 Correct 3 ms 12888 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 12632 KB Output is correct
2 Correct 2 ms 12632 KB Output is correct
3 Correct 2 ms 12632 KB Output is correct
4 Correct 2 ms 12632 KB Output is correct
5 Correct 2 ms 12632 KB Output is correct
6 Correct 2 ms 12632 KB Output is correct
7 Correct 2 ms 12636 KB Output is correct
8 Correct 2 ms 12632 KB Output is correct
9 Correct 2 ms 12632 KB Output is correct
10 Correct 2 ms 12632 KB Output is correct
11 Correct 2 ms 12632 KB Output is correct
12 Correct 2 ms 12632 KB Output is correct
13 Correct 2 ms 12632 KB Output is correct
14 Correct 2 ms 12888 KB Output is correct
15 Correct 2 ms 12632 KB Output is correct
16 Correct 2 ms 12632 KB Output is correct
17 Correct 2 ms 12632 KB Output is correct
18 Correct 2 ms 12636 KB Output is correct
19 Correct 2 ms 12632 KB Output is correct
20 Correct 3 ms 12632 KB Output is correct
21 Correct 3 ms 12888 KB Output is correct
22 Correct 3 ms 12636 KB Output is correct
23 Correct 2 ms 12632 KB Output is correct
24 Correct 2 ms 12632 KB Output is correct
25 Correct 2 ms 12632 KB Output is correct
26 Correct 3 ms 12632 KB Output is correct
27 Correct 29 ms 13144 KB Output is correct
28 Correct 25 ms 13220 KB Output is correct
29 Correct 25 ms 13144 KB Output is correct
30 Correct 27 ms 13144 KB Output is correct
31 Correct 3 ms 13144 KB Output is correct
32 Correct 3 ms 13148 KB Output is correct
33 Correct 4 ms 13276 KB Output is correct
34 Correct 2 ms 12632 KB Output is correct
35 Correct 2 ms 12636 KB Output is correct
36 Correct 2 ms 12632 KB Output is correct
37 Correct 2 ms 12636 KB Output is correct
38 Correct 2 ms 12792 KB Output is correct
39 Correct 2 ms 12984 KB Output is correct
40 Correct 2 ms 12628 KB Output is correct
41 Correct 2 ms 12632 KB Output is correct
42 Correct 2 ms 12632 KB Output is correct
43 Correct 2 ms 12632 KB Output is correct
44 Correct 2 ms 12632 KB Output is correct
45 Correct 2 ms 12632 KB Output is correct
46 Correct 2 ms 12632 KB Output is correct
47 Correct 2 ms 12748 KB Output is correct
48 Correct 2 ms 12888 KB Output is correct
49 Correct 3 ms 12748 KB Output is correct
50 Correct 2 ms 12632 KB Output is correct
51 Correct 2 ms 12636 KB Output is correct
52 Correct 2 ms 12632 KB Output is correct
53 Correct 2 ms 12632 KB Output is correct
54 Correct 2 ms 12632 KB Output is correct
55 Correct 2 ms 12632 KB Output is correct
56 Correct 2 ms 12632 KB Output is correct
57 Correct 3 ms 12892 KB Output is correct
58 Correct 2 ms 12632 KB Output is correct
59 Correct 2 ms 12632 KB Output is correct
60 Correct 2 ms 12632 KB Output is correct
61 Correct 2 ms 12632 KB Output is correct
62 Correct 2 ms 12632 KB Output is correct
63 Correct 2 ms 12632 KB Output is correct
64 Correct 2 ms 12636 KB Output is correct
65 Correct 2 ms 12744 KB Output is correct
66 Correct 2 ms 12632 KB Output is correct
67 Correct 2 ms 12632 KB Output is correct
68 Correct 2 ms 12632 KB Output is correct
69 Correct 3 ms 12632 KB Output is correct
70 Correct 2 ms 12632 KB Output is correct
71 Correct 3 ms 12632 KB Output is correct
72 Correct 3 ms 12632 KB Output is correct
73 Correct 3 ms 12632 KB Output is correct
74 Correct 3 ms 12632 KB Output is correct
75 Correct 2 ms 12632 KB Output is correct
76 Correct 3 ms 12632 KB Output is correct
77 Correct 3 ms 12632 KB Output is correct
78 Correct 2 ms 12888 KB Output is correct
79 Correct 2 ms 12632 KB Output is correct
80 Correct 3 ms 12632 KB Output is correct
81 Correct 3 ms 12632 KB Output is correct
82 Correct 3 ms 12632 KB Output is correct
83 Correct 3 ms 12888 KB Output is correct
84 Correct 4 ms 12632 KB Output is correct
85 Correct 5 ms 12636 KB Output is correct
86 Correct 4 ms 12632 KB Output is correct
87 Correct 4 ms 12632 KB Output is correct
88 Correct 4 ms 12636 KB Output is correct
89 Correct 35 ms 13272 KB Output is correct
90 Correct 24 ms 12892 KB Output is correct
91 Correct 29 ms 12888 KB Output is correct
92 Correct 27 ms 12888 KB Output is correct
93 Correct 3 ms 12888 KB Output is correct
94 Correct 26 ms 13144 KB Output is correct
95 Correct 28 ms 13144 KB Output is correct
96 Correct 3 ms 13148 KB Output is correct
97 Correct 28 ms 13144 KB Output is correct
98 Correct 32 ms 12888 KB Output is correct
99 Correct 31 ms 12888 KB Output is correct
100 Correct 17 ms 12888 KB Output is correct
101 Correct 6 ms 12888 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 12632 KB Output is correct
2 Correct 2 ms 12632 KB Output is correct
3 Correct 2 ms 12632 KB Output is correct
4 Correct 2 ms 12632 KB Output is correct
5 Correct 2 ms 12632 KB Output is correct
6 Correct 2 ms 12632 KB Output is correct
7 Correct 2 ms 12636 KB Output is correct
8 Correct 2 ms 12632 KB Output is correct
9 Correct 2 ms 12632 KB Output is correct
10 Correct 2 ms 12632 KB Output is correct
11 Correct 2 ms 12632 KB Output is correct
12 Correct 2 ms 12632 KB Output is correct
13 Correct 2 ms 12632 KB Output is correct
14 Correct 2 ms 12888 KB Output is correct
15 Correct 2 ms 12632 KB Output is correct
16 Correct 2 ms 12632 KB Output is correct
17 Correct 2 ms 12632 KB Output is correct
18 Correct 2 ms 12636 KB Output is correct
19 Correct 2 ms 12632 KB Output is correct
20 Correct 3 ms 12632 KB Output is correct
21 Correct 3 ms 12888 KB Output is correct
22 Correct 3 ms 12636 KB Output is correct
23 Correct 2 ms 12632 KB Output is correct
24 Correct 2 ms 12632 KB Output is correct
25 Correct 2 ms 12632 KB Output is correct
26 Correct 3 ms 12632 KB Output is correct
27 Correct 29 ms 13144 KB Output is correct
28 Correct 25 ms 13220 KB Output is correct
29 Correct 25 ms 13144 KB Output is correct
30 Correct 27 ms 13144 KB Output is correct
31 Correct 3 ms 13144 KB Output is correct
32 Correct 3 ms 13148 KB Output is correct
33 Correct 4 ms 13276 KB Output is correct
34 Correct 2 ms 12632 KB Output is correct
35 Correct 2 ms 12636 KB Output is correct
36 Correct 2 ms 12632 KB Output is correct
37 Correct 2 ms 12636 KB Output is correct
38 Correct 2 ms 12792 KB Output is correct
39 Correct 2 ms 12984 KB Output is correct
40 Correct 2 ms 12628 KB Output is correct
41 Correct 2 ms 12632 KB Output is correct
42 Correct 2 ms 12632 KB Output is correct
43 Correct 2 ms 12632 KB Output is correct
44 Correct 2 ms 12632 KB Output is correct
45 Correct 2 ms 12632 KB Output is correct
46 Correct 2 ms 12632 KB Output is correct
47 Correct 2 ms 12748 KB Output is correct
48 Correct 2 ms 12888 KB Output is correct
49 Correct 3 ms 12748 KB Output is correct
50 Correct 2 ms 12632 KB Output is correct
51 Correct 2 ms 12636 KB Output is correct
52 Correct 2 ms 12632 KB Output is correct
53 Correct 2 ms 12632 KB Output is correct
54 Correct 2 ms 12632 KB Output is correct
55 Correct 2 ms 12632 KB Output is correct
56 Correct 2 ms 12632 KB Output is correct
57 Correct 3 ms 12892 KB Output is correct
58 Correct 2 ms 12632 KB Output is correct
59 Correct 2 ms 12632 KB Output is correct
60 Correct 2 ms 12632 KB Output is correct
61 Correct 2 ms 12632 KB Output is correct
62 Correct 2 ms 12632 KB Output is correct
63 Correct 2 ms 12632 KB Output is correct
64 Correct 2 ms 12636 KB Output is correct
65 Correct 2 ms 12744 KB Output is correct
66 Correct 2 ms 12632 KB Output is correct
67 Correct 2 ms 12632 KB Output is correct
68 Correct 2 ms 12632 KB Output is correct
69 Correct 3 ms 12632 KB Output is correct
70 Correct 2 ms 12632 KB Output is correct
71 Correct 3 ms 12632 KB Output is correct
72 Correct 3 ms 12632 KB Output is correct
73 Correct 3 ms 12632 KB Output is correct
74 Correct 3 ms 12632 KB Output is correct
75 Correct 2 ms 12632 KB Output is correct
76 Correct 3 ms 12632 KB Output is correct
77 Correct 3 ms 12632 KB Output is correct
78 Correct 2 ms 12888 KB Output is correct
79 Correct 2 ms 12632 KB Output is correct
80 Correct 3 ms 12632 KB Output is correct
81 Correct 3 ms 12632 KB Output is correct
82 Correct 3 ms 12632 KB Output is correct
83 Correct 3 ms 12888 KB Output is correct
84 Correct 4 ms 12632 KB Output is correct
85 Correct 5 ms 12636 KB Output is correct
86 Correct 4 ms 12632 KB Output is correct
87 Correct 4 ms 12632 KB Output is correct
88 Correct 4 ms 12636 KB Output is correct
89 Correct 35 ms 13272 KB Output is correct
90 Correct 24 ms 12892 KB Output is correct
91 Correct 29 ms 12888 KB Output is correct
92 Correct 27 ms 12888 KB Output is correct
93 Correct 3 ms 12888 KB Output is correct
94 Correct 26 ms 13144 KB Output is correct
95 Correct 28 ms 13144 KB Output is correct
96 Correct 3 ms 13148 KB Output is correct
97 Correct 28 ms 13144 KB Output is correct
98 Correct 32 ms 12888 KB Output is correct
99 Correct 31 ms 12888 KB Output is correct
100 Correct 17 ms 12888 KB Output is correct
101 Correct 6 ms 12888 KB Output is correct
102 Correct 113 ms 17692 KB Output is correct
103 Correct 266 ms 17492 KB Output is correct
104 Execution timed out 1049 ms 44260 KB Time limit exceeded
105 Halted 0 ms 0 KB -