답안 #860605

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
860605 2023-10-13T13:57:10 Z E869120 Uplifting Excursion (BOI22_vault) C++14
40 / 100
5000 ms 177856 KB
#include <bits/stdc++.h>
using namespace std;

long long gcd(long long a, long long b) {
    if (b == 0) return a;
    return gcd(b, a % b);
}

vector<long long> SolveDP(long long N, long long LIM, vector<long long> List, vector<long long> Init) {
    vector<long long> dp(LIM + 1, -(1LL << 60));
    if (Init.size() == 0) dp[0] = 0;
    else {
        for (int i = 0; i < (int)Init.size(); i++) dp[i] = Init[i];
    }

    // DP Start
    for (int i = 0; i < N; i++) {
        vector<long long> ndp(LIM + 1, -(1LL << 60));
        long long kazu = i + 1;
        for (int j = 0; j < kazu; j++) {
            vector<pair<long long, long long>> maxi;
            int cur = 0;
            for (int k = j; k <= LIM; k += kazu) {
                long long val = dp[k] - (k / kazu);
                while (maxi.size() >= cur + 1) {
                    if (maxi[maxi.size() - 1].second <= val) maxi.pop_back();
                    else break;
                }
                maxi.push_back(make_pair(1LL * k, val));
                if (maxi[cur].second >= -(1LL << 59)) ndp[k] = maxi[cur].second + (k / kazu);
                while (cur < (int)maxi.size() && maxi[cur].first <= k - 1LL * kazu * List[i]) cur += 1;
            }
        }
        dp = ndp;
    }

    // Return
    return dp;
}

void Solve_Subtask2(long long M, long long L, vector<long long> A) {
    // Step 1. Calculate
    vector<long long> A1;
    vector<long long> A2;
    for (int i = M - 1; i >= 0; i--) A1.push_back(A[i]);
    for (int i = M + 1; i <= 2 * M; i++) A2.push_back(A[i]);
    vector<long long> DP1 = SolveDP(M, 700000, A1, vector<long long>{});
    vector<long long> DP2 = SolveDP(M, 700000, A2, vector<long long>{});

    // Step 2. Output
    long long Answer = -(1LL << 60);
    for (long long i = 0; i <= 700000LL - abs(L); i++) {
        long long idx1 = i;
        long long idx2 = i + abs(L); if (L < 0) swap(idx1, idx2);
        Answer = max(Answer, DP1[idx1] + DP2[idx2]);
    }
    if (Answer < 0LL) cout << "impossible" << endl;
    else cout << Answer + A[M] << endl;
}

void Solve_Subtask3(long long M, long long L, vector<long long> A) {
    long long Baseln = 2LL * M * M * M;
    long long Border = 2LL * M * M;
    vector<long long> L1(M + 1, 0);
    vector<long long> L2(M + 1, 0);
    vector<long long> L3(M, 0);
    vector<long long> L4(M, 0);
    vector<long long> M1(M + 1, 0);
    vector<long long> M2(M + 1, 0);
    vector<pair<long long, long long>> Cand1; Cand1.push_back(make_pair(0, 0));
    vector<pair<long long, long long>> Cand2; Cand2.push_back(make_pair(0, 0));

    // Step 1. Set Up
    for (int i = 0; i <= M - 1; i++) {
        int idx = M - i;
        long long Threshold = Border / idx;
        L1[idx - 0] = A[i] - min(A[i], Threshold);
        L3[idx - 1] = min(A[i], Threshold);
    }
    for (int i = M + 1; i <= 2 * M; i++) {
        int idx = i - M;
        long long Threshold = Border / idx;
        L2[idx - 0] = A[i] - min(A[i], Threshold);
        L4[idx - 1] = min(A[i], Threshold);
    }

    // Step 2. Base DP
    vector<long long> dp1 = SolveDP(M, Baseln, L3, vector<long long>{});
    vector<long long> dp2 = vector<long long>(Baseln + 1, -(1LL << 60));
    for (int i = 0; i <= Baseln; i++) dp2[Baseln - i] = dp1[i];
    vector<long long> dp3 = SolveDP(M, Baseln * 2, L4, dp2);

    // Step 3. Get Theoritical Value
    long long a1 = 0;
    long long a2 = 0;
    for (int i = 1; i <= M; i++) a1 += 1LL * i * L1[i];
    for (int i = 1; i <= M; i++) a2 += 1LL * i * L2[i];
    if (a2 - a1 > L) a2 = a1 + L;
    else a1 = a2 - L;
    if (a1 + Baseln < 0 || a2 + Baseln < 0) {
        cout << "impossible" << endl;
        return;
    }

    // Step 4. Get Candiates for L1
    long long rem1 = a1 + Baseln;
    long long cnt1 = 0;
    for (int i = 1; i <= M; i++) {
        M1[i] = min(L1[i], rem1 / i);
        rem1 -= 1LL * i * M1[i];
        cnt1 += M1[i];
    }
    for (int i = M; i >= 1; i--) {
        for (long long j = 0; j < M1[i]; j++) {
            rem1 += 1LL * i;
            cnt1 -= 1LL;
            if (rem1 > 2LL * Baseln) break;
            Cand1.push_back(make_pair((a1 + Baseln) - rem1, cnt1));
        }
        if (rem1 > 2LL * Baseln) break;
    }

    // Step 5. Get Candidates for L2
    long long rem2 = a2 + Baseln;
    long long cnt2 = 0;
    for (int i = 1; i <= M; i++) {
        M2[i] = min(L2[i], rem2 / i);
        rem2 -= 1LL * i * M2[i];
        cnt2 += M2[i];
    }
    for (int i = M; i >= 1; i--) {
        for (long long j = 0; j < M2[i]; j++) {
            rem2 += 1LL * i;
            cnt2 -= 1LL;
            if (rem2 > 2LL * Baseln) break;
            Cand2.push_back(make_pair((a2 + Baseln) - rem2, cnt2));
        }
        if (rem2 > 2LL * Baseln) break;
    }
    // cout << "L1 = "; for (int i = 1; i <= M; i++) cout << L1[i] << " "; cout << endl;
    // cout << "L2 = "; for (int i = 1; i <= M; i++) cout << L2[i] << " "; cout << endl;
    // cout << "Cand1 = "; for (int i = 0; i < Cand1.size(); i++) cout << "(" << Cand1[i].first << "," << Cand1[i].second << ") "; cout << endl;
    // cout << "Cand2 = "; for (int i = 0; i < Cand2.size(); i++) cout << "(" << Cand2[i].first << "," << Cand2[i].second << ") "; cout << endl;

    // Step 6. Brute Force
    long long Answer = -(1LL << 60);
    for (pair<long long, long long> v1 : Cand1) {
        for (pair<long long, long long> v2 : Cand2) {
            long long diff = L - (v2.first - v1.first);
            if (diff < -Baseln || diff > Baseln) continue;
            if (dp3[diff + Baseln] == -(1LL << 60)) continue;
            Answer = max(Answer, v1.second + v2.second + dp3[diff + Baseln]);
        }
    }

    // Step 7. Output
    if (Answer == -(1LL << 60)) cout << "impossible" << endl;
    else cout << Answer + A[M] << endl;
}

int main() {
    // Input
    long long M, L;
    cin >> M >> L;
    vector<long long> A(2 * M + 1, 0);
    for (int i = 0; i <= 2 * M; i++) cin >> A[i];

    // Judge if Subtask 2
    bool Subtask2 = true;
    if (M > 100) Subtask2 = false;
    for (int i = 0; i <= 2 * M; i++) {
        if (A[i] > 100) Subtask2 = false;
    }

    // Execution
    if (Subtask2 == true) Solve_Subtask2(M, L, A);
    else Solve_Subtask3(M, L, A);
    return 0;
}

Compilation message

vault.cpp: In function 'std::vector<long long int> SolveDP(long long int, long long int, std::vector<long long int>, std::vector<long long int>)':
vault.cpp:25:36: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   25 |                 while (maxi.size() >= cur + 1) {
      |                        ~~~~~~~~~~~~^~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 51 ms 45072 KB Output is correct
2 Correct 71 ms 45732 KB Output is correct
3 Correct 33 ms 44908 KB Output is correct
4 Correct 195 ms 44708 KB Output is correct
5 Correct 833 ms 44548 KB Output is correct
6 Correct 817 ms 45464 KB Output is correct
7 Correct 876 ms 44220 KB Output is correct
8 Correct 823 ms 47664 KB Output is correct
9 Correct 798 ms 45448 KB Output is correct
10 Correct 884 ms 44204 KB Output is correct
11 Correct 898 ms 45348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 51 ms 45072 KB Output is correct
2 Correct 71 ms 45732 KB Output is correct
3 Correct 33 ms 44908 KB Output is correct
4 Correct 195 ms 44708 KB Output is correct
5 Correct 833 ms 44548 KB Output is correct
6 Correct 817 ms 45464 KB Output is correct
7 Correct 876 ms 44220 KB Output is correct
8 Correct 823 ms 47664 KB Output is correct
9 Correct 798 ms 45448 KB Output is correct
10 Correct 884 ms 44204 KB Output is correct
11 Correct 898 ms 45348 KB Output is correct
12 Correct 52 ms 44472 KB Output is correct
13 Correct 73 ms 44760 KB Output is correct
14 Correct 33 ms 46136 KB Output is correct
15 Correct 193 ms 45064 KB Output is correct
16 Correct 835 ms 45104 KB Output is correct
17 Correct 813 ms 45020 KB Output is correct
18 Correct 848 ms 44256 KB Output is correct
19 Correct 814 ms 47712 KB Output is correct
20 Correct 843 ms 45776 KB Output is correct
21 Correct 891 ms 44972 KB Output is correct
22 Correct 891 ms 46004 KB Output is correct
23 Correct 1606 ms 44992 KB Output is correct
24 Correct 1681 ms 44896 KB Output is correct
25 Correct 1722 ms 44268 KB Output is correct
26 Correct 1628 ms 45212 KB Output is correct
27 Correct 1621 ms 46240 KB Output is correct
28 Correct 1748 ms 45460 KB Output is correct
29 Correct 1765 ms 45240 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 193 ms 45096 KB Output is correct
2 Correct 64 ms 6352 KB Output is correct
3 Correct 64 ms 6352 KB Output is correct
4 Correct 63 ms 6344 KB Output is correct
5 Correct 59 ms 6364 KB Output is correct
6 Correct 60 ms 6356 KB Output is correct
7 Correct 65 ms 6364 KB Output is correct
8 Correct 65 ms 6360 KB Output is correct
9 Correct 60 ms 6364 KB Output is correct
10 Correct 60 ms 6352 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 193 ms 45096 KB Output is correct
2 Correct 64 ms 6352 KB Output is correct
3 Correct 64 ms 6352 KB Output is correct
4 Correct 63 ms 6344 KB Output is correct
5 Correct 59 ms 6364 KB Output is correct
6 Correct 60 ms 6356 KB Output is correct
7 Correct 65 ms 6364 KB Output is correct
8 Correct 65 ms 6360 KB Output is correct
9 Correct 60 ms 6364 KB Output is correct
10 Correct 60 ms 6352 KB Output is correct
11 Correct 53 ms 44828 KB Output is correct
12 Correct 73 ms 47548 KB Output is correct
13 Correct 32 ms 44592 KB Output is correct
14 Correct 196 ms 44320 KB Output is correct
15 Correct 60 ms 6616 KB Output is correct
16 Correct 65 ms 6364 KB Output is correct
17 Correct 62 ms 6364 KB Output is correct
18 Correct 59 ms 7448 KB Output is correct
19 Correct 61 ms 6352 KB Output is correct
20 Correct 63 ms 6364 KB Output is correct
21 Correct 62 ms 6364 KB Output is correct
22 Correct 64 ms 6364 KB Output is correct
23 Correct 60 ms 6364 KB Output is correct
24 Incorrect 63 ms 6352 KB Output isn't correct
25 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 193 ms 45096 KB Output is correct
2 Correct 64 ms 6352 KB Output is correct
3 Correct 64 ms 6352 KB Output is correct
4 Correct 63 ms 6344 KB Output is correct
5 Correct 59 ms 6364 KB Output is correct
6 Correct 60 ms 6356 KB Output is correct
7 Correct 65 ms 6364 KB Output is correct
8 Correct 65 ms 6360 KB Output is correct
9 Correct 60 ms 6364 KB Output is correct
10 Correct 60 ms 6352 KB Output is correct
11 Correct 191 ms 44252 KB Output is correct
12 Correct 59 ms 6364 KB Output is correct
13 Correct 61 ms 6352 KB Output is correct
14 Correct 59 ms 6352 KB Output is correct
15 Correct 58 ms 6260 KB Output is correct
16 Correct 59 ms 6352 KB Output is correct
17 Correct 62 ms 6360 KB Output is correct
18 Correct 64 ms 6352 KB Output is correct
19 Correct 63 ms 6360 KB Output is correct
20 Correct 60 ms 6356 KB Output is correct
21 Correct 908 ms 46224 KB Output is correct
22 Correct 888 ms 45308 KB Output is correct
23 Correct 449 ms 28072 KB Output is correct
24 Correct 455 ms 28360 KB Output is correct
25 Correct 437 ms 26444 KB Output is correct
26 Correct 446 ms 26824 KB Output is correct
27 Correct 455 ms 28100 KB Output is correct
28 Correct 467 ms 26432 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 51 ms 45072 KB Output is correct
2 Correct 71 ms 45732 KB Output is correct
3 Correct 33 ms 44908 KB Output is correct
4 Correct 195 ms 44708 KB Output is correct
5 Correct 833 ms 44548 KB Output is correct
6 Correct 817 ms 45464 KB Output is correct
7 Correct 876 ms 44220 KB Output is correct
8 Correct 823 ms 47664 KB Output is correct
9 Correct 798 ms 45448 KB Output is correct
10 Correct 884 ms 44204 KB Output is correct
11 Correct 898 ms 45348 KB Output is correct
12 Correct 193 ms 45096 KB Output is correct
13 Correct 64 ms 6352 KB Output is correct
14 Correct 64 ms 6352 KB Output is correct
15 Correct 63 ms 6344 KB Output is correct
16 Correct 59 ms 6364 KB Output is correct
17 Correct 60 ms 6356 KB Output is correct
18 Correct 65 ms 6364 KB Output is correct
19 Correct 65 ms 6360 KB Output is correct
20 Correct 60 ms 6364 KB Output is correct
21 Correct 60 ms 6352 KB Output is correct
22 Correct 53 ms 44828 KB Output is correct
23 Correct 73 ms 47548 KB Output is correct
24 Correct 32 ms 44592 KB Output is correct
25 Correct 196 ms 44320 KB Output is correct
26 Correct 60 ms 6616 KB Output is correct
27 Correct 65 ms 6364 KB Output is correct
28 Correct 62 ms 6364 KB Output is correct
29 Correct 59 ms 7448 KB Output is correct
30 Correct 61 ms 6352 KB Output is correct
31 Correct 63 ms 6364 KB Output is correct
32 Correct 62 ms 6364 KB Output is correct
33 Correct 64 ms 6364 KB Output is correct
34 Correct 60 ms 6364 KB Output is correct
35 Incorrect 63 ms 6352 KB Output isn't correct
36 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 193 ms 45096 KB Output is correct
2 Correct 64 ms 6352 KB Output is correct
3 Correct 64 ms 6352 KB Output is correct
4 Correct 63 ms 6344 KB Output is correct
5 Correct 59 ms 6364 KB Output is correct
6 Correct 60 ms 6356 KB Output is correct
7 Correct 65 ms 6364 KB Output is correct
8 Correct 65 ms 6360 KB Output is correct
9 Correct 60 ms 6364 KB Output is correct
10 Correct 60 ms 6352 KB Output is correct
11 Correct 191 ms 44252 KB Output is correct
12 Correct 59 ms 6364 KB Output is correct
13 Correct 61 ms 6352 KB Output is correct
14 Correct 59 ms 6352 KB Output is correct
15 Correct 58 ms 6260 KB Output is correct
16 Correct 59 ms 6352 KB Output is correct
17 Correct 62 ms 6360 KB Output is correct
18 Correct 64 ms 6352 KB Output is correct
19 Correct 63 ms 6360 KB Output is correct
20 Correct 60 ms 6356 KB Output is correct
21 Correct 908 ms 46224 KB Output is correct
22 Correct 888 ms 45308 KB Output is correct
23 Correct 449 ms 28072 KB Output is correct
24 Correct 455 ms 28360 KB Output is correct
25 Correct 437 ms 26444 KB Output is correct
26 Correct 446 ms 26824 KB Output is correct
27 Correct 455 ms 28100 KB Output is correct
28 Correct 467 ms 26432 KB Output is correct
29 Correct 191 ms 45300 KB Output is correct
30 Correct 58 ms 6364 KB Output is correct
31 Correct 61 ms 6364 KB Output is correct
32 Correct 60 ms 6340 KB Output is correct
33 Correct 59 ms 6364 KB Output is correct
34 Correct 60 ms 6316 KB Output is correct
35 Correct 67 ms 6316 KB Output is correct
36 Correct 64 ms 6436 KB Output is correct
37 Correct 62 ms 6404 KB Output is correct
38 Correct 60 ms 6352 KB Output is correct
39 Correct 911 ms 44840 KB Output is correct
40 Correct 898 ms 44920 KB Output is correct
41 Correct 444 ms 26404 KB Output is correct
42 Correct 461 ms 26792 KB Output is correct
43 Correct 445 ms 26280 KB Output is correct
44 Correct 438 ms 26276 KB Output is correct
45 Correct 445 ms 27944 KB Output is correct
46 Correct 465 ms 28152 KB Output is correct
47 Correct 1768 ms 46020 KB Output is correct
48 Correct 1755 ms 45916 KB Output is correct
49 Execution timed out 5097 ms 177856 KB Time limit exceeded
50 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 51 ms 45072 KB Output is correct
2 Correct 71 ms 45732 KB Output is correct
3 Correct 33 ms 44908 KB Output is correct
4 Correct 195 ms 44708 KB Output is correct
5 Correct 833 ms 44548 KB Output is correct
6 Correct 817 ms 45464 KB Output is correct
7 Correct 876 ms 44220 KB Output is correct
8 Correct 823 ms 47664 KB Output is correct
9 Correct 798 ms 45448 KB Output is correct
10 Correct 884 ms 44204 KB Output is correct
11 Correct 898 ms 45348 KB Output is correct
12 Correct 52 ms 44472 KB Output is correct
13 Correct 73 ms 44760 KB Output is correct
14 Correct 33 ms 46136 KB Output is correct
15 Correct 193 ms 45064 KB Output is correct
16 Correct 835 ms 45104 KB Output is correct
17 Correct 813 ms 45020 KB Output is correct
18 Correct 848 ms 44256 KB Output is correct
19 Correct 814 ms 47712 KB Output is correct
20 Correct 843 ms 45776 KB Output is correct
21 Correct 891 ms 44972 KB Output is correct
22 Correct 891 ms 46004 KB Output is correct
23 Correct 1606 ms 44992 KB Output is correct
24 Correct 1681 ms 44896 KB Output is correct
25 Correct 1722 ms 44268 KB Output is correct
26 Correct 1628 ms 45212 KB Output is correct
27 Correct 1621 ms 46240 KB Output is correct
28 Correct 1748 ms 45460 KB Output is correct
29 Correct 1765 ms 45240 KB Output is correct
30 Correct 193 ms 45096 KB Output is correct
31 Correct 64 ms 6352 KB Output is correct
32 Correct 64 ms 6352 KB Output is correct
33 Correct 63 ms 6344 KB Output is correct
34 Correct 59 ms 6364 KB Output is correct
35 Correct 60 ms 6356 KB Output is correct
36 Correct 65 ms 6364 KB Output is correct
37 Correct 65 ms 6360 KB Output is correct
38 Correct 60 ms 6364 KB Output is correct
39 Correct 60 ms 6352 KB Output is correct
40 Correct 53 ms 44828 KB Output is correct
41 Correct 73 ms 47548 KB Output is correct
42 Correct 32 ms 44592 KB Output is correct
43 Correct 196 ms 44320 KB Output is correct
44 Correct 60 ms 6616 KB Output is correct
45 Correct 65 ms 6364 KB Output is correct
46 Correct 62 ms 6364 KB Output is correct
47 Correct 59 ms 7448 KB Output is correct
48 Correct 61 ms 6352 KB Output is correct
49 Correct 63 ms 6364 KB Output is correct
50 Correct 62 ms 6364 KB Output is correct
51 Correct 64 ms 6364 KB Output is correct
52 Correct 60 ms 6364 KB Output is correct
53 Incorrect 63 ms 6352 KB Output isn't correct
54 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 193 ms 45096 KB Output is correct
2 Correct 64 ms 6352 KB Output is correct
3 Correct 64 ms 6352 KB Output is correct
4 Correct 63 ms 6344 KB Output is correct
5 Correct 59 ms 6364 KB Output is correct
6 Correct 60 ms 6356 KB Output is correct
7 Correct 65 ms 6364 KB Output is correct
8 Correct 65 ms 6360 KB Output is correct
9 Correct 60 ms 6364 KB Output is correct
10 Correct 60 ms 6352 KB Output is correct
11 Correct 191 ms 44252 KB Output is correct
12 Correct 59 ms 6364 KB Output is correct
13 Correct 61 ms 6352 KB Output is correct
14 Correct 59 ms 6352 KB Output is correct
15 Correct 58 ms 6260 KB Output is correct
16 Correct 59 ms 6352 KB Output is correct
17 Correct 62 ms 6360 KB Output is correct
18 Correct 64 ms 6352 KB Output is correct
19 Correct 63 ms 6360 KB Output is correct
20 Correct 60 ms 6356 KB Output is correct
21 Correct 908 ms 46224 KB Output is correct
22 Correct 888 ms 45308 KB Output is correct
23 Correct 449 ms 28072 KB Output is correct
24 Correct 455 ms 28360 KB Output is correct
25 Correct 437 ms 26444 KB Output is correct
26 Correct 446 ms 26824 KB Output is correct
27 Correct 455 ms 28100 KB Output is correct
28 Correct 467 ms 26432 KB Output is correct
29 Correct 191 ms 45300 KB Output is correct
30 Correct 58 ms 6364 KB Output is correct
31 Correct 61 ms 6364 KB Output is correct
32 Correct 60 ms 6340 KB Output is correct
33 Correct 59 ms 6364 KB Output is correct
34 Correct 60 ms 6316 KB Output is correct
35 Correct 67 ms 6316 KB Output is correct
36 Correct 64 ms 6436 KB Output is correct
37 Correct 62 ms 6404 KB Output is correct
38 Correct 60 ms 6352 KB Output is correct
39 Correct 911 ms 44840 KB Output is correct
40 Correct 898 ms 44920 KB Output is correct
41 Correct 444 ms 26404 KB Output is correct
42 Correct 461 ms 26792 KB Output is correct
43 Correct 445 ms 26280 KB Output is correct
44 Correct 438 ms 26276 KB Output is correct
45 Correct 445 ms 27944 KB Output is correct
46 Correct 465 ms 28152 KB Output is correct
47 Correct 1768 ms 46020 KB Output is correct
48 Correct 1755 ms 45916 KB Output is correct
49 Execution timed out 5097 ms 177856 KB Time limit exceeded
50 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 51 ms 45072 KB Output is correct
2 Correct 71 ms 45732 KB Output is correct
3 Correct 33 ms 44908 KB Output is correct
4 Correct 195 ms 44708 KB Output is correct
5 Correct 833 ms 44548 KB Output is correct
6 Correct 817 ms 45464 KB Output is correct
7 Correct 876 ms 44220 KB Output is correct
8 Correct 823 ms 47664 KB Output is correct
9 Correct 798 ms 45448 KB Output is correct
10 Correct 884 ms 44204 KB Output is correct
11 Correct 898 ms 45348 KB Output is correct
12 Correct 52 ms 44472 KB Output is correct
13 Correct 73 ms 44760 KB Output is correct
14 Correct 33 ms 46136 KB Output is correct
15 Correct 193 ms 45064 KB Output is correct
16 Correct 835 ms 45104 KB Output is correct
17 Correct 813 ms 45020 KB Output is correct
18 Correct 848 ms 44256 KB Output is correct
19 Correct 814 ms 47712 KB Output is correct
20 Correct 843 ms 45776 KB Output is correct
21 Correct 891 ms 44972 KB Output is correct
22 Correct 891 ms 46004 KB Output is correct
23 Correct 1606 ms 44992 KB Output is correct
24 Correct 1681 ms 44896 KB Output is correct
25 Correct 1722 ms 44268 KB Output is correct
26 Correct 1628 ms 45212 KB Output is correct
27 Correct 1621 ms 46240 KB Output is correct
28 Correct 1748 ms 45460 KB Output is correct
29 Correct 1765 ms 45240 KB Output is correct
30 Correct 193 ms 45096 KB Output is correct
31 Correct 64 ms 6352 KB Output is correct
32 Correct 64 ms 6352 KB Output is correct
33 Correct 63 ms 6344 KB Output is correct
34 Correct 59 ms 6364 KB Output is correct
35 Correct 60 ms 6356 KB Output is correct
36 Correct 65 ms 6364 KB Output is correct
37 Correct 65 ms 6360 KB Output is correct
38 Correct 60 ms 6364 KB Output is correct
39 Correct 60 ms 6352 KB Output is correct
40 Correct 53 ms 44828 KB Output is correct
41 Correct 73 ms 47548 KB Output is correct
42 Correct 32 ms 44592 KB Output is correct
43 Correct 196 ms 44320 KB Output is correct
44 Correct 60 ms 6616 KB Output is correct
45 Correct 65 ms 6364 KB Output is correct
46 Correct 62 ms 6364 KB Output is correct
47 Correct 59 ms 7448 KB Output is correct
48 Correct 61 ms 6352 KB Output is correct
49 Correct 63 ms 6364 KB Output is correct
50 Correct 62 ms 6364 KB Output is correct
51 Correct 64 ms 6364 KB Output is correct
52 Correct 60 ms 6364 KB Output is correct
53 Incorrect 63 ms 6352 KB Output isn't correct
54 Halted 0 ms 0 KB -