Submission #897669

# Submission time Handle Problem Language Result Execution time Memory
897669 2024-01-03T14:27:26 Z ErJ Closing Time (IOI23_closing) C++17
75 / 100
1000 ms 2097152 KB
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define vi vector<ll>
#define vvi vector<vector<ll>>
#define vs vector<string>
#define vc vector<char>
#define vb vector<bool>
#define vp vector<pair<ll, ll>>
#define pp pair<ll, ll>
#define qi queue<ll>
#define qp queue<pp>
#define pqi priority_queue<ll>
#define pqp priority_queue<pp>
#define mi map<ll, ll>
#define mpi map<pp, ll>
#define mip map<ll, pp>
#define mpp map<pp, pp>
#define mb map<ll, bool>
#define si set<ll>
#define sp set<pp>
#define mod 1000000007
#define rep(a, b) for(int a = 0; a < (b); a++)
#define rep2(a, b) for(int a = 1; a < (b); a++)
#define inf 1000000000000000000


int max_score(int N, int X, int Y, ll K, vector<int> U, vector<int>  V, vector<int> W) {
    vector<ll> distX(N);
    vector<ll> distY(N);
    vector<ll> distXY(N);
    vector<ll> distXY2(N), distXY3(N);
    distX[X] = 0;
    distX[Y] = 0;
    vector<vp> edges(N);
    rep(i, U.size()) {
        edges[U[i]].push_back({ V[i], W[i] });
        edges[V[i]].push_back({ U[i], W[i] });
    }
    queue<int> q;
    vb was(N);
    rep(i, N) was[i] = false;
    q.push(X);
    vector<int> from(N);
    from[X] = -1;
    while (!q.empty()) {
        ll u = q.front();
        was[u] = true;
        q.pop();
        for (int i = 0; i < edges[u].size(); i++) {
            ll v = edges[u][i].first;
            ll dw = edges[u][i].second;
            if (!was[v]) {
                q.push(v);
                from[v] = u;
                distX[v] = distX[u] + dw;
            }
        }
    }
    rep(i, N) was[i] = false;
    queue<int> q2;
    q2.push(Y);
    while (!q2.empty()) {
        ll u = q2.front();
        was[u] = true;
        q2.pop();
        for (int i = 0; i < edges[u].size(); i++) {
            ll v = edges[u][i].first;
            ll dw = edges[u][i].second;
            if (!was[v]) {
                q2.push(v);
                distY[v] = distY[u] + dw;
            }
        }
    }
    vector<bool> mainLine(N);
    rep(i, N) mainLine[i] = false;
    int akt = Y;
    while (akt != -1) {
        mainLine[akt] = true;
        akt = from[akt];
    }

    for (int i = 0; i < N; i++) {
        distXY[i] = max(distX[i], distY[i]);
        distXY2[i] = min(distX[i], distY[i]);
        distXY3[i] = distXY2[i];
    }
    sort(distXY3.begin(), distXY3.end());
    ll anslvl1 = 0;
    ll sum = 0;
    rep(i, distXY3.size()) {
        sum += distXY3[i];
        if (sum <= K) {
            anslvl1++;
        }
    }  
    vvi dp(N + 1);
    dp[0].resize(2*N + 1);
    for (int i = 0; i < 2 * N + 1; i++) {
        dp[0][i] = inf;
    }
    dp[0][0] = 0;
    for (int i = 1; i < dp.size(); i++) {
        dp[i].resize(2 * N + 1);
        if (!mainLine[i-1]) {
            for (int j = 0; j < 2 * N + 1; j++) {
                dp[i][j] = dp[i - 1][j];
            }
        }
        else {
            for (int j = 0; j < 2 * N + 1; j++) {
                dp[i][j] = inf;
            }
        }
        for (int j = 0; j < 2 * N + 1; j++) {
            if (dp[i - 1][j] != inf) {
                dp[i][j + 1] = min(dp[i][j + 1], dp[i - 1][j] + distXY2[i - 1]);
                dp[i][j + 2] = min(dp[i][j + 2], dp[i - 1][j] + distXY[i - 1]);
            }
        }
    }
    ll ans = 0;
    for (int i = 2 * N; i >= 0; i--) {
        if (dp[N][i] <= K) {
            ans = i;
            break;
        }
    }
    return max(ans, anslvl1);
}

Compilation message

closing.cpp: In function 'int max_score(int, int, int, long long int, std::vector<int>, std::vector<int>, std::vector<int>)':
closing.cpp:24:36: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 | #define rep(a, b) for(int a = 0; a < (b); a++)
      |                                    ^
closing.cpp:37:5: note: in expansion of macro 'rep'
   37 |     rep(i, U.size()) {
      |     ^~~
closing.cpp:51:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   51 |         for (int i = 0; i < edges[u].size(); i++) {
      |                         ~~^~~~~~~~~~~~~~~~~
closing.cpp:68:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   68 |         for (int i = 0; i < edges[u].size(); i++) {
      |                         ~~^~~~~~~~~~~~~~~~~
closing.cpp:24:36: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 | #define rep(a, b) for(int a = 0; a < (b); a++)
      |                                    ^
closing.cpp:93:5: note: in expansion of macro 'rep'
   93 |     rep(i, distXY3.size()) {
      |     ^~~
closing.cpp:105:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  105 |     for (int i = 1; i < dp.size(); i++) {
      |                     ~~^~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 1118 ms 1760168 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 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 1 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 344 KB Output is correct
11 Correct 0 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 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 1 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 344 KB Output is correct
11 Correct 0 ms 344 KB Output is correct
12 Correct 1 ms 600 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 0 ms 572 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 1 ms 344 KB Output is correct
19 Correct 3 ms 4184 KB Output is correct
20 Correct 3 ms 3768 KB Output is correct
21 Correct 2 ms 3932 KB Output is correct
22 Correct 3 ms 4188 KB Output is correct
23 Correct 3 ms 4188 KB Output is correct
24 Correct 3 ms 4188 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 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 1 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 344 KB Output is correct
11 Correct 0 ms 344 KB Output is correct
12 Correct 1 ms 600 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 0 ms 572 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 1 ms 344 KB Output is correct
19 Correct 3 ms 4184 KB Output is correct
20 Correct 3 ms 3768 KB Output is correct
21 Correct 2 ms 3932 KB Output is correct
22 Correct 3 ms 4188 KB Output is correct
23 Correct 3 ms 4188 KB Output is correct
24 Correct 3 ms 4188 KB Output is correct
25 Correct 2 ms 348 KB Output is correct
26 Correct 90 ms 141868 KB Output is correct
27 Correct 78 ms 122588 KB Output is correct
28 Correct 70 ms 124240 KB Output is correct
29 Correct 82 ms 134480 KB Output is correct
30 Correct 77 ms 121492 KB Output is correct
31 Correct 79 ms 141772 KB Output is correct
32 Correct 83 ms 141804 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 1 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 344 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 1 ms 344 KB Output is correct
10 Correct 0 ms 436 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 436 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 428 KB Output is correct
16 Correct 0 ms 344 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 0 ms 348 KB Output is correct
22 Correct 0 ms 344 KB Output is correct
23 Correct 0 ms 440 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 348 KB Output is correct
3 Correct 1 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 1 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 344 KB Output is correct
13 Correct 1 ms 600 KB Output is correct
14 Correct 0 ms 344 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 572 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 344 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 1 ms 344 KB Output is correct
22 Correct 0 ms 436 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 436 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 428 KB Output is correct
28 Correct 0 ms 344 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 0 ms 348 KB Output is correct
34 Correct 0 ms 344 KB Output is correct
35 Correct 0 ms 440 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 352 KB Output is correct
38 Correct 1 ms 592 KB Output is correct
39 Correct 0 ms 352 KB Output is correct
40 Correct 0 ms 352 KB Output is correct
41 Correct 1 ms 608 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 0 ms 352 KB Output is correct
44 Correct 0 ms 352 KB Output is correct
45 Correct 1 ms 608 KB Output is correct
46 Correct 0 ms 352 KB Output is correct
47 Correct 0 ms 436 KB Output is correct
48 Correct 1 ms 352 KB Output is correct
49 Correct 1 ms 352 KB Output is correct
50 Correct 0 ms 352 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 1 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 1 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 344 KB Output is correct
13 Correct 1 ms 600 KB Output is correct
14 Correct 0 ms 344 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 572 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 1 ms 344 KB Output is correct
20 Correct 3 ms 4184 KB Output is correct
21 Correct 3 ms 3768 KB Output is correct
22 Correct 2 ms 3932 KB Output is correct
23 Correct 3 ms 4188 KB Output is correct
24 Correct 3 ms 4188 KB Output is correct
25 Correct 3 ms 4188 KB Output is correct
26 Correct 0 ms 344 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 1 ms 344 KB Output is correct
29 Correct 0 ms 436 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 ms 436 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 428 KB Output is correct
35 Correct 0 ms 344 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 0 ms 348 KB Output is correct
41 Correct 0 ms 344 KB Output is correct
42 Correct 0 ms 440 KB Output is correct
43 Correct 0 ms 348 KB Output is correct
44 Correct 0 ms 352 KB Output is correct
45 Correct 1 ms 592 KB Output is correct
46 Correct 0 ms 352 KB Output is correct
47 Correct 0 ms 352 KB Output is correct
48 Correct 1 ms 608 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 0 ms 352 KB Output is correct
51 Correct 0 ms 352 KB Output is correct
52 Correct 1 ms 608 KB Output is correct
53 Correct 0 ms 352 KB Output is correct
54 Correct 0 ms 436 KB Output is correct
55 Correct 1 ms 352 KB Output is correct
56 Correct 1 ms 352 KB Output is correct
57 Correct 0 ms 352 KB Output is correct
58 Correct 1 ms 352 KB Output is correct
59 Correct 1 ms 588 KB Output is correct
60 Correct 1 ms 608 KB Output is correct
61 Correct 1 ms 744 KB Output is correct
62 Correct 2 ms 652 KB Output is correct
63 Correct 3 ms 4280 KB Output is correct
64 Correct 2 ms 4188 KB Output is correct
65 Correct 2 ms 3680 KB Output is correct
66 Correct 3 ms 3932 KB Output is correct
67 Correct 3 ms 4192 KB Output is correct
68 Correct 2 ms 3680 KB Output is correct
69 Correct 3 ms 4192 KB Output is correct
70 Correct 2 ms 4024 KB Output is correct
71 Correct 3 ms 3932 KB Output is correct
72 Correct 3 ms 4024 KB Output is correct
73 Correct 2 ms 2656 KB Output is correct
74 Correct 2 ms 3168 KB Output is correct
75 Correct 1 ms 608 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 1 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 1 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 344 KB Output is correct
13 Correct 1 ms 600 KB Output is correct
14 Correct 0 ms 344 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 572 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 1 ms 344 KB Output is correct
20 Correct 3 ms 4184 KB Output is correct
21 Correct 3 ms 3768 KB Output is correct
22 Correct 2 ms 3932 KB Output is correct
23 Correct 3 ms 4188 KB Output is correct
24 Correct 3 ms 4188 KB Output is correct
25 Correct 3 ms 4188 KB Output is correct
26 Correct 2 ms 348 KB Output is correct
27 Correct 90 ms 141868 KB Output is correct
28 Correct 78 ms 122588 KB Output is correct
29 Correct 70 ms 124240 KB Output is correct
30 Correct 82 ms 134480 KB Output is correct
31 Correct 77 ms 121492 KB Output is correct
32 Correct 79 ms 141772 KB Output is correct
33 Correct 83 ms 141804 KB Output is correct
34 Correct 0 ms 344 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 1 ms 344 KB Output is correct
37 Correct 0 ms 436 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 436 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 428 KB Output is correct
43 Correct 0 ms 344 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 348 KB Output is correct
49 Correct 0 ms 344 KB Output is correct
50 Correct 0 ms 440 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 352 KB Output is correct
53 Correct 1 ms 592 KB Output is correct
54 Correct 0 ms 352 KB Output is correct
55 Correct 0 ms 352 KB Output is correct
56 Correct 1 ms 608 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 0 ms 352 KB Output is correct
59 Correct 0 ms 352 KB Output is correct
60 Correct 1 ms 608 KB Output is correct
61 Correct 0 ms 352 KB Output is correct
62 Correct 0 ms 436 KB Output is correct
63 Correct 1 ms 352 KB Output is correct
64 Correct 1 ms 352 KB Output is correct
65 Correct 0 ms 352 KB Output is correct
66 Correct 1 ms 352 KB Output is correct
67 Correct 1 ms 588 KB Output is correct
68 Correct 1 ms 608 KB Output is correct
69 Correct 1 ms 744 KB Output is correct
70 Correct 2 ms 652 KB Output is correct
71 Correct 3 ms 4280 KB Output is correct
72 Correct 2 ms 4188 KB Output is correct
73 Correct 2 ms 3680 KB Output is correct
74 Correct 3 ms 3932 KB Output is correct
75 Correct 3 ms 4192 KB Output is correct
76 Correct 2 ms 3680 KB Output is correct
77 Correct 3 ms 4192 KB Output is correct
78 Correct 2 ms 4024 KB Output is correct
79 Correct 3 ms 3932 KB Output is correct
80 Correct 3 ms 4024 KB Output is correct
81 Correct 2 ms 2656 KB Output is correct
82 Correct 2 ms 3168 KB Output is correct
83 Correct 1 ms 608 KB Output is correct
84 Correct 2 ms 600 KB Output is correct
85 Correct 7 ms 1628 KB Output is correct
86 Correct 3 ms 684 KB Output is correct
87 Correct 5 ms 868 KB Output is correct
88 Correct 4 ms 880 KB Output is correct
89 Correct 88 ms 141908 KB Output is correct
90 Correct 72 ms 116216 KB Output is correct
91 Correct 92 ms 140604 KB Output is correct
92 Correct 76 ms 122092 KB Output is correct
93 Correct 82 ms 124640 KB Output is correct
94 Correct 79 ms 128536 KB Output is correct
95 Correct 77 ms 134932 KB Output is correct
96 Correct 70 ms 118100 KB Output is correct
97 Correct 82 ms 134148 KB Output is correct
98 Correct 87 ms 130644 KB Output is correct
99 Correct 88 ms 141860 KB Output is correct
100 Correct 48 ms 68608 KB Output is correct
101 Correct 10 ms 4408 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 1 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 1 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 344 KB Output is correct
13 Correct 1 ms 600 KB Output is correct
14 Correct 0 ms 344 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 572 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 1 ms 344 KB Output is correct
20 Correct 3 ms 4184 KB Output is correct
21 Correct 3 ms 3768 KB Output is correct
22 Correct 2 ms 3932 KB Output is correct
23 Correct 3 ms 4188 KB Output is correct
24 Correct 3 ms 4188 KB Output is correct
25 Correct 3 ms 4188 KB Output is correct
26 Correct 2 ms 348 KB Output is correct
27 Correct 90 ms 141868 KB Output is correct
28 Correct 78 ms 122588 KB Output is correct
29 Correct 70 ms 124240 KB Output is correct
30 Correct 82 ms 134480 KB Output is correct
31 Correct 77 ms 121492 KB Output is correct
32 Correct 79 ms 141772 KB Output is correct
33 Correct 83 ms 141804 KB Output is correct
34 Correct 0 ms 344 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 1 ms 344 KB Output is correct
37 Correct 0 ms 436 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 436 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 428 KB Output is correct
43 Correct 0 ms 344 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 348 KB Output is correct
49 Correct 0 ms 344 KB Output is correct
50 Correct 0 ms 440 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 352 KB Output is correct
53 Correct 1 ms 592 KB Output is correct
54 Correct 0 ms 352 KB Output is correct
55 Correct 0 ms 352 KB Output is correct
56 Correct 1 ms 608 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 0 ms 352 KB Output is correct
59 Correct 0 ms 352 KB Output is correct
60 Correct 1 ms 608 KB Output is correct
61 Correct 0 ms 352 KB Output is correct
62 Correct 0 ms 436 KB Output is correct
63 Correct 1 ms 352 KB Output is correct
64 Correct 1 ms 352 KB Output is correct
65 Correct 0 ms 352 KB Output is correct
66 Correct 1 ms 352 KB Output is correct
67 Correct 1 ms 588 KB Output is correct
68 Correct 1 ms 608 KB Output is correct
69 Correct 1 ms 744 KB Output is correct
70 Correct 2 ms 652 KB Output is correct
71 Correct 3 ms 4280 KB Output is correct
72 Correct 2 ms 4188 KB Output is correct
73 Correct 2 ms 3680 KB Output is correct
74 Correct 3 ms 3932 KB Output is correct
75 Correct 3 ms 4192 KB Output is correct
76 Correct 2 ms 3680 KB Output is correct
77 Correct 3 ms 4192 KB Output is correct
78 Correct 2 ms 4024 KB Output is correct
79 Correct 3 ms 3932 KB Output is correct
80 Correct 3 ms 4024 KB Output is correct
81 Correct 2 ms 2656 KB Output is correct
82 Correct 2 ms 3168 KB Output is correct
83 Correct 1 ms 608 KB Output is correct
84 Correct 2 ms 600 KB Output is correct
85 Correct 7 ms 1628 KB Output is correct
86 Correct 3 ms 684 KB Output is correct
87 Correct 5 ms 868 KB Output is correct
88 Correct 4 ms 880 KB Output is correct
89 Correct 88 ms 141908 KB Output is correct
90 Correct 72 ms 116216 KB Output is correct
91 Correct 92 ms 140604 KB Output is correct
92 Correct 76 ms 122092 KB Output is correct
93 Correct 82 ms 124640 KB Output is correct
94 Correct 79 ms 128536 KB Output is correct
95 Correct 77 ms 134932 KB Output is correct
96 Correct 70 ms 118100 KB Output is correct
97 Correct 82 ms 134148 KB Output is correct
98 Correct 87 ms 130644 KB Output is correct
99 Correct 88 ms 141860 KB Output is correct
100 Correct 48 ms 68608 KB Output is correct
101 Correct 10 ms 4408 KB Output is correct
102 Correct 164 ms 5716 KB Output is correct
103 Correct 619 ms 8328 KB Output is correct
104 Execution timed out 1121 ms 2097152 KB Time limit exceeded
105 Halted 0 ms 0 KB -