답안 #580451

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
580451 2022-06-21T09:14:07 Z 반딧불(#8355) Uplifting Excursion (BOI22_vault) C++17
50 / 100
5000 ms 23996 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[702];

ll used[702];
ll rem[702];
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]);
      |         ~~~~~^~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 41 ms 23812 KB Output is correct
2 Correct 52 ms 23788 KB Output is correct
3 Correct 22 ms 23728 KB Output is correct
4 Correct 196 ms 23784 KB Output is correct
5 Correct 1169 ms 23756 KB Output is correct
6 Correct 1128 ms 23772 KB Output is correct
7 Correct 1180 ms 23792 KB Output is correct
8 Correct 1332 ms 23876 KB Output is correct
9 Correct 1211 ms 23772 KB Output is correct
10 Correct 1245 ms 23772 KB Output is correct
11 Correct 1184 ms 23840 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 41 ms 23812 KB Output is correct
2 Correct 52 ms 23788 KB Output is correct
3 Correct 22 ms 23728 KB Output is correct
4 Correct 196 ms 23784 KB Output is correct
5 Correct 1169 ms 23756 KB Output is correct
6 Correct 1128 ms 23772 KB Output is correct
7 Correct 1180 ms 23792 KB Output is correct
8 Correct 1332 ms 23876 KB Output is correct
9 Correct 1211 ms 23772 KB Output is correct
10 Correct 1245 ms 23772 KB Output is correct
11 Correct 1184 ms 23840 KB Output is correct
12 Correct 32 ms 23812 KB Output is correct
13 Correct 47 ms 23796 KB Output is correct
14 Correct 28 ms 23816 KB Output is correct
15 Correct 184 ms 23772 KB Output is correct
16 Correct 1155 ms 23796 KB Output is correct
17 Correct 1176 ms 23772 KB Output is correct
18 Correct 1246 ms 23804 KB Output is correct
19 Correct 1241 ms 23764 KB Output is correct
20 Correct 1192 ms 23768 KB Output is correct
21 Correct 1175 ms 23776 KB Output is correct
22 Correct 1160 ms 23772 KB Output is correct
23 Correct 2279 ms 23780 KB Output is correct
24 Correct 2376 ms 23836 KB Output is correct
25 Correct 2197 ms 23776 KB Output is correct
26 Correct 2692 ms 23836 KB Output is correct
27 Correct 2634 ms 23996 KB Output is correct
28 Correct 2236 ms 23760 KB Output is correct
29 Correct 2579 ms 23708 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 202 ms 23772 KB Output is correct
2 Correct 807 ms 23776 KB Output is correct
3 Correct 872 ms 23704 KB Output is correct
4 Correct 722 ms 23768 KB Output is correct
5 Correct 751 ms 23768 KB Output is correct
6 Correct 846 ms 23772 KB Output is correct
7 Correct 924 ms 23768 KB Output is correct
8 Correct 1133 ms 23764 KB Output is correct
9 Correct 780 ms 23772 KB Output is correct
10 Correct 882 ms 23796 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 202 ms 23772 KB Output is correct
2 Correct 807 ms 23776 KB Output is correct
3 Correct 872 ms 23704 KB Output is correct
4 Correct 722 ms 23768 KB Output is correct
5 Correct 751 ms 23768 KB Output is correct
6 Correct 846 ms 23772 KB Output is correct
7 Correct 924 ms 23768 KB Output is correct
8 Correct 1133 ms 23764 KB Output is correct
9 Correct 780 ms 23772 KB Output is correct
10 Correct 882 ms 23796 KB Output is correct
11 Correct 33 ms 23812 KB Output is correct
12 Correct 45 ms 23772 KB Output is correct
13 Correct 25 ms 23804 KB Output is correct
14 Correct 225 ms 23804 KB Output is correct
15 Correct 914 ms 23772 KB Output is correct
16 Correct 706 ms 23772 KB Output is correct
17 Correct 790 ms 23704 KB Output is correct
18 Correct 741 ms 23768 KB Output is correct
19 Correct 709 ms 23772 KB Output is correct
20 Correct 725 ms 23768 KB Output is correct
21 Correct 801 ms 23704 KB Output is correct
22 Correct 805 ms 23768 KB Output is correct
23 Correct 842 ms 23788 KB Output is correct
24 Incorrect 808 ms 23772 KB Output isn't correct
25 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 202 ms 23772 KB Output is correct
2 Correct 807 ms 23776 KB Output is correct
3 Correct 872 ms 23704 KB Output is correct
4 Correct 722 ms 23768 KB Output is correct
5 Correct 751 ms 23768 KB Output is correct
6 Correct 846 ms 23772 KB Output is correct
7 Correct 924 ms 23768 KB Output is correct
8 Correct 1133 ms 23764 KB Output is correct
9 Correct 780 ms 23772 KB Output is correct
10 Correct 882 ms 23796 KB Output is correct
11 Correct 205 ms 23804 KB Output is correct
12 Correct 781 ms 23768 KB Output is correct
13 Correct 854 ms 23744 KB Output is correct
14 Correct 801 ms 23772 KB Output is correct
15 Correct 701 ms 23748 KB Output is correct
16 Correct 700 ms 23772 KB Output is correct
17 Correct 745 ms 23772 KB Output is correct
18 Correct 712 ms 23708 KB Output is correct
19 Correct 700 ms 23804 KB Output is correct
20 Correct 668 ms 23804 KB Output is correct
21 Correct 1204 ms 23820 KB Output is correct
22 Correct 1183 ms 23764 KB Output is correct
23 Correct 1145 ms 23768 KB Output is correct
24 Correct 1124 ms 23772 KB Output is correct
25 Correct 1122 ms 23796 KB Output is correct
26 Correct 1211 ms 23884 KB Output is correct
27 Correct 1084 ms 23828 KB Output is correct
28 Correct 1084 ms 23772 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 41 ms 23812 KB Output is correct
2 Correct 52 ms 23788 KB Output is correct
3 Correct 22 ms 23728 KB Output is correct
4 Correct 196 ms 23784 KB Output is correct
5 Correct 1169 ms 23756 KB Output is correct
6 Correct 1128 ms 23772 KB Output is correct
7 Correct 1180 ms 23792 KB Output is correct
8 Correct 1332 ms 23876 KB Output is correct
9 Correct 1211 ms 23772 KB Output is correct
10 Correct 1245 ms 23772 KB Output is correct
11 Correct 1184 ms 23840 KB Output is correct
12 Correct 202 ms 23772 KB Output is correct
13 Correct 807 ms 23776 KB Output is correct
14 Correct 872 ms 23704 KB Output is correct
15 Correct 722 ms 23768 KB Output is correct
16 Correct 751 ms 23768 KB Output is correct
17 Correct 846 ms 23772 KB Output is correct
18 Correct 924 ms 23768 KB Output is correct
19 Correct 1133 ms 23764 KB Output is correct
20 Correct 780 ms 23772 KB Output is correct
21 Correct 882 ms 23796 KB Output is correct
22 Correct 33 ms 23812 KB Output is correct
23 Correct 45 ms 23772 KB Output is correct
24 Correct 25 ms 23804 KB Output is correct
25 Correct 225 ms 23804 KB Output is correct
26 Correct 914 ms 23772 KB Output is correct
27 Correct 706 ms 23772 KB Output is correct
28 Correct 790 ms 23704 KB Output is correct
29 Correct 741 ms 23768 KB Output is correct
30 Correct 709 ms 23772 KB Output is correct
31 Correct 725 ms 23768 KB Output is correct
32 Correct 801 ms 23704 KB Output is correct
33 Correct 805 ms 23768 KB Output is correct
34 Correct 842 ms 23788 KB Output is correct
35 Incorrect 808 ms 23772 KB Output isn't correct
36 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 202 ms 23772 KB Output is correct
2 Correct 807 ms 23776 KB Output is correct
3 Correct 872 ms 23704 KB Output is correct
4 Correct 722 ms 23768 KB Output is correct
5 Correct 751 ms 23768 KB Output is correct
6 Correct 846 ms 23772 KB Output is correct
7 Correct 924 ms 23768 KB Output is correct
8 Correct 1133 ms 23764 KB Output is correct
9 Correct 780 ms 23772 KB Output is correct
10 Correct 882 ms 23796 KB Output is correct
11 Correct 205 ms 23804 KB Output is correct
12 Correct 781 ms 23768 KB Output is correct
13 Correct 854 ms 23744 KB Output is correct
14 Correct 801 ms 23772 KB Output is correct
15 Correct 701 ms 23748 KB Output is correct
16 Correct 700 ms 23772 KB Output is correct
17 Correct 745 ms 23772 KB Output is correct
18 Correct 712 ms 23708 KB Output is correct
19 Correct 700 ms 23804 KB Output is correct
20 Correct 668 ms 23804 KB Output is correct
21 Correct 1204 ms 23820 KB Output is correct
22 Correct 1183 ms 23764 KB Output is correct
23 Correct 1145 ms 23768 KB Output is correct
24 Correct 1124 ms 23772 KB Output is correct
25 Correct 1122 ms 23796 KB Output is correct
26 Correct 1211 ms 23884 KB Output is correct
27 Correct 1084 ms 23828 KB Output is correct
28 Correct 1084 ms 23772 KB Output is correct
29 Correct 194 ms 23808 KB Output is correct
30 Correct 704 ms 23724 KB Output is correct
31 Correct 692 ms 23768 KB Output is correct
32 Correct 740 ms 23764 KB Output is correct
33 Correct 748 ms 23892 KB Output is correct
34 Correct 850 ms 23828 KB Output is correct
35 Correct 820 ms 23768 KB Output is correct
36 Correct 911 ms 23772 KB Output is correct
37 Correct 879 ms 23772 KB Output is correct
38 Correct 877 ms 23768 KB Output is correct
39 Correct 1409 ms 23776 KB Output is correct
40 Correct 1503 ms 23768 KB Output is correct
41 Correct 1437 ms 23796 KB Output is correct
42 Correct 1494 ms 23772 KB Output is correct
43 Correct 1602 ms 23876 KB Output is correct
44 Correct 1411 ms 23772 KB Output is correct
45 Correct 1318 ms 23768 KB Output is correct
46 Correct 1410 ms 23772 KB Output is correct
47 Correct 3112 ms 23812 KB Output is correct
48 Correct 2697 ms 23804 KB Output is correct
49 Correct 2615 ms 23772 KB Output is correct
50 Correct 2918 ms 23780 KB Output is correct
51 Correct 2714 ms 23772 KB Output is correct
52 Correct 2718 ms 23780 KB Output is correct
53 Correct 2674 ms 23700 KB Output is correct
54 Correct 2672 ms 23792 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 41 ms 23812 KB Output is correct
2 Correct 52 ms 23788 KB Output is correct
3 Correct 22 ms 23728 KB Output is correct
4 Correct 196 ms 23784 KB Output is correct
5 Correct 1169 ms 23756 KB Output is correct
6 Correct 1128 ms 23772 KB Output is correct
7 Correct 1180 ms 23792 KB Output is correct
8 Correct 1332 ms 23876 KB Output is correct
9 Correct 1211 ms 23772 KB Output is correct
10 Correct 1245 ms 23772 KB Output is correct
11 Correct 1184 ms 23840 KB Output is correct
12 Correct 32 ms 23812 KB Output is correct
13 Correct 47 ms 23796 KB Output is correct
14 Correct 28 ms 23816 KB Output is correct
15 Correct 184 ms 23772 KB Output is correct
16 Correct 1155 ms 23796 KB Output is correct
17 Correct 1176 ms 23772 KB Output is correct
18 Correct 1246 ms 23804 KB Output is correct
19 Correct 1241 ms 23764 KB Output is correct
20 Correct 1192 ms 23768 KB Output is correct
21 Correct 1175 ms 23776 KB Output is correct
22 Correct 1160 ms 23772 KB Output is correct
23 Correct 2279 ms 23780 KB Output is correct
24 Correct 2376 ms 23836 KB Output is correct
25 Correct 2197 ms 23776 KB Output is correct
26 Correct 2692 ms 23836 KB Output is correct
27 Correct 2634 ms 23996 KB Output is correct
28 Correct 2236 ms 23760 KB Output is correct
29 Correct 2579 ms 23708 KB Output is correct
30 Correct 202 ms 23772 KB Output is correct
31 Correct 807 ms 23776 KB Output is correct
32 Correct 872 ms 23704 KB Output is correct
33 Correct 722 ms 23768 KB Output is correct
34 Correct 751 ms 23768 KB Output is correct
35 Correct 846 ms 23772 KB Output is correct
36 Correct 924 ms 23768 KB Output is correct
37 Correct 1133 ms 23764 KB Output is correct
38 Correct 780 ms 23772 KB Output is correct
39 Correct 882 ms 23796 KB Output is correct
40 Correct 33 ms 23812 KB Output is correct
41 Correct 45 ms 23772 KB Output is correct
42 Correct 25 ms 23804 KB Output is correct
43 Correct 225 ms 23804 KB Output is correct
44 Correct 914 ms 23772 KB Output is correct
45 Correct 706 ms 23772 KB Output is correct
46 Correct 790 ms 23704 KB Output is correct
47 Correct 741 ms 23768 KB Output is correct
48 Correct 709 ms 23772 KB Output is correct
49 Correct 725 ms 23768 KB Output is correct
50 Correct 801 ms 23704 KB Output is correct
51 Correct 805 ms 23768 KB Output is correct
52 Correct 842 ms 23788 KB Output is correct
53 Incorrect 808 ms 23772 KB Output isn't correct
54 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 202 ms 23772 KB Output is correct
2 Correct 807 ms 23776 KB Output is correct
3 Correct 872 ms 23704 KB Output is correct
4 Correct 722 ms 23768 KB Output is correct
5 Correct 751 ms 23768 KB Output is correct
6 Correct 846 ms 23772 KB Output is correct
7 Correct 924 ms 23768 KB Output is correct
8 Correct 1133 ms 23764 KB Output is correct
9 Correct 780 ms 23772 KB Output is correct
10 Correct 882 ms 23796 KB Output is correct
11 Correct 205 ms 23804 KB Output is correct
12 Correct 781 ms 23768 KB Output is correct
13 Correct 854 ms 23744 KB Output is correct
14 Correct 801 ms 23772 KB Output is correct
15 Correct 701 ms 23748 KB Output is correct
16 Correct 700 ms 23772 KB Output is correct
17 Correct 745 ms 23772 KB Output is correct
18 Correct 712 ms 23708 KB Output is correct
19 Correct 700 ms 23804 KB Output is correct
20 Correct 668 ms 23804 KB Output is correct
21 Correct 1204 ms 23820 KB Output is correct
22 Correct 1183 ms 23764 KB Output is correct
23 Correct 1145 ms 23768 KB Output is correct
24 Correct 1124 ms 23772 KB Output is correct
25 Correct 1122 ms 23796 KB Output is correct
26 Correct 1211 ms 23884 KB Output is correct
27 Correct 1084 ms 23828 KB Output is correct
28 Correct 1084 ms 23772 KB Output is correct
29 Correct 194 ms 23808 KB Output is correct
30 Correct 704 ms 23724 KB Output is correct
31 Correct 692 ms 23768 KB Output is correct
32 Correct 740 ms 23764 KB Output is correct
33 Correct 748 ms 23892 KB Output is correct
34 Correct 850 ms 23828 KB Output is correct
35 Correct 820 ms 23768 KB Output is correct
36 Correct 911 ms 23772 KB Output is correct
37 Correct 879 ms 23772 KB Output is correct
38 Correct 877 ms 23768 KB Output is correct
39 Correct 1409 ms 23776 KB Output is correct
40 Correct 1503 ms 23768 KB Output is correct
41 Correct 1437 ms 23796 KB Output is correct
42 Correct 1494 ms 23772 KB Output is correct
43 Correct 1602 ms 23876 KB Output is correct
44 Correct 1411 ms 23772 KB Output is correct
45 Correct 1318 ms 23768 KB Output is correct
46 Correct 1410 ms 23772 KB Output is correct
47 Correct 3112 ms 23812 KB Output is correct
48 Correct 2697 ms 23804 KB Output is correct
49 Correct 2615 ms 23772 KB Output is correct
50 Correct 2918 ms 23780 KB Output is correct
51 Correct 2714 ms 23772 KB Output is correct
52 Correct 2718 ms 23780 KB Output is correct
53 Correct 2674 ms 23700 KB Output is correct
54 Correct 2672 ms 23792 KB Output is correct
55 Correct 215 ms 23772 KB Output is correct
56 Correct 814 ms 23784 KB Output is correct
57 Correct 935 ms 23768 KB Output is correct
58 Correct 806 ms 23764 KB Output is correct
59 Correct 951 ms 23764 KB Output is correct
60 Correct 779 ms 23740 KB Output is correct
61 Correct 829 ms 23768 KB Output is correct
62 Correct 953 ms 23748 KB Output is correct
63 Correct 856 ms 23772 KB Output is correct
64 Correct 915 ms 23772 KB Output is correct
65 Correct 1380 ms 23712 KB Output is correct
66 Correct 1315 ms 23772 KB Output is correct
67 Correct 1190 ms 23772 KB Output is correct
68 Correct 1167 ms 23772 KB Output is correct
69 Correct 1214 ms 23768 KB Output is correct
70 Correct 1246 ms 23772 KB Output is correct
71 Correct 1188 ms 23772 KB Output is correct
72 Correct 1126 ms 23808 KB Output is correct
73 Correct 2287 ms 23880 KB Output is correct
74 Correct 2370 ms 23704 KB Output is correct
75 Correct 2339 ms 23776 KB Output is correct
76 Correct 2291 ms 23768 KB Output is correct
77 Correct 2394 ms 23776 KB Output is correct
78 Correct 2534 ms 23820 KB Output is correct
79 Correct 2331 ms 23772 KB Output is correct
80 Correct 2533 ms 23908 KB Output is correct
81 Execution timed out 5062 ms 23804 KB Time limit exceeded
82 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 41 ms 23812 KB Output is correct
2 Correct 52 ms 23788 KB Output is correct
3 Correct 22 ms 23728 KB Output is correct
4 Correct 196 ms 23784 KB Output is correct
5 Correct 1169 ms 23756 KB Output is correct
6 Correct 1128 ms 23772 KB Output is correct
7 Correct 1180 ms 23792 KB Output is correct
8 Correct 1332 ms 23876 KB Output is correct
9 Correct 1211 ms 23772 KB Output is correct
10 Correct 1245 ms 23772 KB Output is correct
11 Correct 1184 ms 23840 KB Output is correct
12 Correct 32 ms 23812 KB Output is correct
13 Correct 47 ms 23796 KB Output is correct
14 Correct 28 ms 23816 KB Output is correct
15 Correct 184 ms 23772 KB Output is correct
16 Correct 1155 ms 23796 KB Output is correct
17 Correct 1176 ms 23772 KB Output is correct
18 Correct 1246 ms 23804 KB Output is correct
19 Correct 1241 ms 23764 KB Output is correct
20 Correct 1192 ms 23768 KB Output is correct
21 Correct 1175 ms 23776 KB Output is correct
22 Correct 1160 ms 23772 KB Output is correct
23 Correct 2279 ms 23780 KB Output is correct
24 Correct 2376 ms 23836 KB Output is correct
25 Correct 2197 ms 23776 KB Output is correct
26 Correct 2692 ms 23836 KB Output is correct
27 Correct 2634 ms 23996 KB Output is correct
28 Correct 2236 ms 23760 KB Output is correct
29 Correct 2579 ms 23708 KB Output is correct
30 Correct 202 ms 23772 KB Output is correct
31 Correct 807 ms 23776 KB Output is correct
32 Correct 872 ms 23704 KB Output is correct
33 Correct 722 ms 23768 KB Output is correct
34 Correct 751 ms 23768 KB Output is correct
35 Correct 846 ms 23772 KB Output is correct
36 Correct 924 ms 23768 KB Output is correct
37 Correct 1133 ms 23764 KB Output is correct
38 Correct 780 ms 23772 KB Output is correct
39 Correct 882 ms 23796 KB Output is correct
40 Correct 33 ms 23812 KB Output is correct
41 Correct 45 ms 23772 KB Output is correct
42 Correct 25 ms 23804 KB Output is correct
43 Correct 225 ms 23804 KB Output is correct
44 Correct 914 ms 23772 KB Output is correct
45 Correct 706 ms 23772 KB Output is correct
46 Correct 790 ms 23704 KB Output is correct
47 Correct 741 ms 23768 KB Output is correct
48 Correct 709 ms 23772 KB Output is correct
49 Correct 725 ms 23768 KB Output is correct
50 Correct 801 ms 23704 KB Output is correct
51 Correct 805 ms 23768 KB Output is correct
52 Correct 842 ms 23788 KB Output is correct
53 Incorrect 808 ms 23772 KB Output isn't correct
54 Halted 0 ms 0 KB -