Submission #607337

# Submission time Handle Problem Language Result Execution time Memory
607337 2022-07-26T15:27:43 Z duality Uplifting Excursion (BOI22_vault) C++17
70 / 100
1107 ms 12112 KB
#define DEBUG 0

#include <bits/stdc++.h>
using namespace std;

#if DEBUG
// basic debugging macros
int __i__,__j__;
#define printLine(l) for(__i__=0;__i__<l;__i__++){cout<<"-";}cout<<endl
#define printLine2(l,c) for(__i__=0;__i__<l;__i__++){cout<<c;}cout<<endl
#define printVar(n) cout<<#n<<": "<<n<<endl
#define printArr(a,l) cout<<#a<<": ";for(__i__=0;__i__<l;__i__++){cout<<a[__i__]<<" ";}cout<<endl
#define print2dArr(a,r,c) cout<<#a<<":\n";for(__i__=0;__i__<r;__i__++){for(__j__=0;__j__<c;__j__++){cout<<a[__i__][__j__]<<" ";}cout<<endl;}
#define print2dArr2(a,r,c,l) cout<<#a<<":\n";for(__i__=0;__i__<r;__i__++){for(__j__=0;__j__<c;__j__++){cout<<setw(l)<<setfill(' ')<<a[__i__][__j__]<<" ";}cout<<endl;}

// advanced debugging class
// debug 1,2,'A',"test";
class _Debug {
    public:
        template<typename T>
        _Debug& operator,(T val) {
            cout << val << endl;
            return *this;
        }
};
#define debug _Debug(),
#else
#define printLine(l)
#define printLine2(l,c)
#define printVar(n)
#define printArr(a,l)
#define print2dArr(a,r,c)
#define print2dArr2(a,r,c,l)
#define debug
#endif

// define
#define MAX_VAL 999999999
#define MAX_VAL_2 999999999999999999LL
#define EPS 1e-6
#define mp make_pair
#define pb push_back

// typedef
typedef unsigned int UI;
typedef long long int LLI;
typedef unsigned long long int ULLI;
typedef unsigned short int US;
typedef pair<int,int> pii;
typedef pair<LLI,LLI> plli;
typedef vector<int> vi;
typedef vector<LLI> vlli;
typedef vector<pii> vpii;
typedef vector<plli> vplli;

// ---------- END OF TEMPLATE ----------

LLI _A[601],*A = _A+300;
LLI _curr[601],*curr = _curr+300;
vpii poss;
int _dp[3000001],*dp = _dp+1500000;
int main() {
    int i;
    int M;
    LLI L;
    scanf("%d %lld",&M,&L);
    for (i = -M; i <= M; i++) scanf("%lld",&A[i]);

    LLI s1 = 0,s2 = 0,ans = 0;
    for (i = 1; i <= M; i++) s1 += i*A[i];
    for (i = -M; i <= -1; i++) s2 += i*A[i];
    if ((L > s1) || (L < s2)) {
        printf("impossible\n");
        return 0;
    }
    LLI s = 0;
    if (L >= s1+s2) {
        for (i = 0; i <= M; i++) curr[i] = A[i],s += i*A[i];
        for (i = -1; i >= -M; i--) curr[i] = min((s-L)/(-i),A[i]),s += i*curr[i];
    }
    else {
        for (i = 0; i >= -M; i--) curr[i] = A[i],s += i*A[i];
        for (i = 1; i <= M; i++) curr[i] = min((L-s)/i,A[i]),s += i*curr[i];
    }
    L -= s;
    for (i = -M; i <= M; i++) {
        ans += curr[i];
        if (i != 0) {
            int t = min(curr[i],(LLI) M);
            if (t > 0) {
                int k = 1;
                while (t > k) t -= k,poss.pb(mp(-k*i,-k)),k *= 2;
                poss.pb(mp(-t*i,-t));
            }
            t = min(A[i]-curr[i],(LLI) M);
            if (t > 0) {
                int k = 1;
                while (t > k) t -= k,poss.pb(mp(k*i,k)),k *= 2;
                poss.pb(mp(t*i,t));
            }
        }
    }
    random_shuffle(poss.begin(),poss.end());
    int B = min(1500000,(int) 5e8/((int) poss.size()+1));
    fill(dp-B,dp+B,-1e9),dp[0] = 0;
    for (auto [c,v]: poss) {
        if (c > 0) {
            for (i = B; i >= -B+c; i--) dp[i] = max(dp[i],dp[i-c]+v);
        }
        else {
            for (i = -B; i <= B+c; i++) dp[i] = max(dp[i],dp[i-c]+v);
        }
    }
    if (dp[L] < -1e8) printf("impossible\n");
    else printf("%lld\n",ans+dp[L]);

    return 0;
}

Compilation message

vault.cpp: In function 'int main()':
vault.cpp:66:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   66 |     scanf("%d %lld",&M,&L);
      |     ~~~~~^~~~~~~~~~~~~~~~~
vault.cpp:67:36: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   67 |     for (i = -M; i <= M; i++) scanf("%lld",&A[i]);
      |                               ~~~~~^~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 27 ms 11988 KB Output is correct
2 Correct 19 ms 12016 KB Output is correct
3 Correct 11 ms 12044 KB Output is correct
4 Correct 85 ms 12024 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 849 ms 8248 KB Output is correct
7 Correct 553 ms 12032 KB Output is correct
8 Correct 850 ms 8316 KB Output is correct
9 Correct 813 ms 6816 KB Output is correct
10 Correct 42 ms 11988 KB Output is correct
11 Correct 59 ms 12024 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 27 ms 11988 KB Output is correct
2 Correct 19 ms 12016 KB Output is correct
3 Correct 11 ms 12044 KB Output is correct
4 Correct 85 ms 12024 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 849 ms 8248 KB Output is correct
7 Correct 553 ms 12032 KB Output is correct
8 Correct 850 ms 8316 KB Output is correct
9 Correct 813 ms 6816 KB Output is correct
10 Correct 42 ms 11988 KB Output is correct
11 Correct 59 ms 12024 KB Output is correct
12 Correct 25 ms 11988 KB Output is correct
13 Correct 20 ms 12048 KB Output is correct
14 Correct 11 ms 11988 KB Output is correct
15 Correct 83 ms 11988 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 909 ms 8248 KB Output is correct
18 Correct 547 ms 12032 KB Output is correct
19 Correct 832 ms 8312 KB Output is correct
20 Correct 859 ms 6800 KB Output is correct
21 Correct 42 ms 12032 KB Output is correct
22 Correct 60 ms 12028 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 897 ms 3700 KB Output is correct
25 Correct 886 ms 9240 KB Output is correct
26 Correct 827 ms 3120 KB Output is correct
27 Correct 841 ms 3028 KB Output is correct
28 Correct 48 ms 11988 KB Output is correct
29 Correct 73 ms 12064 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 77 ms 11988 KB Output is correct
2 Correct 393 ms 11988 KB Output is correct
3 Correct 123 ms 12024 KB Output is correct
4 Correct 417 ms 12032 KB Output is correct
5 Correct 420 ms 12028 KB Output is correct
6 Correct 352 ms 12032 KB Output is correct
7 Correct 45 ms 12028 KB Output is correct
8 Correct 69 ms 11988 KB Output is correct
9 Correct 204 ms 12032 KB Output is correct
10 Correct 258 ms 12028 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 77 ms 11988 KB Output is correct
2 Correct 393 ms 11988 KB Output is correct
3 Correct 123 ms 12024 KB Output is correct
4 Correct 417 ms 12032 KB Output is correct
5 Correct 420 ms 12028 KB Output is correct
6 Correct 352 ms 12032 KB Output is correct
7 Correct 45 ms 12028 KB Output is correct
8 Correct 69 ms 11988 KB Output is correct
9 Correct 204 ms 12032 KB Output is correct
10 Correct 258 ms 12028 KB Output is correct
11 Correct 23 ms 11988 KB Output is correct
12 Correct 18 ms 11992 KB Output is correct
13 Correct 12 ms 12044 KB Output is correct
14 Correct 82 ms 12032 KB Output is correct
15 Correct 361 ms 12108 KB Output is correct
16 Correct 113 ms 11988 KB Output is correct
17 Correct 397 ms 12032 KB Output is correct
18 Correct 485 ms 12108 KB Output is correct
19 Correct 367 ms 12032 KB Output is correct
20 Correct 44 ms 11988 KB Output is correct
21 Correct 52 ms 12028 KB Output is correct
22 Correct 204 ms 12032 KB Output is correct
23 Correct 254 ms 12044 KB Output is correct
24 Correct 688 ms 12036 KB Output is correct
25 Correct 298 ms 12028 KB Output is correct
26 Correct 835 ms 12032 KB Output is correct
27 Correct 718 ms 11988 KB Output is correct
28 Correct 720 ms 12040 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 77 ms 11988 KB Output is correct
2 Correct 393 ms 11988 KB Output is correct
3 Correct 123 ms 12024 KB Output is correct
4 Correct 417 ms 12032 KB Output is correct
5 Correct 420 ms 12028 KB Output is correct
6 Correct 352 ms 12032 KB Output is correct
7 Correct 45 ms 12028 KB Output is correct
8 Correct 69 ms 11988 KB Output is correct
9 Correct 204 ms 12032 KB Output is correct
10 Correct 258 ms 12028 KB Output is correct
11 Correct 88 ms 12028 KB Output is correct
12 Correct 357 ms 12028 KB Output is correct
13 Correct 106 ms 11988 KB Output is correct
14 Correct 393 ms 11988 KB Output is correct
15 Correct 418 ms 12028 KB Output is correct
16 Correct 377 ms 12028 KB Output is correct
17 Correct 56 ms 11988 KB Output is correct
18 Correct 55 ms 12028 KB Output is correct
19 Correct 196 ms 12032 KB Output is correct
20 Correct 298 ms 12028 KB Output is correct
21 Correct 57 ms 12032 KB Output is correct
22 Correct 65 ms 11988 KB Output is correct
23 Correct 716 ms 12040 KB Output is correct
24 Correct 312 ms 12028 KB Output is correct
25 Correct 733 ms 12036 KB Output is correct
26 Correct 832 ms 12032 KB Output is correct
27 Correct 770 ms 12040 KB Output is correct
28 Correct 621 ms 12028 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 27 ms 11988 KB Output is correct
2 Correct 19 ms 12016 KB Output is correct
3 Correct 11 ms 12044 KB Output is correct
4 Correct 85 ms 12024 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 849 ms 8248 KB Output is correct
7 Correct 553 ms 12032 KB Output is correct
8 Correct 850 ms 8316 KB Output is correct
9 Correct 813 ms 6816 KB Output is correct
10 Correct 42 ms 11988 KB Output is correct
11 Correct 59 ms 12024 KB Output is correct
12 Correct 77 ms 11988 KB Output is correct
13 Correct 393 ms 11988 KB Output is correct
14 Correct 123 ms 12024 KB Output is correct
15 Correct 417 ms 12032 KB Output is correct
16 Correct 420 ms 12028 KB Output is correct
17 Correct 352 ms 12032 KB Output is correct
18 Correct 45 ms 12028 KB Output is correct
19 Correct 69 ms 11988 KB Output is correct
20 Correct 204 ms 12032 KB Output is correct
21 Correct 258 ms 12028 KB Output is correct
22 Correct 23 ms 11988 KB Output is correct
23 Correct 18 ms 11992 KB Output is correct
24 Correct 12 ms 12044 KB Output is correct
25 Correct 82 ms 12032 KB Output is correct
26 Correct 361 ms 12108 KB Output is correct
27 Correct 113 ms 11988 KB Output is correct
28 Correct 397 ms 12032 KB Output is correct
29 Correct 485 ms 12108 KB Output is correct
30 Correct 367 ms 12032 KB Output is correct
31 Correct 44 ms 11988 KB Output is correct
32 Correct 52 ms 12028 KB Output is correct
33 Correct 204 ms 12032 KB Output is correct
34 Correct 254 ms 12044 KB Output is correct
35 Correct 688 ms 12036 KB Output is correct
36 Correct 298 ms 12028 KB Output is correct
37 Correct 835 ms 12032 KB Output is correct
38 Correct 718 ms 11988 KB Output is correct
39 Correct 720 ms 12040 KB Output is correct
40 Correct 88 ms 12028 KB Output is correct
41 Correct 357 ms 12028 KB Output is correct
42 Correct 106 ms 11988 KB Output is correct
43 Correct 393 ms 11988 KB Output is correct
44 Correct 418 ms 12028 KB Output is correct
45 Correct 377 ms 12028 KB Output is correct
46 Correct 56 ms 11988 KB Output is correct
47 Correct 55 ms 12028 KB Output is correct
48 Correct 196 ms 12032 KB Output is correct
49 Correct 298 ms 12028 KB Output is correct
50 Correct 57 ms 12032 KB Output is correct
51 Correct 65 ms 11988 KB Output is correct
52 Correct 716 ms 12040 KB Output is correct
53 Correct 312 ms 12028 KB Output is correct
54 Correct 733 ms 12036 KB Output is correct
55 Correct 832 ms 12032 KB Output is correct
56 Correct 770 ms 12040 KB Output is correct
57 Correct 621 ms 12028 KB Output is correct
58 Correct 24 ms 11988 KB Output is correct
59 Correct 24 ms 12036 KB Output is correct
60 Correct 12 ms 12044 KB Output is correct
61 Correct 80 ms 12024 KB Output is correct
62 Correct 0 ms 212 KB Output is correct
63 Correct 897 ms 8248 KB Output is correct
64 Correct 566 ms 12036 KB Output is correct
65 Correct 846 ms 8316 KB Output is correct
66 Correct 879 ms 6800 KB Output is correct
67 Correct 44 ms 11988 KB Output is correct
68 Correct 61 ms 11988 KB Output is correct
69 Correct 385 ms 12024 KB Output is correct
70 Correct 138 ms 12060 KB Output is correct
71 Correct 392 ms 12032 KB Output is correct
72 Correct 416 ms 12028 KB Output is correct
73 Correct 359 ms 12036 KB Output is correct
74 Correct 44 ms 11988 KB Output is correct
75 Correct 52 ms 12108 KB Output is correct
76 Correct 191 ms 12028 KB Output is correct
77 Correct 290 ms 12032 KB Output is correct
78 Correct 746 ms 12036 KB Output is correct
79 Correct 302 ms 12028 KB Output is correct
80 Correct 858 ms 12036 KB Output is correct
81 Correct 702 ms 12036 KB Output is correct
82 Correct 771 ms 12032 KB Output is correct
83 Correct 694 ms 12112 KB Output is correct
84 Correct 332 ms 12032 KB Output is correct
85 Correct 713 ms 12036 KB Output is correct
86 Correct 870 ms 12032 KB Output is correct
87 Correct 740 ms 12032 KB Output is correct
88 Correct 540 ms 12036 KB Output is correct
89 Correct 900 ms 7816 KB Output is correct
90 Correct 865 ms 6768 KB Output is correct
91 Correct 870 ms 8020 KB Output is correct
92 Correct 836 ms 7636 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 77 ms 11988 KB Output is correct
2 Correct 393 ms 11988 KB Output is correct
3 Correct 123 ms 12024 KB Output is correct
4 Correct 417 ms 12032 KB Output is correct
5 Correct 420 ms 12028 KB Output is correct
6 Correct 352 ms 12032 KB Output is correct
7 Correct 45 ms 12028 KB Output is correct
8 Correct 69 ms 11988 KB Output is correct
9 Correct 204 ms 12032 KB Output is correct
10 Correct 258 ms 12028 KB Output is correct
11 Correct 88 ms 12028 KB Output is correct
12 Correct 357 ms 12028 KB Output is correct
13 Correct 106 ms 11988 KB Output is correct
14 Correct 393 ms 11988 KB Output is correct
15 Correct 418 ms 12028 KB Output is correct
16 Correct 377 ms 12028 KB Output is correct
17 Correct 56 ms 11988 KB Output is correct
18 Correct 55 ms 12028 KB Output is correct
19 Correct 196 ms 12032 KB Output is correct
20 Correct 298 ms 12028 KB Output is correct
21 Correct 57 ms 12032 KB Output is correct
22 Correct 65 ms 11988 KB Output is correct
23 Correct 716 ms 12040 KB Output is correct
24 Correct 312 ms 12028 KB Output is correct
25 Correct 733 ms 12036 KB Output is correct
26 Correct 832 ms 12032 KB Output is correct
27 Correct 770 ms 12040 KB Output is correct
28 Correct 621 ms 12028 KB Output is correct
29 Correct 78 ms 12032 KB Output is correct
30 Correct 377 ms 12036 KB Output is correct
31 Correct 107 ms 12024 KB Output is correct
32 Correct 406 ms 12032 KB Output is correct
33 Correct 444 ms 12032 KB Output is correct
34 Correct 365 ms 12036 KB Output is correct
35 Correct 47 ms 12028 KB Output is correct
36 Correct 53 ms 11988 KB Output is correct
37 Correct 199 ms 12032 KB Output is correct
38 Correct 323 ms 12032 KB Output is correct
39 Correct 42 ms 12000 KB Output is correct
40 Correct 67 ms 12032 KB Output is correct
41 Correct 705 ms 12032 KB Output is correct
42 Correct 307 ms 12032 KB Output is correct
43 Correct 707 ms 12032 KB Output is correct
44 Correct 846 ms 12036 KB Output is correct
45 Correct 774 ms 12032 KB Output is correct
46 Correct 577 ms 12032 KB Output is correct
47 Correct 54 ms 11988 KB Output is correct
48 Correct 72 ms 12028 KB Output is correct
49 Correct 1097 ms 6872 KB Output is correct
50 Correct 778 ms 12036 KB Output is correct
51 Correct 1002 ms 6452 KB Output is correct
52 Correct 1037 ms 5848 KB Output is correct
53 Correct 1022 ms 6752 KB Output is correct
54 Correct 1106 ms 7968 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 27 ms 11988 KB Output is correct
2 Correct 19 ms 12016 KB Output is correct
3 Correct 11 ms 12044 KB Output is correct
4 Correct 85 ms 12024 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 849 ms 8248 KB Output is correct
7 Correct 553 ms 12032 KB Output is correct
8 Correct 850 ms 8316 KB Output is correct
9 Correct 813 ms 6816 KB Output is correct
10 Correct 42 ms 11988 KB Output is correct
11 Correct 59 ms 12024 KB Output is correct
12 Correct 25 ms 11988 KB Output is correct
13 Correct 20 ms 12048 KB Output is correct
14 Correct 11 ms 11988 KB Output is correct
15 Correct 83 ms 11988 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 909 ms 8248 KB Output is correct
18 Correct 547 ms 12032 KB Output is correct
19 Correct 832 ms 8312 KB Output is correct
20 Correct 859 ms 6800 KB Output is correct
21 Correct 42 ms 12032 KB Output is correct
22 Correct 60 ms 12028 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 897 ms 3700 KB Output is correct
25 Correct 886 ms 9240 KB Output is correct
26 Correct 827 ms 3120 KB Output is correct
27 Correct 841 ms 3028 KB Output is correct
28 Correct 48 ms 11988 KB Output is correct
29 Correct 73 ms 12064 KB Output is correct
30 Correct 77 ms 11988 KB Output is correct
31 Correct 393 ms 11988 KB Output is correct
32 Correct 123 ms 12024 KB Output is correct
33 Correct 417 ms 12032 KB Output is correct
34 Correct 420 ms 12028 KB Output is correct
35 Correct 352 ms 12032 KB Output is correct
36 Correct 45 ms 12028 KB Output is correct
37 Correct 69 ms 11988 KB Output is correct
38 Correct 204 ms 12032 KB Output is correct
39 Correct 258 ms 12028 KB Output is correct
40 Correct 23 ms 11988 KB Output is correct
41 Correct 18 ms 11992 KB Output is correct
42 Correct 12 ms 12044 KB Output is correct
43 Correct 82 ms 12032 KB Output is correct
44 Correct 361 ms 12108 KB Output is correct
45 Correct 113 ms 11988 KB Output is correct
46 Correct 397 ms 12032 KB Output is correct
47 Correct 485 ms 12108 KB Output is correct
48 Correct 367 ms 12032 KB Output is correct
49 Correct 44 ms 11988 KB Output is correct
50 Correct 52 ms 12028 KB Output is correct
51 Correct 204 ms 12032 KB Output is correct
52 Correct 254 ms 12044 KB Output is correct
53 Correct 688 ms 12036 KB Output is correct
54 Correct 298 ms 12028 KB Output is correct
55 Correct 835 ms 12032 KB Output is correct
56 Correct 718 ms 11988 KB Output is correct
57 Correct 720 ms 12040 KB Output is correct
58 Correct 88 ms 12028 KB Output is correct
59 Correct 357 ms 12028 KB Output is correct
60 Correct 106 ms 11988 KB Output is correct
61 Correct 393 ms 11988 KB Output is correct
62 Correct 418 ms 12028 KB Output is correct
63 Correct 377 ms 12028 KB Output is correct
64 Correct 56 ms 11988 KB Output is correct
65 Correct 55 ms 12028 KB Output is correct
66 Correct 196 ms 12032 KB Output is correct
67 Correct 298 ms 12028 KB Output is correct
68 Correct 57 ms 12032 KB Output is correct
69 Correct 65 ms 11988 KB Output is correct
70 Correct 716 ms 12040 KB Output is correct
71 Correct 312 ms 12028 KB Output is correct
72 Correct 733 ms 12036 KB Output is correct
73 Correct 832 ms 12032 KB Output is correct
74 Correct 770 ms 12040 KB Output is correct
75 Correct 621 ms 12028 KB Output is correct
76 Correct 24 ms 11988 KB Output is correct
77 Correct 24 ms 12036 KB Output is correct
78 Correct 12 ms 12044 KB Output is correct
79 Correct 80 ms 12024 KB Output is correct
80 Correct 0 ms 212 KB Output is correct
81 Correct 897 ms 8248 KB Output is correct
82 Correct 566 ms 12036 KB Output is correct
83 Correct 846 ms 8316 KB Output is correct
84 Correct 879 ms 6800 KB Output is correct
85 Correct 44 ms 11988 KB Output is correct
86 Correct 61 ms 11988 KB Output is correct
87 Correct 385 ms 12024 KB Output is correct
88 Correct 138 ms 12060 KB Output is correct
89 Correct 392 ms 12032 KB Output is correct
90 Correct 416 ms 12028 KB Output is correct
91 Correct 359 ms 12036 KB Output is correct
92 Correct 44 ms 11988 KB Output is correct
93 Correct 52 ms 12108 KB Output is correct
94 Correct 191 ms 12028 KB Output is correct
95 Correct 290 ms 12032 KB Output is correct
96 Correct 746 ms 12036 KB Output is correct
97 Correct 302 ms 12028 KB Output is correct
98 Correct 858 ms 12036 KB Output is correct
99 Correct 702 ms 12036 KB Output is correct
100 Correct 771 ms 12032 KB Output is correct
101 Correct 694 ms 12112 KB Output is correct
102 Correct 332 ms 12032 KB Output is correct
103 Correct 713 ms 12036 KB Output is correct
104 Correct 870 ms 12032 KB Output is correct
105 Correct 740 ms 12032 KB Output is correct
106 Correct 540 ms 12036 KB Output is correct
107 Correct 900 ms 7816 KB Output is correct
108 Correct 865 ms 6768 KB Output is correct
109 Correct 870 ms 8020 KB Output is correct
110 Correct 836 ms 7636 KB Output is correct
111 Correct 78 ms 12032 KB Output is correct
112 Correct 377 ms 12036 KB Output is correct
113 Correct 107 ms 12024 KB Output is correct
114 Correct 406 ms 12032 KB Output is correct
115 Correct 444 ms 12032 KB Output is correct
116 Correct 365 ms 12036 KB Output is correct
117 Correct 47 ms 12028 KB Output is correct
118 Correct 53 ms 11988 KB Output is correct
119 Correct 199 ms 12032 KB Output is correct
120 Correct 323 ms 12032 KB Output is correct
121 Correct 42 ms 12000 KB Output is correct
122 Correct 67 ms 12032 KB Output is correct
123 Correct 705 ms 12032 KB Output is correct
124 Correct 307 ms 12032 KB Output is correct
125 Correct 707 ms 12032 KB Output is correct
126 Correct 846 ms 12036 KB Output is correct
127 Correct 774 ms 12032 KB Output is correct
128 Correct 577 ms 12032 KB Output is correct
129 Correct 54 ms 11988 KB Output is correct
130 Correct 72 ms 12028 KB Output is correct
131 Correct 1097 ms 6872 KB Output is correct
132 Correct 778 ms 12036 KB Output is correct
133 Correct 1002 ms 6452 KB Output is correct
134 Correct 1037 ms 5848 KB Output is correct
135 Correct 1022 ms 6752 KB Output is correct
136 Correct 1106 ms 7968 KB Output is correct
137 Correct 33 ms 11988 KB Output is correct
138 Correct 22 ms 12040 KB Output is correct
139 Correct 14 ms 12048 KB Output is correct
140 Correct 105 ms 12028 KB Output is correct
141 Correct 1 ms 212 KB Output is correct
142 Correct 1018 ms 8252 KB Output is correct
143 Correct 658 ms 12032 KB Output is correct
144 Correct 1107 ms 8320 KB Output is correct
145 Correct 1025 ms 6800 KB Output is correct
146 Correct 47 ms 12032 KB Output is correct
147 Correct 67 ms 12028 KB Output is correct
148 Correct 1 ms 212 KB Output is correct
149 Correct 1099 ms 3700 KB Output is correct
150 Correct 981 ms 9248 KB Output is correct
151 Correct 977 ms 3112 KB Output is correct
152 Correct 933 ms 3116 KB Output is correct
153 Correct 65 ms 12028 KB Output is correct
154 Correct 83 ms 12032 KB Output is correct
155 Correct 413 ms 12028 KB Output is correct
156 Correct 125 ms 12032 KB Output is correct
157 Correct 604 ms 12032 KB Output is correct
158 Correct 514 ms 12036 KB Output is correct
159 Correct 442 ms 12032 KB Output is correct
160 Correct 56 ms 12032 KB Output is correct
161 Correct 59 ms 12028 KB Output is correct
162 Correct 207 ms 12036 KB Output is correct
163 Correct 324 ms 12032 KB Output is correct
164 Correct 801 ms 12040 KB Output is correct
165 Correct 348 ms 12036 KB Output is correct
166 Correct 783 ms 11988 KB Output is correct
167 Correct 856 ms 12036 KB Output is correct
168 Correct 774 ms 12040 KB Output is correct
169 Correct 542 ms 11988 KB Output is correct
170 Correct 676 ms 11984 KB Output is correct
171 Correct 300 ms 11988 KB Output is correct
172 Correct 804 ms 12040 KB Output is correct
173 Correct 749 ms 12036 KB Output is correct
174 Correct 760 ms 12040 KB Output is correct
175 Correct 841 ms 7820 KB Output is correct
176 Correct 851 ms 6760 KB Output is correct
177 Correct 825 ms 8020 KB Output is correct
178 Correct 898 ms 7648 KB Output is correct
179 Correct 831 ms 6988 KB Output is correct
180 Correct 668 ms 12036 KB Output is correct
181 Correct 822 ms 6452 KB Output is correct
182 Correct 886 ms 5844 KB Output is correct
183 Correct 853 ms 6748 KB Output is correct
184 Correct 862 ms 7964 KB Output is correct
185 Correct 800 ms 3596 KB Output is correct
186 Correct 823 ms 3108 KB Output is correct
187 Incorrect 877 ms 3540 KB Output isn't correct
188 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 77 ms 11988 KB Output is correct
2 Correct 393 ms 11988 KB Output is correct
3 Correct 123 ms 12024 KB Output is correct
4 Correct 417 ms 12032 KB Output is correct
5 Correct 420 ms 12028 KB Output is correct
6 Correct 352 ms 12032 KB Output is correct
7 Correct 45 ms 12028 KB Output is correct
8 Correct 69 ms 11988 KB Output is correct
9 Correct 204 ms 12032 KB Output is correct
10 Correct 258 ms 12028 KB Output is correct
11 Correct 88 ms 12028 KB Output is correct
12 Correct 357 ms 12028 KB Output is correct
13 Correct 106 ms 11988 KB Output is correct
14 Correct 393 ms 11988 KB Output is correct
15 Correct 418 ms 12028 KB Output is correct
16 Correct 377 ms 12028 KB Output is correct
17 Correct 56 ms 11988 KB Output is correct
18 Correct 55 ms 12028 KB Output is correct
19 Correct 196 ms 12032 KB Output is correct
20 Correct 298 ms 12028 KB Output is correct
21 Correct 57 ms 12032 KB Output is correct
22 Correct 65 ms 11988 KB Output is correct
23 Correct 716 ms 12040 KB Output is correct
24 Correct 312 ms 12028 KB Output is correct
25 Correct 733 ms 12036 KB Output is correct
26 Correct 832 ms 12032 KB Output is correct
27 Correct 770 ms 12040 KB Output is correct
28 Correct 621 ms 12028 KB Output is correct
29 Correct 78 ms 12032 KB Output is correct
30 Correct 377 ms 12036 KB Output is correct
31 Correct 107 ms 12024 KB Output is correct
32 Correct 406 ms 12032 KB Output is correct
33 Correct 444 ms 12032 KB Output is correct
34 Correct 365 ms 12036 KB Output is correct
35 Correct 47 ms 12028 KB Output is correct
36 Correct 53 ms 11988 KB Output is correct
37 Correct 199 ms 12032 KB Output is correct
38 Correct 323 ms 12032 KB Output is correct
39 Correct 42 ms 12000 KB Output is correct
40 Correct 67 ms 12032 KB Output is correct
41 Correct 705 ms 12032 KB Output is correct
42 Correct 307 ms 12032 KB Output is correct
43 Correct 707 ms 12032 KB Output is correct
44 Correct 846 ms 12036 KB Output is correct
45 Correct 774 ms 12032 KB Output is correct
46 Correct 577 ms 12032 KB Output is correct
47 Correct 54 ms 11988 KB Output is correct
48 Correct 72 ms 12028 KB Output is correct
49 Correct 1097 ms 6872 KB Output is correct
50 Correct 778 ms 12036 KB Output is correct
51 Correct 1002 ms 6452 KB Output is correct
52 Correct 1037 ms 5848 KB Output is correct
53 Correct 1022 ms 6752 KB Output is correct
54 Correct 1106 ms 7968 KB Output is correct
55 Correct 80 ms 12024 KB Output is correct
56 Correct 374 ms 12032 KB Output is correct
57 Correct 110 ms 12028 KB Output is correct
58 Correct 376 ms 12040 KB Output is correct
59 Correct 402 ms 12032 KB Output is correct
60 Correct 355 ms 11988 KB Output is correct
61 Correct 46 ms 11988 KB Output is correct
62 Correct 53 ms 12032 KB Output is correct
63 Correct 200 ms 12032 KB Output is correct
64 Correct 325 ms 12032 KB Output is correct
65 Correct 45 ms 11960 KB Output is correct
66 Correct 70 ms 12028 KB Output is correct
67 Correct 723 ms 12036 KB Output is correct
68 Correct 323 ms 12032 KB Output is correct
69 Correct 662 ms 12040 KB Output is correct
70 Correct 789 ms 12036 KB Output is correct
71 Correct 750 ms 12032 KB Output is correct
72 Correct 545 ms 12036 KB Output is correct
73 Correct 48 ms 11988 KB Output is correct
74 Correct 77 ms 11988 KB Output is correct
75 Correct 829 ms 6872 KB Output is correct
76 Correct 691 ms 12040 KB Output is correct
77 Correct 872 ms 6452 KB Output is correct
78 Correct 825 ms 5848 KB Output is correct
79 Correct 932 ms 6752 KB Output is correct
80 Correct 877 ms 7964 KB Output is correct
81 Correct 878 ms 2028 KB Output is correct
82 Incorrect 808 ms 4120 KB Output isn't correct
83 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 27 ms 11988 KB Output is correct
2 Correct 19 ms 12016 KB Output is correct
3 Correct 11 ms 12044 KB Output is correct
4 Correct 85 ms 12024 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 849 ms 8248 KB Output is correct
7 Correct 553 ms 12032 KB Output is correct
8 Correct 850 ms 8316 KB Output is correct
9 Correct 813 ms 6816 KB Output is correct
10 Correct 42 ms 11988 KB Output is correct
11 Correct 59 ms 12024 KB Output is correct
12 Correct 25 ms 11988 KB Output is correct
13 Correct 20 ms 12048 KB Output is correct
14 Correct 11 ms 11988 KB Output is correct
15 Correct 83 ms 11988 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 909 ms 8248 KB Output is correct
18 Correct 547 ms 12032 KB Output is correct
19 Correct 832 ms 8312 KB Output is correct
20 Correct 859 ms 6800 KB Output is correct
21 Correct 42 ms 12032 KB Output is correct
22 Correct 60 ms 12028 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 897 ms 3700 KB Output is correct
25 Correct 886 ms 9240 KB Output is correct
26 Correct 827 ms 3120 KB Output is correct
27 Correct 841 ms 3028 KB Output is correct
28 Correct 48 ms 11988 KB Output is correct
29 Correct 73 ms 12064 KB Output is correct
30 Correct 77 ms 11988 KB Output is correct
31 Correct 393 ms 11988 KB Output is correct
32 Correct 123 ms 12024 KB Output is correct
33 Correct 417 ms 12032 KB Output is correct
34 Correct 420 ms 12028 KB Output is correct
35 Correct 352 ms 12032 KB Output is correct
36 Correct 45 ms 12028 KB Output is correct
37 Correct 69 ms 11988 KB Output is correct
38 Correct 204 ms 12032 KB Output is correct
39 Correct 258 ms 12028 KB Output is correct
40 Correct 23 ms 11988 KB Output is correct
41 Correct 18 ms 11992 KB Output is correct
42 Correct 12 ms 12044 KB Output is correct
43 Correct 82 ms 12032 KB Output is correct
44 Correct 361 ms 12108 KB Output is correct
45 Correct 113 ms 11988 KB Output is correct
46 Correct 397 ms 12032 KB Output is correct
47 Correct 485 ms 12108 KB Output is correct
48 Correct 367 ms 12032 KB Output is correct
49 Correct 44 ms 11988 KB Output is correct
50 Correct 52 ms 12028 KB Output is correct
51 Correct 204 ms 12032 KB Output is correct
52 Correct 254 ms 12044 KB Output is correct
53 Correct 688 ms 12036 KB Output is correct
54 Correct 298 ms 12028 KB Output is correct
55 Correct 835 ms 12032 KB Output is correct
56 Correct 718 ms 11988 KB Output is correct
57 Correct 720 ms 12040 KB Output is correct
58 Correct 88 ms 12028 KB Output is correct
59 Correct 357 ms 12028 KB Output is correct
60 Correct 106 ms 11988 KB Output is correct
61 Correct 393 ms 11988 KB Output is correct
62 Correct 418 ms 12028 KB Output is correct
63 Correct 377 ms 12028 KB Output is correct
64 Correct 56 ms 11988 KB Output is correct
65 Correct 55 ms 12028 KB Output is correct
66 Correct 196 ms 12032 KB Output is correct
67 Correct 298 ms 12028 KB Output is correct
68 Correct 57 ms 12032 KB Output is correct
69 Correct 65 ms 11988 KB Output is correct
70 Correct 716 ms 12040 KB Output is correct
71 Correct 312 ms 12028 KB Output is correct
72 Correct 733 ms 12036 KB Output is correct
73 Correct 832 ms 12032 KB Output is correct
74 Correct 770 ms 12040 KB Output is correct
75 Correct 621 ms 12028 KB Output is correct
76 Correct 24 ms 11988 KB Output is correct
77 Correct 24 ms 12036 KB Output is correct
78 Correct 12 ms 12044 KB Output is correct
79 Correct 80 ms 12024 KB Output is correct
80 Correct 0 ms 212 KB Output is correct
81 Correct 897 ms 8248 KB Output is correct
82 Correct 566 ms 12036 KB Output is correct
83 Correct 846 ms 8316 KB Output is correct
84 Correct 879 ms 6800 KB Output is correct
85 Correct 44 ms 11988 KB Output is correct
86 Correct 61 ms 11988 KB Output is correct
87 Correct 385 ms 12024 KB Output is correct
88 Correct 138 ms 12060 KB Output is correct
89 Correct 392 ms 12032 KB Output is correct
90 Correct 416 ms 12028 KB Output is correct
91 Correct 359 ms 12036 KB Output is correct
92 Correct 44 ms 11988 KB Output is correct
93 Correct 52 ms 12108 KB Output is correct
94 Correct 191 ms 12028 KB Output is correct
95 Correct 290 ms 12032 KB Output is correct
96 Correct 746 ms 12036 KB Output is correct
97 Correct 302 ms 12028 KB Output is correct
98 Correct 858 ms 12036 KB Output is correct
99 Correct 702 ms 12036 KB Output is correct
100 Correct 771 ms 12032 KB Output is correct
101 Correct 694 ms 12112 KB Output is correct
102 Correct 332 ms 12032 KB Output is correct
103 Correct 713 ms 12036 KB Output is correct
104 Correct 870 ms 12032 KB Output is correct
105 Correct 740 ms 12032 KB Output is correct
106 Correct 540 ms 12036 KB Output is correct
107 Correct 900 ms 7816 KB Output is correct
108 Correct 865 ms 6768 KB Output is correct
109 Correct 870 ms 8020 KB Output is correct
110 Correct 836 ms 7636 KB Output is correct
111 Correct 78 ms 12032 KB Output is correct
112 Correct 377 ms 12036 KB Output is correct
113 Correct 107 ms 12024 KB Output is correct
114 Correct 406 ms 12032 KB Output is correct
115 Correct 444 ms 12032 KB Output is correct
116 Correct 365 ms 12036 KB Output is correct
117 Correct 47 ms 12028 KB Output is correct
118 Correct 53 ms 11988 KB Output is correct
119 Correct 199 ms 12032 KB Output is correct
120 Correct 323 ms 12032 KB Output is correct
121 Correct 42 ms 12000 KB Output is correct
122 Correct 67 ms 12032 KB Output is correct
123 Correct 705 ms 12032 KB Output is correct
124 Correct 307 ms 12032 KB Output is correct
125 Correct 707 ms 12032 KB Output is correct
126 Correct 846 ms 12036 KB Output is correct
127 Correct 774 ms 12032 KB Output is correct
128 Correct 577 ms 12032 KB Output is correct
129 Correct 54 ms 11988 KB Output is correct
130 Correct 72 ms 12028 KB Output is correct
131 Correct 1097 ms 6872 KB Output is correct
132 Correct 778 ms 12036 KB Output is correct
133 Correct 1002 ms 6452 KB Output is correct
134 Correct 1037 ms 5848 KB Output is correct
135 Correct 1022 ms 6752 KB Output is correct
136 Correct 1106 ms 7968 KB Output is correct
137 Correct 33 ms 11988 KB Output is correct
138 Correct 22 ms 12040 KB Output is correct
139 Correct 14 ms 12048 KB Output is correct
140 Correct 105 ms 12028 KB Output is correct
141 Correct 1 ms 212 KB Output is correct
142 Correct 1018 ms 8252 KB Output is correct
143 Correct 658 ms 12032 KB Output is correct
144 Correct 1107 ms 8320 KB Output is correct
145 Correct 1025 ms 6800 KB Output is correct
146 Correct 47 ms 12032 KB Output is correct
147 Correct 67 ms 12028 KB Output is correct
148 Correct 1 ms 212 KB Output is correct
149 Correct 1099 ms 3700 KB Output is correct
150 Correct 981 ms 9248 KB Output is correct
151 Correct 977 ms 3112 KB Output is correct
152 Correct 933 ms 3116 KB Output is correct
153 Correct 65 ms 12028 KB Output is correct
154 Correct 83 ms 12032 KB Output is correct
155 Correct 413 ms 12028 KB Output is correct
156 Correct 125 ms 12032 KB Output is correct
157 Correct 604 ms 12032 KB Output is correct
158 Correct 514 ms 12036 KB Output is correct
159 Correct 442 ms 12032 KB Output is correct
160 Correct 56 ms 12032 KB Output is correct
161 Correct 59 ms 12028 KB Output is correct
162 Correct 207 ms 12036 KB Output is correct
163 Correct 324 ms 12032 KB Output is correct
164 Correct 801 ms 12040 KB Output is correct
165 Correct 348 ms 12036 KB Output is correct
166 Correct 783 ms 11988 KB Output is correct
167 Correct 856 ms 12036 KB Output is correct
168 Correct 774 ms 12040 KB Output is correct
169 Correct 542 ms 11988 KB Output is correct
170 Correct 676 ms 11984 KB Output is correct
171 Correct 300 ms 11988 KB Output is correct
172 Correct 804 ms 12040 KB Output is correct
173 Correct 749 ms 12036 KB Output is correct
174 Correct 760 ms 12040 KB Output is correct
175 Correct 841 ms 7820 KB Output is correct
176 Correct 851 ms 6760 KB Output is correct
177 Correct 825 ms 8020 KB Output is correct
178 Correct 898 ms 7648 KB Output is correct
179 Correct 831 ms 6988 KB Output is correct
180 Correct 668 ms 12036 KB Output is correct
181 Correct 822 ms 6452 KB Output is correct
182 Correct 886 ms 5844 KB Output is correct
183 Correct 853 ms 6748 KB Output is correct
184 Correct 862 ms 7964 KB Output is correct
185 Correct 800 ms 3596 KB Output is correct
186 Correct 823 ms 3108 KB Output is correct
187 Incorrect 877 ms 3540 KB Output isn't correct
188 Halted 0 ms 0 KB -