Submission #580448

# Submission time Handle Problem Language Result Execution time Memory
580448 2022-06-21T09:09:51 Z 반딧불(#8355) Uplifting Excursion (BOI22_vault) C++17
50 / 100
3184 ms 23972 KB
#include <bits/stdc++.h>
#ifndef TEST
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#endif

using namespace std;

typedef long long ll;
const ll LIM = 300000;

void imp(){
    puts("impossible");
    exit(0);
}

ll dq1[1000002];
ll dq2[1000002];
int fr, sz;

ll f(ll x, ll y, bool b){
    if(b) return max(x, y);
    return min(x, y);
}

void calculateMax(int n, ll* arr, int lim, vector<ll>& ret){
    ret = vector<ll>(lim*2+1, -1e18);
    ret[lim] = 0;
    vector<ll> tvec (lim*2+1, -1e18);
    for(int ri=0; ri<=n+n; ri++){
        tvec.swap(ret);
        if(ri>n){
            int i = ri-n;
            for(int s=0; s<i; s++){
                fr=sz=0;
                for(int j=s, p=0; j<=lim*2; j+=i, p++){
                    ret[j] = max(ret[j], tvec[j]);
                    while(fr!=sz && dq2[fr] < p) fr++;
                    ll nf = tvec[j]-p;
                    while(fr!=sz && dq1[sz-1] < nf) sz--;
                    dq1[sz] = nf;
                    dq2[sz++] = p+arr[ri];
                    ret[j] = max(ret[j], dq1[fr] + p);
                }
            }
        }
        else if(ri<n){
            int i = n-ri;
            for(int s=0; s<i; s++){
                fr=sz=0;
                for(int j=lim*2-s, p=0; j>=0; j-=i, p++){
                    ret[j] = max(ret[j], tvec[j]);
                    while(fr!=sz && dq2[fr] < p) fr++;
                    ll nf = tvec[j]-p;
                    while(fr!=sz && dq1[sz-1] < nf) sz--;
                    dq1[sz] = nf;
                    dq2[sz++] = p+arr[ri];
                    ret[j] = max(ret[j], dq1[fr] + p);
                }
            }
        }
        else tvec.swap(ret);
    }
}

void calculateMin(int n, ll* arr, int lim, vector<ll>& ret){
    ret = vector<ll>(lim*2+1, 1e18);
    ret[lim] = 0;
    vector<ll> tvec (lim*2+1, 1e18);
    for(int ri=0; ri<=n+n; ri++){
        tvec.swap(ret);
        if(ri>n){
            int i = ri-n;
            for(int s=0; s<i; s++){
                fr=sz=0;
                for(int j=s, p=0; j<=lim*2; j+=i, p++){
                    ret[j] = min(ret[j], tvec[j]);
                    while(fr!=sz && dq2[fr] < p) fr++;
                    ll nf = tvec[j]-p;
                    while(fr!=sz && dq1[sz-1] > nf) sz--;
                    dq1[sz] = nf;
                    dq2[sz++] = p+arr[ri];
                    ret[j] = min(ret[j], dq1[fr] + p);
                }
            }
        }
        else if(ri<n){
            int i = n-ri;
            for(int s=0; s<i; s++){
                fr=sz=0;
                for(int j=lim*2-s, p=0; j>=0; j-=i, p++){
                    ret[j] = min(ret[j], tvec[j]);
                    while(fr!=sz && dq2[fr] < p) fr++;
                    ll nf = tvec[j]-p;
                    while(fr!=sz && dq1[sz-1] > nf) sz--;
                    dq1[sz] = nf;
                    dq2[sz++] = p+arr[ri];
                    ret[j] = min(ret[j], dq1[fr] + p);
                }
            }
        }
        else tvec.swap(ret);
    }
}

int n;
ll k;
ll arr[302];

ll used[302];
ll rem[302];
vector<ll> DP, DP2;

ll ans = -1e18;
ll frontCnt;

int main(){
    scanf("%lld %lld", &n, &k);
    for(int i=0; i<=n+n; i++){
        scanf("%lld", &arr[i]);
//        arr[i] = ll(rand()) * ll(rand()) * ll(rand()) * ll(rand()) % 100LL;
    }
//    printf("%lld\n", arr[1] + min(arr[0], arr[2])*2);
    if(k<0){
        k*=-1;
        reverse(arr, arr+n+n+1);
    }

    for(int i=0; i<=n+n; i++) used[i] = 0, rem[i] = arr[i];
    for(int i=n; i<=n+n; i++){
        if(k >= arr[i]*(i-n)){
            k -= arr[i]*(i-n);
            used[i] = arr[i];
            rem[i] = 0;
        }
        else{
            ll tmp = k/(i-n);
            used[i] = tmp;
            rem[i] = arr[i]-tmp;
            k -= tmp*(i-n);
        }
    }
    if(accumulate(rem, rem+n+n+1, 0LL) == 0) imp();
    for(int i=1; i<=n; i++){
        ll tmp = min(rem[n-i], rem[n+i]);
        rem[n-i] -= tmp, rem[n+i] -= tmp;
        used[n-i] += tmp, used[n+i] += tmp;
    }
    frontCnt = accumulate(used, used+n+n+1, 0LL);

    calculateMax(n, rem, LIM, DP); /// �ִ�
    calculateMin(n, used, LIM, DP2); /// �ּ�

    for(ll i=0; i<=LIM+LIM; i++){
        ll j = (i-LIM)-k+LIM;
        if(0<=j && j<=LIM+LIM) ans = max(ans, frontCnt + DP[i] - DP2[j]);
    }

    if(ans <= 0) imp();
    printf("%lld", ans);
}

Compilation message

vault.cpp: In function 'int main()':
vault.cpp:119:15: warning: format '%lld' expects argument of type 'long long int*', but argument 2 has type 'int*' [-Wformat=]
  119 |     scanf("%lld %lld", &n, &k);
      |            ~~~^        ~~
      |               |        |
      |               |        int*
      |               long long int*
      |            %d
vault.cpp:119:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  119 |     scanf("%lld %lld", &n, &k);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~
vault.cpp:121:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  121 |         scanf("%lld", &arr[i]);
      |         ~~~~~^~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 44 ms 23804 KB Output is correct
2 Correct 49 ms 23872 KB Output is correct
3 Correct 24 ms 23812 KB Output is correct
4 Correct 198 ms 23768 KB Output is correct
5 Correct 1271 ms 23764 KB Output is correct
6 Correct 1234 ms 23916 KB Output is correct
7 Correct 1169 ms 23756 KB Output is correct
8 Correct 1186 ms 23772 KB Output is correct
9 Correct 1351 ms 23764 KB Output is correct
10 Correct 1246 ms 23760 KB Output is correct
11 Correct 1317 ms 23756 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 44 ms 23804 KB Output is correct
2 Correct 49 ms 23872 KB Output is correct
3 Correct 24 ms 23812 KB Output is correct
4 Correct 198 ms 23768 KB Output is correct
5 Correct 1271 ms 23764 KB Output is correct
6 Correct 1234 ms 23916 KB Output is correct
7 Correct 1169 ms 23756 KB Output is correct
8 Correct 1186 ms 23772 KB Output is correct
9 Correct 1351 ms 23764 KB Output is correct
10 Correct 1246 ms 23760 KB Output is correct
11 Correct 1317 ms 23756 KB Output is correct
12 Correct 31 ms 23812 KB Output is correct
13 Correct 43 ms 23780 KB Output is correct
14 Correct 22 ms 23732 KB Output is correct
15 Correct 226 ms 23740 KB Output is correct
16 Correct 1280 ms 23760 KB Output is correct
17 Correct 1214 ms 23760 KB Output is correct
18 Correct 1207 ms 23760 KB Output is correct
19 Correct 1382 ms 23764 KB Output is correct
20 Correct 1415 ms 23860 KB Output is correct
21 Correct 1283 ms 23740 KB Output is correct
22 Correct 1248 ms 23756 KB Output is correct
23 Correct 2602 ms 23768 KB Output is correct
24 Correct 2423 ms 23848 KB Output is correct
25 Correct 2700 ms 23768 KB Output is correct
26 Correct 2674 ms 23768 KB Output is correct
27 Correct 2620 ms 23764 KB Output is correct
28 Correct 3035 ms 23792 KB Output is correct
29 Correct 3184 ms 23760 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 240 ms 23764 KB Output is correct
2 Correct 1168 ms 23748 KB Output is correct
3 Correct 1031 ms 23764 KB Output is correct
4 Correct 854 ms 23756 KB Output is correct
5 Correct 949 ms 23764 KB Output is correct
6 Correct 971 ms 23760 KB Output is correct
7 Correct 963 ms 23760 KB Output is correct
8 Correct 887 ms 23764 KB Output is correct
9 Correct 1036 ms 23844 KB Output is correct
10 Correct 920 ms 23768 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 240 ms 23764 KB Output is correct
2 Correct 1168 ms 23748 KB Output is correct
3 Correct 1031 ms 23764 KB Output is correct
4 Correct 854 ms 23756 KB Output is correct
5 Correct 949 ms 23764 KB Output is correct
6 Correct 971 ms 23760 KB Output is correct
7 Correct 963 ms 23760 KB Output is correct
8 Correct 887 ms 23764 KB Output is correct
9 Correct 1036 ms 23844 KB Output is correct
10 Correct 920 ms 23768 KB Output is correct
11 Correct 36 ms 23812 KB Output is correct
12 Correct 53 ms 23776 KB Output is correct
13 Correct 24 ms 23780 KB Output is correct
14 Correct 236 ms 23760 KB Output is correct
15 Correct 951 ms 23772 KB Output is correct
16 Correct 848 ms 23696 KB Output is correct
17 Correct 1049 ms 23756 KB Output is correct
18 Correct 836 ms 23804 KB Output is correct
19 Correct 946 ms 23764 KB Output is correct
20 Correct 900 ms 23760 KB Output is correct
21 Correct 932 ms 23692 KB Output is correct
22 Correct 879 ms 23760 KB Output is correct
23 Correct 880 ms 23756 KB Output is correct
24 Incorrect 869 ms 23796 KB Output isn't correct
25 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 240 ms 23764 KB Output is correct
2 Correct 1168 ms 23748 KB Output is correct
3 Correct 1031 ms 23764 KB Output is correct
4 Correct 854 ms 23756 KB Output is correct
5 Correct 949 ms 23764 KB Output is correct
6 Correct 971 ms 23760 KB Output is correct
7 Correct 963 ms 23760 KB Output is correct
8 Correct 887 ms 23764 KB Output is correct
9 Correct 1036 ms 23844 KB Output is correct
10 Correct 920 ms 23768 KB Output is correct
11 Correct 233 ms 23768 KB Output is correct
12 Correct 713 ms 23880 KB Output is correct
13 Correct 773 ms 23796 KB Output is correct
14 Correct 798 ms 23776 KB Output is correct
15 Correct 737 ms 23768 KB Output is correct
16 Correct 795 ms 23760 KB Output is correct
17 Correct 762 ms 23764 KB Output is correct
18 Correct 767 ms 23776 KB Output is correct
19 Correct 770 ms 23704 KB Output is correct
20 Correct 715 ms 23768 KB Output is correct
21 Correct 1354 ms 23688 KB Output is correct
22 Correct 1245 ms 23764 KB Output is correct
23 Correct 1178 ms 23824 KB Output is correct
24 Correct 1284 ms 23788 KB Output is correct
25 Correct 1327 ms 23764 KB Output is correct
26 Correct 1261 ms 23788 KB Output is correct
27 Correct 1132 ms 23776 KB Output is correct
28 Correct 1144 ms 23776 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 44 ms 23804 KB Output is correct
2 Correct 49 ms 23872 KB Output is correct
3 Correct 24 ms 23812 KB Output is correct
4 Correct 198 ms 23768 KB Output is correct
5 Correct 1271 ms 23764 KB Output is correct
6 Correct 1234 ms 23916 KB Output is correct
7 Correct 1169 ms 23756 KB Output is correct
8 Correct 1186 ms 23772 KB Output is correct
9 Correct 1351 ms 23764 KB Output is correct
10 Correct 1246 ms 23760 KB Output is correct
11 Correct 1317 ms 23756 KB Output is correct
12 Correct 240 ms 23764 KB Output is correct
13 Correct 1168 ms 23748 KB Output is correct
14 Correct 1031 ms 23764 KB Output is correct
15 Correct 854 ms 23756 KB Output is correct
16 Correct 949 ms 23764 KB Output is correct
17 Correct 971 ms 23760 KB Output is correct
18 Correct 963 ms 23760 KB Output is correct
19 Correct 887 ms 23764 KB Output is correct
20 Correct 1036 ms 23844 KB Output is correct
21 Correct 920 ms 23768 KB Output is correct
22 Correct 36 ms 23812 KB Output is correct
23 Correct 53 ms 23776 KB Output is correct
24 Correct 24 ms 23780 KB Output is correct
25 Correct 236 ms 23760 KB Output is correct
26 Correct 951 ms 23772 KB Output is correct
27 Correct 848 ms 23696 KB Output is correct
28 Correct 1049 ms 23756 KB Output is correct
29 Correct 836 ms 23804 KB Output is correct
30 Correct 946 ms 23764 KB Output is correct
31 Correct 900 ms 23760 KB Output is correct
32 Correct 932 ms 23692 KB Output is correct
33 Correct 879 ms 23760 KB Output is correct
34 Correct 880 ms 23756 KB Output is correct
35 Incorrect 869 ms 23796 KB Output isn't correct
36 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 240 ms 23764 KB Output is correct
2 Correct 1168 ms 23748 KB Output is correct
3 Correct 1031 ms 23764 KB Output is correct
4 Correct 854 ms 23756 KB Output is correct
5 Correct 949 ms 23764 KB Output is correct
6 Correct 971 ms 23760 KB Output is correct
7 Correct 963 ms 23760 KB Output is correct
8 Correct 887 ms 23764 KB Output is correct
9 Correct 1036 ms 23844 KB Output is correct
10 Correct 920 ms 23768 KB Output is correct
11 Correct 233 ms 23768 KB Output is correct
12 Correct 713 ms 23880 KB Output is correct
13 Correct 773 ms 23796 KB Output is correct
14 Correct 798 ms 23776 KB Output is correct
15 Correct 737 ms 23768 KB Output is correct
16 Correct 795 ms 23760 KB Output is correct
17 Correct 762 ms 23764 KB Output is correct
18 Correct 767 ms 23776 KB Output is correct
19 Correct 770 ms 23704 KB Output is correct
20 Correct 715 ms 23768 KB Output is correct
21 Correct 1354 ms 23688 KB Output is correct
22 Correct 1245 ms 23764 KB Output is correct
23 Correct 1178 ms 23824 KB Output is correct
24 Correct 1284 ms 23788 KB Output is correct
25 Correct 1327 ms 23764 KB Output is correct
26 Correct 1261 ms 23788 KB Output is correct
27 Correct 1132 ms 23776 KB Output is correct
28 Correct 1144 ms 23776 KB Output is correct
29 Correct 202 ms 23764 KB Output is correct
30 Correct 706 ms 23728 KB Output is correct
31 Correct 772 ms 23784 KB Output is correct
32 Correct 737 ms 23764 KB Output is correct
33 Correct 800 ms 23768 KB Output is correct
34 Correct 784 ms 23760 KB Output is correct
35 Correct 781 ms 23764 KB Output is correct
36 Correct 713 ms 23764 KB Output is correct
37 Correct 771 ms 23872 KB Output is correct
38 Correct 741 ms 23800 KB Output is correct
39 Correct 1198 ms 23760 KB Output is correct
40 Correct 1156 ms 23760 KB Output is correct
41 Correct 1140 ms 23756 KB Output is correct
42 Correct 1150 ms 23788 KB Output is correct
43 Correct 1145 ms 23972 KB Output is correct
44 Correct 1176 ms 23764 KB Output is correct
45 Correct 1065 ms 23804 KB Output is correct
46 Correct 1069 ms 23776 KB Output is correct
47 Correct 2200 ms 23760 KB Output is correct
48 Correct 2258 ms 23820 KB Output is correct
49 Correct 2305 ms 23760 KB Output is correct
50 Correct 2182 ms 23804 KB Output is correct
51 Correct 2170 ms 23684 KB Output is correct
52 Correct 2474 ms 23764 KB Output is correct
53 Correct 2451 ms 23808 KB Output is correct
54 Correct 2314 ms 23768 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 44 ms 23804 KB Output is correct
2 Correct 49 ms 23872 KB Output is correct
3 Correct 24 ms 23812 KB Output is correct
4 Correct 198 ms 23768 KB Output is correct
5 Correct 1271 ms 23764 KB Output is correct
6 Correct 1234 ms 23916 KB Output is correct
7 Correct 1169 ms 23756 KB Output is correct
8 Correct 1186 ms 23772 KB Output is correct
9 Correct 1351 ms 23764 KB Output is correct
10 Correct 1246 ms 23760 KB Output is correct
11 Correct 1317 ms 23756 KB Output is correct
12 Correct 31 ms 23812 KB Output is correct
13 Correct 43 ms 23780 KB Output is correct
14 Correct 22 ms 23732 KB Output is correct
15 Correct 226 ms 23740 KB Output is correct
16 Correct 1280 ms 23760 KB Output is correct
17 Correct 1214 ms 23760 KB Output is correct
18 Correct 1207 ms 23760 KB Output is correct
19 Correct 1382 ms 23764 KB Output is correct
20 Correct 1415 ms 23860 KB Output is correct
21 Correct 1283 ms 23740 KB Output is correct
22 Correct 1248 ms 23756 KB Output is correct
23 Correct 2602 ms 23768 KB Output is correct
24 Correct 2423 ms 23848 KB Output is correct
25 Correct 2700 ms 23768 KB Output is correct
26 Correct 2674 ms 23768 KB Output is correct
27 Correct 2620 ms 23764 KB Output is correct
28 Correct 3035 ms 23792 KB Output is correct
29 Correct 3184 ms 23760 KB Output is correct
30 Correct 240 ms 23764 KB Output is correct
31 Correct 1168 ms 23748 KB Output is correct
32 Correct 1031 ms 23764 KB Output is correct
33 Correct 854 ms 23756 KB Output is correct
34 Correct 949 ms 23764 KB Output is correct
35 Correct 971 ms 23760 KB Output is correct
36 Correct 963 ms 23760 KB Output is correct
37 Correct 887 ms 23764 KB Output is correct
38 Correct 1036 ms 23844 KB Output is correct
39 Correct 920 ms 23768 KB Output is correct
40 Correct 36 ms 23812 KB Output is correct
41 Correct 53 ms 23776 KB Output is correct
42 Correct 24 ms 23780 KB Output is correct
43 Correct 236 ms 23760 KB Output is correct
44 Correct 951 ms 23772 KB Output is correct
45 Correct 848 ms 23696 KB Output is correct
46 Correct 1049 ms 23756 KB Output is correct
47 Correct 836 ms 23804 KB Output is correct
48 Correct 946 ms 23764 KB Output is correct
49 Correct 900 ms 23760 KB Output is correct
50 Correct 932 ms 23692 KB Output is correct
51 Correct 879 ms 23760 KB Output is correct
52 Correct 880 ms 23756 KB Output is correct
53 Incorrect 869 ms 23796 KB Output isn't correct
54 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 240 ms 23764 KB Output is correct
2 Correct 1168 ms 23748 KB Output is correct
3 Correct 1031 ms 23764 KB Output is correct
4 Correct 854 ms 23756 KB Output is correct
5 Correct 949 ms 23764 KB Output is correct
6 Correct 971 ms 23760 KB Output is correct
7 Correct 963 ms 23760 KB Output is correct
8 Correct 887 ms 23764 KB Output is correct
9 Correct 1036 ms 23844 KB Output is correct
10 Correct 920 ms 23768 KB Output is correct
11 Correct 233 ms 23768 KB Output is correct
12 Correct 713 ms 23880 KB Output is correct
13 Correct 773 ms 23796 KB Output is correct
14 Correct 798 ms 23776 KB Output is correct
15 Correct 737 ms 23768 KB Output is correct
16 Correct 795 ms 23760 KB Output is correct
17 Correct 762 ms 23764 KB Output is correct
18 Correct 767 ms 23776 KB Output is correct
19 Correct 770 ms 23704 KB Output is correct
20 Correct 715 ms 23768 KB Output is correct
21 Correct 1354 ms 23688 KB Output is correct
22 Correct 1245 ms 23764 KB Output is correct
23 Correct 1178 ms 23824 KB Output is correct
24 Correct 1284 ms 23788 KB Output is correct
25 Correct 1327 ms 23764 KB Output is correct
26 Correct 1261 ms 23788 KB Output is correct
27 Correct 1132 ms 23776 KB Output is correct
28 Correct 1144 ms 23776 KB Output is correct
29 Correct 202 ms 23764 KB Output is correct
30 Correct 706 ms 23728 KB Output is correct
31 Correct 772 ms 23784 KB Output is correct
32 Correct 737 ms 23764 KB Output is correct
33 Correct 800 ms 23768 KB Output is correct
34 Correct 784 ms 23760 KB Output is correct
35 Correct 781 ms 23764 KB Output is correct
36 Correct 713 ms 23764 KB Output is correct
37 Correct 771 ms 23872 KB Output is correct
38 Correct 741 ms 23800 KB Output is correct
39 Correct 1198 ms 23760 KB Output is correct
40 Correct 1156 ms 23760 KB Output is correct
41 Correct 1140 ms 23756 KB Output is correct
42 Correct 1150 ms 23788 KB Output is correct
43 Correct 1145 ms 23972 KB Output is correct
44 Correct 1176 ms 23764 KB Output is correct
45 Correct 1065 ms 23804 KB Output is correct
46 Correct 1069 ms 23776 KB Output is correct
47 Correct 2200 ms 23760 KB Output is correct
48 Correct 2258 ms 23820 KB Output is correct
49 Correct 2305 ms 23760 KB Output is correct
50 Correct 2182 ms 23804 KB Output is correct
51 Correct 2170 ms 23684 KB Output is correct
52 Correct 2474 ms 23764 KB Output is correct
53 Correct 2451 ms 23808 KB Output is correct
54 Correct 2314 ms 23768 KB Output is correct
55 Correct 205 ms 23804 KB Output is correct
56 Correct 776 ms 23800 KB Output is correct
57 Correct 801 ms 23804 KB Output is correct
58 Correct 744 ms 23756 KB Output is correct
59 Correct 699 ms 23792 KB Output is correct
60 Correct 817 ms 23796 KB Output is correct
61 Correct 804 ms 23792 KB Output is correct
62 Correct 708 ms 23796 KB Output is correct
63 Correct 717 ms 23760 KB Output is correct
64 Correct 778 ms 23768 KB Output is correct
65 Correct 1156 ms 23884 KB Output is correct
66 Correct 1326 ms 23756 KB Output is correct
67 Correct 1211 ms 23760 KB Output is correct
68 Correct 1082 ms 23776 KB Output is correct
69 Correct 1126 ms 23800 KB Output is correct
70 Correct 1383 ms 23764 KB Output is correct
71 Correct 1141 ms 23848 KB Output is correct
72 Correct 1182 ms 23768 KB Output is correct
73 Correct 2406 ms 23760 KB Output is correct
74 Correct 2424 ms 23760 KB Output is correct
75 Correct 2714 ms 23756 KB Output is correct
76 Correct 2511 ms 23764 KB Output is correct
77 Correct 2703 ms 23756 KB Output is correct
78 Correct 2566 ms 23720 KB Output is correct
79 Correct 2309 ms 23796 KB Output is correct
80 Correct 2472 ms 23808 KB Output is correct
81 Runtime error 4 ms 340 KB Execution killed with signal 11
82 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 44 ms 23804 KB Output is correct
2 Correct 49 ms 23872 KB Output is correct
3 Correct 24 ms 23812 KB Output is correct
4 Correct 198 ms 23768 KB Output is correct
5 Correct 1271 ms 23764 KB Output is correct
6 Correct 1234 ms 23916 KB Output is correct
7 Correct 1169 ms 23756 KB Output is correct
8 Correct 1186 ms 23772 KB Output is correct
9 Correct 1351 ms 23764 KB Output is correct
10 Correct 1246 ms 23760 KB Output is correct
11 Correct 1317 ms 23756 KB Output is correct
12 Correct 31 ms 23812 KB Output is correct
13 Correct 43 ms 23780 KB Output is correct
14 Correct 22 ms 23732 KB Output is correct
15 Correct 226 ms 23740 KB Output is correct
16 Correct 1280 ms 23760 KB Output is correct
17 Correct 1214 ms 23760 KB Output is correct
18 Correct 1207 ms 23760 KB Output is correct
19 Correct 1382 ms 23764 KB Output is correct
20 Correct 1415 ms 23860 KB Output is correct
21 Correct 1283 ms 23740 KB Output is correct
22 Correct 1248 ms 23756 KB Output is correct
23 Correct 2602 ms 23768 KB Output is correct
24 Correct 2423 ms 23848 KB Output is correct
25 Correct 2700 ms 23768 KB Output is correct
26 Correct 2674 ms 23768 KB Output is correct
27 Correct 2620 ms 23764 KB Output is correct
28 Correct 3035 ms 23792 KB Output is correct
29 Correct 3184 ms 23760 KB Output is correct
30 Correct 240 ms 23764 KB Output is correct
31 Correct 1168 ms 23748 KB Output is correct
32 Correct 1031 ms 23764 KB Output is correct
33 Correct 854 ms 23756 KB Output is correct
34 Correct 949 ms 23764 KB Output is correct
35 Correct 971 ms 23760 KB Output is correct
36 Correct 963 ms 23760 KB Output is correct
37 Correct 887 ms 23764 KB Output is correct
38 Correct 1036 ms 23844 KB Output is correct
39 Correct 920 ms 23768 KB Output is correct
40 Correct 36 ms 23812 KB Output is correct
41 Correct 53 ms 23776 KB Output is correct
42 Correct 24 ms 23780 KB Output is correct
43 Correct 236 ms 23760 KB Output is correct
44 Correct 951 ms 23772 KB Output is correct
45 Correct 848 ms 23696 KB Output is correct
46 Correct 1049 ms 23756 KB Output is correct
47 Correct 836 ms 23804 KB Output is correct
48 Correct 946 ms 23764 KB Output is correct
49 Correct 900 ms 23760 KB Output is correct
50 Correct 932 ms 23692 KB Output is correct
51 Correct 879 ms 23760 KB Output is correct
52 Correct 880 ms 23756 KB Output is correct
53 Incorrect 869 ms 23796 KB Output isn't correct
54 Halted 0 ms 0 KB -