Submission #807272

# Submission time Handle Problem Language Result Execution time Memory
807272 2023-08-04T15:25:50 Z someone Cookies (JOI23_cookies) C++14
100 / 100
348 ms 233656 KB
#include <bits/stdc++.h>
//#define int long long
using namespace std;

const int N = 1.5e4 + 42;

vector<int> boite;
vector<bitset<N>> dp[N];
int n, m, a[N], sz[N], prefix[N];

void remonter(int i, int j, int sum) {
    if(sum == 0)
        return;
    if(dp[i-1][j][sum - sz[j]]) {
        boite.push_back(-sz[j]);
        remonter(i-1, j, sum - sz[j]);
    } else {
        remonter(i, j+1, sum);
    }
}

void printSol() {
    priority_queue<pair<int, int>> pq;
    for(int i = 0; i < n; i++)
        pq.push({a[i], i});
    cout << boite.size() << '\n';
    for(int b : boite) {
        b = -b;
        cout << b << ' ';
        vector<int> ids;
        for(int j = 0; j < b; j++) {
            cout << pq.top().second+1 << ' ';
            ids.push_back(pq.top().second);
            pq.pop();
        }
        for(int i : ids)
            pq.push({--a[i], i});
        cout << '\n';
    }
}

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    cin >> n;
    for(int i = 0; i < n; i++) {
        cin >> a[i];
        for(int j = 0; j < N; j++)
            prefix[j] += min(j, a[i]);
    }
    cin >> m;
    dp[0].resize(m);
    dp[0][m-1] = true;
    for(int i = 0; i < m; i++)
        cin >> sz[i];
    int sum = prefix[N-1];
    for(int i = 0; i <= sum; i++) {
        for(int j = m-1; j >= 0; j--)
            if(i * sz[j] <= sum) {
                dp[i+1].resize(j+1);
                j = 0;
            }
        for(int j = m-1; j >= 0; j--)
            if(i * sz[j] <= sum) {
                dp[i][j] <<= (N-prefix[i]-1);
                dp[i][j] >>= (N-prefix[i]-1);
              
                if(dp[i][j][sum]) {
                    remonter(i, j, sum);
                    printSol();
                    return 0;
                }
                if(j > 0)
                    dp[i][j-1] |= dp[i][j];
                if((i+1) * sz[j] <= sum)
                    dp[i+1][j] |= (dp[i][j] << sz[j]);
            }
    }
    cout << -1 << '\n';
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 724 KB Output is correct
2 Correct 1 ms 724 KB Output is correct
3 Correct 0 ms 724 KB Output is correct
4 Correct 1 ms 724 KB Output is correct
5 Correct 1 ms 724 KB Output is correct
6 Correct 1 ms 724 KB Output is correct
7 Correct 1 ms 724 KB Output is correct
8 Correct 7 ms 1620 KB Output is correct
9 Correct 6 ms 724 KB Output is correct
10 Correct 8 ms 3924 KB Output is correct
11 Correct 7 ms 2132 KB Output is correct
12 Correct 7 ms 1748 KB Output is correct
13 Correct 7 ms 1876 KB Output is correct
14 Correct 7 ms 2280 KB Output is correct
15 Correct 7 ms 2132 KB Output is correct
16 Correct 7 ms 2260 KB Output is correct
17 Correct 6 ms 872 KB Output is correct
18 Correct 6 ms 980 KB Output is correct
19 Correct 7 ms 864 KB Output is correct
20 Correct 7 ms 744 KB Output is correct
21 Correct 7 ms 1364 KB Output is correct
22 Correct 8 ms 4180 KB Output is correct
23 Correct 8 ms 3796 KB Output is correct
24 Correct 7 ms 980 KB Output is correct
25 Correct 6 ms 980 KB Output is correct
26 Correct 6 ms 980 KB Output is correct
27 Correct 7 ms 1000 KB Output is correct
28 Correct 6 ms 1748 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 724 KB Output is correct
2 Correct 0 ms 724 KB Output is correct
3 Correct 1 ms 724 KB Output is correct
4 Correct 1 ms 724 KB Output is correct
5 Correct 7 ms 1620 KB Output is correct
6 Correct 7 ms 744 KB Output is correct
7 Correct 1 ms 724 KB Output is correct
8 Correct 1 ms 1620 KB Output is correct
9 Correct 4 ms 6356 KB Output is correct
10 Correct 22 ms 28884 KB Output is correct
11 Correct 1 ms 724 KB Output is correct
12 Correct 1 ms 724 KB Output is correct
13 Correct 0 ms 724 KB Output is correct
14 Correct 0 ms 724 KB Output is correct
15 Correct 1 ms 724 KB Output is correct
16 Correct 1 ms 724 KB Output is correct
17 Correct 1 ms 724 KB Output is correct
18 Correct 7 ms 7788 KB Output is correct
19 Correct 15 ms 10144 KB Output is correct
20 Correct 8 ms 1108 KB Output is correct
21 Correct 8 ms 872 KB Output is correct
22 Correct 5 ms 980 KB Output is correct
23 Correct 6 ms 724 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 724 KB Output is correct
2 Correct 1 ms 724 KB Output is correct
3 Correct 0 ms 724 KB Output is correct
4 Correct 1 ms 724 KB Output is correct
5 Correct 1 ms 724 KB Output is correct
6 Correct 1 ms 724 KB Output is correct
7 Correct 1 ms 724 KB Output is correct
8 Correct 1 ms 724 KB Output is correct
9 Correct 1 ms 724 KB Output is correct
10 Correct 1 ms 724 KB Output is correct
11 Correct 1 ms 724 KB Output is correct
12 Correct 1 ms 724 KB Output is correct
13 Correct 1 ms 724 KB Output is correct
14 Correct 1 ms 724 KB Output is correct
15 Correct 1 ms 724 KB Output is correct
16 Correct 1 ms 724 KB Output is correct
17 Correct 1 ms 724 KB Output is correct
18 Correct 1 ms 724 KB Output is correct
19 Correct 1 ms 724 KB Output is correct
20 Correct 1 ms 724 KB Output is correct
21 Correct 1 ms 724 KB Output is correct
22 Correct 1 ms 724 KB Output is correct
23 Correct 1 ms 724 KB Output is correct
24 Correct 1 ms 724 KB Output is correct
25 Correct 1 ms 724 KB Output is correct
26 Correct 1 ms 724 KB Output is correct
27 Correct 1 ms 728 KB Output is correct
28 Correct 1 ms 724 KB Output is correct
29 Correct 0 ms 724 KB Output is correct
30 Correct 1 ms 724 KB Output is correct
31 Correct 1 ms 724 KB Output is correct
32 Correct 1 ms 724 KB Output is correct
33 Correct 1 ms 724 KB Output is correct
34 Correct 1 ms 724 KB Output is correct
35 Correct 1 ms 724 KB Output is correct
36 Correct 1 ms 724 KB Output is correct
37 Correct 1 ms 724 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 724 KB Output is correct
2 Correct 1 ms 724 KB Output is correct
3 Correct 0 ms 724 KB Output is correct
4 Correct 1 ms 724 KB Output is correct
5 Correct 1 ms 724 KB Output is correct
6 Correct 1 ms 724 KB Output is correct
7 Correct 1 ms 724 KB Output is correct
8 Correct 7 ms 1620 KB Output is correct
9 Correct 6 ms 724 KB Output is correct
10 Correct 8 ms 3924 KB Output is correct
11 Correct 7 ms 2132 KB Output is correct
12 Correct 7 ms 1748 KB Output is correct
13 Correct 7 ms 1876 KB Output is correct
14 Correct 7 ms 2280 KB Output is correct
15 Correct 7 ms 2132 KB Output is correct
16 Correct 7 ms 2260 KB Output is correct
17 Correct 6 ms 872 KB Output is correct
18 Correct 6 ms 980 KB Output is correct
19 Correct 7 ms 864 KB Output is correct
20 Correct 7 ms 744 KB Output is correct
21 Correct 7 ms 1364 KB Output is correct
22 Correct 8 ms 4180 KB Output is correct
23 Correct 8 ms 3796 KB Output is correct
24 Correct 7 ms 980 KB Output is correct
25 Correct 6 ms 980 KB Output is correct
26 Correct 6 ms 980 KB Output is correct
27 Correct 7 ms 1000 KB Output is correct
28 Correct 6 ms 1748 KB Output is correct
29 Correct 1 ms 724 KB Output is correct
30 Correct 1 ms 724 KB Output is correct
31 Correct 0 ms 724 KB Output is correct
32 Correct 1 ms 724 KB Output is correct
33 Correct 1 ms 724 KB Output is correct
34 Correct 1 ms 724 KB Output is correct
35 Correct 1 ms 724 KB Output is correct
36 Correct 1 ms 724 KB Output is correct
37 Correct 1 ms 724 KB Output is correct
38 Correct 1 ms 724 KB Output is correct
39 Correct 1 ms 724 KB Output is correct
40 Correct 1 ms 724 KB Output is correct
41 Correct 1 ms 724 KB Output is correct
42 Correct 1 ms 724 KB Output is correct
43 Correct 1 ms 724 KB Output is correct
44 Correct 1 ms 724 KB Output is correct
45 Correct 1 ms 724 KB Output is correct
46 Correct 1 ms 724 KB Output is correct
47 Correct 1 ms 724 KB Output is correct
48 Correct 1 ms 724 KB Output is correct
49 Correct 1 ms 724 KB Output is correct
50 Correct 1 ms 724 KB Output is correct
51 Correct 1 ms 724 KB Output is correct
52 Correct 1 ms 724 KB Output is correct
53 Correct 1 ms 724 KB Output is correct
54 Correct 1 ms 724 KB Output is correct
55 Correct 1 ms 728 KB Output is correct
56 Correct 1 ms 724 KB Output is correct
57 Correct 0 ms 724 KB Output is correct
58 Correct 1 ms 724 KB Output is correct
59 Correct 1 ms 724 KB Output is correct
60 Correct 1 ms 724 KB Output is correct
61 Correct 1 ms 724 KB Output is correct
62 Correct 1 ms 724 KB Output is correct
63 Correct 1 ms 724 KB Output is correct
64 Correct 1 ms 724 KB Output is correct
65 Correct 1 ms 724 KB Output is correct
66 Correct 1 ms 724 KB Output is correct
67 Correct 1 ms 1620 KB Output is correct
68 Correct 1 ms 724 KB Output is correct
69 Correct 1 ms 724 KB Output is correct
70 Correct 2 ms 980 KB Output is correct
71 Correct 3 ms 852 KB Output is correct
72 Correct 3 ms 864 KB Output is correct
73 Correct 4 ms 852 KB Output is correct
74 Correct 4 ms 736 KB Output is correct
75 Correct 5 ms 852 KB Output is correct
76 Correct 2 ms 1236 KB Output is correct
77 Correct 2 ms 980 KB Output is correct
78 Correct 1 ms 1236 KB Output is correct
79 Correct 2 ms 1236 KB Output is correct
80 Correct 1 ms 1364 KB Output is correct
81 Correct 1 ms 852 KB Output is correct
82 Correct 1 ms 1236 KB Output is correct
83 Correct 2 ms 724 KB Output is correct
84 Correct 2 ms 1364 KB Output is correct
85 Correct 2 ms 1236 KB Output is correct
86 Correct 2 ms 1108 KB Output is correct
87 Correct 2 ms 980 KB Output is correct
88 Correct 2 ms 1108 KB Output is correct
89 Correct 3 ms 980 KB Output is correct
90 Correct 3 ms 852 KB Output is correct
91 Correct 4 ms 980 KB Output is correct
92 Correct 2 ms 1876 KB Output is correct
93 Correct 9 ms 5612 KB Output is correct
94 Correct 7 ms 3412 KB Output is correct
95 Correct 1 ms 1492 KB Output is correct
96 Correct 2 ms 852 KB Output is correct
97 Correct 4 ms 852 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 724 KB Output is correct
2 Correct 1 ms 724 KB Output is correct
3 Correct 0 ms 724 KB Output is correct
4 Correct 1 ms 724 KB Output is correct
5 Correct 1 ms 724 KB Output is correct
6 Correct 1 ms 724 KB Output is correct
7 Correct 1 ms 724 KB Output is correct
8 Correct 7 ms 1620 KB Output is correct
9 Correct 6 ms 724 KB Output is correct
10 Correct 8 ms 3924 KB Output is correct
11 Correct 7 ms 2132 KB Output is correct
12 Correct 7 ms 1748 KB Output is correct
13 Correct 7 ms 1876 KB Output is correct
14 Correct 7 ms 2280 KB Output is correct
15 Correct 7 ms 2132 KB Output is correct
16 Correct 7 ms 2260 KB Output is correct
17 Correct 6 ms 872 KB Output is correct
18 Correct 6 ms 980 KB Output is correct
19 Correct 7 ms 864 KB Output is correct
20 Correct 7 ms 744 KB Output is correct
21 Correct 7 ms 1364 KB Output is correct
22 Correct 8 ms 4180 KB Output is correct
23 Correct 8 ms 3796 KB Output is correct
24 Correct 7 ms 980 KB Output is correct
25 Correct 6 ms 980 KB Output is correct
26 Correct 6 ms 980 KB Output is correct
27 Correct 7 ms 1000 KB Output is correct
28 Correct 6 ms 1748 KB Output is correct
29 Correct 1 ms 724 KB Output is correct
30 Correct 1 ms 724 KB Output is correct
31 Correct 0 ms 724 KB Output is correct
32 Correct 1 ms 724 KB Output is correct
33 Correct 1 ms 724 KB Output is correct
34 Correct 1 ms 724 KB Output is correct
35 Correct 1 ms 724 KB Output is correct
36 Correct 1 ms 724 KB Output is correct
37 Correct 1 ms 724 KB Output is correct
38 Correct 1 ms 724 KB Output is correct
39 Correct 1 ms 724 KB Output is correct
40 Correct 1 ms 724 KB Output is correct
41 Correct 1 ms 724 KB Output is correct
42 Correct 1 ms 724 KB Output is correct
43 Correct 1 ms 724 KB Output is correct
44 Correct 1 ms 724 KB Output is correct
45 Correct 1 ms 724 KB Output is correct
46 Correct 1 ms 724 KB Output is correct
47 Correct 1 ms 724 KB Output is correct
48 Correct 1 ms 724 KB Output is correct
49 Correct 1 ms 724 KB Output is correct
50 Correct 1 ms 724 KB Output is correct
51 Correct 1 ms 724 KB Output is correct
52 Correct 1 ms 724 KB Output is correct
53 Correct 1 ms 724 KB Output is correct
54 Correct 1 ms 724 KB Output is correct
55 Correct 1 ms 728 KB Output is correct
56 Correct 1 ms 724 KB Output is correct
57 Correct 0 ms 724 KB Output is correct
58 Correct 1 ms 724 KB Output is correct
59 Correct 1 ms 724 KB Output is correct
60 Correct 1 ms 724 KB Output is correct
61 Correct 1 ms 724 KB Output is correct
62 Correct 1 ms 724 KB Output is correct
63 Correct 1 ms 724 KB Output is correct
64 Correct 1 ms 724 KB Output is correct
65 Correct 1 ms 724 KB Output is correct
66 Correct 1 ms 724 KB Output is correct
67 Correct 1 ms 1620 KB Output is correct
68 Correct 1 ms 724 KB Output is correct
69 Correct 1 ms 724 KB Output is correct
70 Correct 2 ms 980 KB Output is correct
71 Correct 3 ms 852 KB Output is correct
72 Correct 3 ms 864 KB Output is correct
73 Correct 4 ms 852 KB Output is correct
74 Correct 4 ms 736 KB Output is correct
75 Correct 5 ms 852 KB Output is correct
76 Correct 2 ms 1236 KB Output is correct
77 Correct 2 ms 980 KB Output is correct
78 Correct 1 ms 1236 KB Output is correct
79 Correct 2 ms 1236 KB Output is correct
80 Correct 1 ms 1364 KB Output is correct
81 Correct 1 ms 852 KB Output is correct
82 Correct 1 ms 1236 KB Output is correct
83 Correct 2 ms 724 KB Output is correct
84 Correct 2 ms 1364 KB Output is correct
85 Correct 2 ms 1236 KB Output is correct
86 Correct 2 ms 1108 KB Output is correct
87 Correct 2 ms 980 KB Output is correct
88 Correct 2 ms 1108 KB Output is correct
89 Correct 3 ms 980 KB Output is correct
90 Correct 3 ms 852 KB Output is correct
91 Correct 4 ms 980 KB Output is correct
92 Correct 2 ms 1876 KB Output is correct
93 Correct 9 ms 5612 KB Output is correct
94 Correct 7 ms 3412 KB Output is correct
95 Correct 1 ms 1492 KB Output is correct
96 Correct 2 ms 852 KB Output is correct
97 Correct 4 ms 852 KB Output is correct
98 Correct 5 ms 6356 KB Output is correct
99 Correct 7 ms 748 KB Output is correct
100 Correct 2 ms 2644 KB Output is correct
101 Correct 3 ms 1364 KB Output is correct
102 Correct 8 ms 852 KB Output is correct
103 Correct 6 ms 1492 KB Output is correct
104 Correct 9 ms 1236 KB Output is correct
105 Correct 11 ms 8148 KB Output is correct
106 Correct 55 ms 39044 KB Output is correct
107 Correct 45 ms 19808 KB Output is correct
108 Correct 4 ms 5076 KB Output is correct
109 Correct 17 ms 1000 KB Output is correct
110 Correct 27 ms 1004 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 724 KB Output is correct
2 Correct 1 ms 724 KB Output is correct
3 Correct 0 ms 724 KB Output is correct
4 Correct 1 ms 724 KB Output is correct
5 Correct 1 ms 724 KB Output is correct
6 Correct 1 ms 724 KB Output is correct
7 Correct 1 ms 724 KB Output is correct
8 Correct 7 ms 1620 KB Output is correct
9 Correct 6 ms 724 KB Output is correct
10 Correct 8 ms 3924 KB Output is correct
11 Correct 7 ms 2132 KB Output is correct
12 Correct 7 ms 1748 KB Output is correct
13 Correct 7 ms 1876 KB Output is correct
14 Correct 7 ms 2280 KB Output is correct
15 Correct 7 ms 2132 KB Output is correct
16 Correct 7 ms 2260 KB Output is correct
17 Correct 6 ms 872 KB Output is correct
18 Correct 6 ms 980 KB Output is correct
19 Correct 7 ms 864 KB Output is correct
20 Correct 7 ms 744 KB Output is correct
21 Correct 7 ms 1364 KB Output is correct
22 Correct 8 ms 4180 KB Output is correct
23 Correct 8 ms 3796 KB Output is correct
24 Correct 7 ms 980 KB Output is correct
25 Correct 6 ms 980 KB Output is correct
26 Correct 6 ms 980 KB Output is correct
27 Correct 7 ms 1000 KB Output is correct
28 Correct 6 ms 1748 KB Output is correct
29 Correct 1 ms 724 KB Output is correct
30 Correct 0 ms 724 KB Output is correct
31 Correct 1 ms 724 KB Output is correct
32 Correct 1 ms 724 KB Output is correct
33 Correct 7 ms 1620 KB Output is correct
34 Correct 7 ms 744 KB Output is correct
35 Correct 1 ms 724 KB Output is correct
36 Correct 1 ms 1620 KB Output is correct
37 Correct 4 ms 6356 KB Output is correct
38 Correct 22 ms 28884 KB Output is correct
39 Correct 1 ms 724 KB Output is correct
40 Correct 1 ms 724 KB Output is correct
41 Correct 0 ms 724 KB Output is correct
42 Correct 0 ms 724 KB Output is correct
43 Correct 1 ms 724 KB Output is correct
44 Correct 1 ms 724 KB Output is correct
45 Correct 1 ms 724 KB Output is correct
46 Correct 7 ms 7788 KB Output is correct
47 Correct 15 ms 10144 KB Output is correct
48 Correct 8 ms 1108 KB Output is correct
49 Correct 8 ms 872 KB Output is correct
50 Correct 5 ms 980 KB Output is correct
51 Correct 6 ms 724 KB Output is correct
52 Correct 1 ms 724 KB Output is correct
53 Correct 1 ms 724 KB Output is correct
54 Correct 0 ms 724 KB Output is correct
55 Correct 1 ms 724 KB Output is correct
56 Correct 1 ms 724 KB Output is correct
57 Correct 1 ms 724 KB Output is correct
58 Correct 1 ms 724 KB Output is correct
59 Correct 1 ms 724 KB Output is correct
60 Correct 1 ms 724 KB Output is correct
61 Correct 1 ms 724 KB Output is correct
62 Correct 1 ms 724 KB Output is correct
63 Correct 1 ms 724 KB Output is correct
64 Correct 1 ms 724 KB Output is correct
65 Correct 1 ms 724 KB Output is correct
66 Correct 1 ms 724 KB Output is correct
67 Correct 1 ms 724 KB Output is correct
68 Correct 1 ms 724 KB Output is correct
69 Correct 1 ms 724 KB Output is correct
70 Correct 1 ms 724 KB Output is correct
71 Correct 1 ms 724 KB Output is correct
72 Correct 1 ms 724 KB Output is correct
73 Correct 1 ms 724 KB Output is correct
74 Correct 1 ms 724 KB Output is correct
75 Correct 1 ms 724 KB Output is correct
76 Correct 1 ms 724 KB Output is correct
77 Correct 1 ms 724 KB Output is correct
78 Correct 1 ms 728 KB Output is correct
79 Correct 1 ms 724 KB Output is correct
80 Correct 0 ms 724 KB Output is correct
81 Correct 1 ms 724 KB Output is correct
82 Correct 1 ms 724 KB Output is correct
83 Correct 1 ms 724 KB Output is correct
84 Correct 1 ms 724 KB Output is correct
85 Correct 1 ms 724 KB Output is correct
86 Correct 1 ms 724 KB Output is correct
87 Correct 1 ms 724 KB Output is correct
88 Correct 1 ms 724 KB Output is correct
89 Correct 1 ms 724 KB Output is correct
90 Correct 1 ms 1620 KB Output is correct
91 Correct 1 ms 724 KB Output is correct
92 Correct 1 ms 724 KB Output is correct
93 Correct 2 ms 980 KB Output is correct
94 Correct 3 ms 852 KB Output is correct
95 Correct 3 ms 864 KB Output is correct
96 Correct 4 ms 852 KB Output is correct
97 Correct 4 ms 736 KB Output is correct
98 Correct 5 ms 852 KB Output is correct
99 Correct 2 ms 1236 KB Output is correct
100 Correct 2 ms 980 KB Output is correct
101 Correct 1 ms 1236 KB Output is correct
102 Correct 2 ms 1236 KB Output is correct
103 Correct 1 ms 1364 KB Output is correct
104 Correct 1 ms 852 KB Output is correct
105 Correct 1 ms 1236 KB Output is correct
106 Correct 2 ms 724 KB Output is correct
107 Correct 2 ms 1364 KB Output is correct
108 Correct 2 ms 1236 KB Output is correct
109 Correct 2 ms 1108 KB Output is correct
110 Correct 2 ms 980 KB Output is correct
111 Correct 2 ms 1108 KB Output is correct
112 Correct 3 ms 980 KB Output is correct
113 Correct 3 ms 852 KB Output is correct
114 Correct 4 ms 980 KB Output is correct
115 Correct 2 ms 1876 KB Output is correct
116 Correct 9 ms 5612 KB Output is correct
117 Correct 7 ms 3412 KB Output is correct
118 Correct 1 ms 1492 KB Output is correct
119 Correct 2 ms 852 KB Output is correct
120 Correct 4 ms 852 KB Output is correct
121 Correct 5 ms 6356 KB Output is correct
122 Correct 7 ms 748 KB Output is correct
123 Correct 2 ms 2644 KB Output is correct
124 Correct 3 ms 1364 KB Output is correct
125 Correct 8 ms 852 KB Output is correct
126 Correct 6 ms 1492 KB Output is correct
127 Correct 9 ms 1236 KB Output is correct
128 Correct 11 ms 8148 KB Output is correct
129 Correct 55 ms 39044 KB Output is correct
130 Correct 45 ms 19808 KB Output is correct
131 Correct 4 ms 5076 KB Output is correct
132 Correct 17 ms 1000 KB Output is correct
133 Correct 27 ms 1004 KB Output is correct
134 Correct 12 ms 9172 KB Output is correct
135 Correct 8 ms 2408 KB Output is correct
136 Correct 43 ms 980 KB Output is correct
137 Correct 12 ms 3048 KB Output is correct
138 Correct 70 ms 1252 KB Output is correct
139 Correct 52 ms 37904 KB Output is correct
140 Correct 348 ms 233656 KB Output is correct
141 Correct 245 ms 107992 KB Output is correct
142 Correct 21 ms 23124 KB Output is correct
143 Correct 62 ms 1384 KB Output is correct
144 Correct 122 ms 1256 KB Output is correct