# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1021219 |
2024-07-12T15:46:23 Z |
erray |
Cookies (JOI23_cookies) |
C++17 |
|
110 ms |
28752 KB |
// author: erray
#include <bits/stdc++.h>
#ifdef DEBUG
#include "debug.h"
#else
#define debug(...) void(37)
#endif
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int N;
cin >> N;
vector<int> A(N);
for (int i = 0; i < N; ++i) {
cin >> A[i];
}
auto a = A;
sort(a.begin(), a.end());
int M;
cin >> M;
vector<int> B(M);
for (int i = 0; i < M; ++i) {
cin >> B[M - i - 1];
}
constexpr int SUM = 15000 + 1;
vector<int> allowed(SUM);
allowed[0] = -1;
{
int64_t sum = 0;
int p = 0;
for (int i = 1; i < SUM; ++i) {
while (p < N && a[p] < i) {
sum += a[p];
++p;
}
allowed[i] = sum + (N - p) * i;
}
}
using bs = bitset<SUM>;
bs one = ~bs{};
vector<bs> reach(SUM);
reach[0][0] = true;
for (auto add : B) {
for (int c = 1; c <= (SUM - 1) / add; ++c) {
reach[c] |= reach[c - 1] << add;
reach[c] &= one >> max(0, SUM - 1 - allowed[c]);
}
}
int size = 0;
int sum = accumulate(a.begin(), a.end(), 0);
while (size < SUM && !reach[size][sum]) ++size;
if (size == SUM) {
cout << -1 << '\n';
return 0;
}
debug(size);
vector<int> sizes;
reverse(B.begin(), B.end());
for (auto x : B) {
while (size > 0 && reach[size - 1][sum - x]) {
sum -= x;
size -= 1;
sizes.push_back(x);
}
}
//sort(sizes.rbegin(), sizes.rend());
reverse(sizes.begin(), sizes.end());
debug(sizes);
priority_queue<array<int, 2>> pq;
for (int i = 0; i < N; ++i) {
pq.push({A[i], i});
}
cout << int(sizes.size()) << '\n';
for (auto s : sizes) {
cout << s << ' ';
vector<array<int, 2>> temp;
for (int j = 0; j < s; ++j) {
auto t = pq.top(); pq.pop();
cout << t[1] + 1 << ' ';
temp.push_back(t);
}
cout << '\n';
for (auto t : temp) {
t[0] -= 1;
if (t[0] > 0) pq.push(t);
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
27 ms |
27992 KB |
Output is correct |
2 |
Correct |
20 ms |
27996 KB |
Output is correct |
3 |
Correct |
19 ms |
27992 KB |
Output is correct |
4 |
Correct |
15 ms |
27996 KB |
Output is correct |
5 |
Correct |
24 ms |
27880 KB |
Output is correct |
6 |
Correct |
20 ms |
27992 KB |
Output is correct |
7 |
Correct |
26 ms |
28052 KB |
Output is correct |
8 |
Correct |
19 ms |
27996 KB |
Output is correct |
9 |
Correct |
12 ms |
27996 KB |
Output is correct |
10 |
Correct |
71 ms |
27996 KB |
Output is correct |
11 |
Correct |
18 ms |
27992 KB |
Output is correct |
12 |
Correct |
41 ms |
28108 KB |
Output is correct |
13 |
Correct |
19 ms |
27996 KB |
Output is correct |
14 |
Correct |
20 ms |
27996 KB |
Output is correct |
15 |
Correct |
18 ms |
28124 KB |
Output is correct |
16 |
Correct |
20 ms |
27992 KB |
Output is correct |
17 |
Correct |
14 ms |
27996 KB |
Output is correct |
18 |
Correct |
20 ms |
27996 KB |
Output is correct |
19 |
Correct |
13 ms |
27992 KB |
Output is correct |
20 |
Correct |
11 ms |
27996 KB |
Output is correct |
21 |
Correct |
19 ms |
28128 KB |
Output is correct |
22 |
Correct |
37 ms |
27992 KB |
Output is correct |
23 |
Correct |
33 ms |
27996 KB |
Output is correct |
24 |
Correct |
30 ms |
27996 KB |
Output is correct |
25 |
Correct |
23 ms |
27996 KB |
Output is correct |
26 |
Correct |
14 ms |
27992 KB |
Output is correct |
27 |
Correct |
13 ms |
28036 KB |
Output is correct |
28 |
Correct |
17 ms |
27996 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
15 ms |
27996 KB |
Output is correct |
2 |
Correct |
20 ms |
27996 KB |
Output is correct |
3 |
Correct |
21 ms |
27948 KB |
Output is correct |
4 |
Correct |
16 ms |
27992 KB |
Output is correct |
5 |
Correct |
19 ms |
27996 KB |
Output is correct |
6 |
Correct |
11 ms |
28068 KB |
Output is correct |
7 |
Correct |
20 ms |
28248 KB |
Output is correct |
8 |
Correct |
22 ms |
28020 KB |
Output is correct |
9 |
Correct |
22 ms |
27996 KB |
Output is correct |
10 |
Correct |
32 ms |
28116 KB |
Output is correct |
11 |
Correct |
20 ms |
27996 KB |
Output is correct |
12 |
Correct |
17 ms |
27960 KB |
Output is correct |
13 |
Correct |
15 ms |
28104 KB |
Output is correct |
14 |
Correct |
19 ms |
27888 KB |
Output is correct |
15 |
Correct |
16 ms |
27992 KB |
Output is correct |
16 |
Correct |
13 ms |
27992 KB |
Output is correct |
17 |
Correct |
11 ms |
27996 KB |
Output is correct |
18 |
Correct |
15 ms |
27996 KB |
Output is correct |
19 |
Correct |
17 ms |
27996 KB |
Output is correct |
20 |
Correct |
13 ms |
27996 KB |
Output is correct |
21 |
Correct |
12 ms |
27980 KB |
Output is correct |
22 |
Correct |
13 ms |
27992 KB |
Output is correct |
23 |
Correct |
12 ms |
28068 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
28 ms |
27996 KB |
Output is correct |
2 |
Correct |
14 ms |
27876 KB |
Output is correct |
3 |
Correct |
20 ms |
28248 KB |
Output is correct |
4 |
Correct |
27 ms |
27996 KB |
Output is correct |
5 |
Correct |
19 ms |
28248 KB |
Output is correct |
6 |
Correct |
26 ms |
27996 KB |
Output is correct |
7 |
Correct |
19 ms |
27996 KB |
Output is correct |
8 |
Correct |
24 ms |
27996 KB |
Output is correct |
9 |
Correct |
21 ms |
27936 KB |
Output is correct |
10 |
Correct |
21 ms |
27996 KB |
Output is correct |
11 |
Correct |
21 ms |
27996 KB |
Output is correct |
12 |
Correct |
18 ms |
27996 KB |
Output is correct |
13 |
Correct |
15 ms |
27996 KB |
Output is correct |
14 |
Correct |
16 ms |
27996 KB |
Output is correct |
15 |
Correct |
24 ms |
27996 KB |
Output is correct |
16 |
Correct |
18 ms |
27992 KB |
Output is correct |
17 |
Correct |
31 ms |
27948 KB |
Output is correct |
18 |
Correct |
21 ms |
27996 KB |
Output is correct |
19 |
Correct |
25 ms |
27996 KB |
Output is correct |
20 |
Correct |
21 ms |
28008 KB |
Output is correct |
21 |
Correct |
20 ms |
27996 KB |
Output is correct |
22 |
Correct |
19 ms |
27992 KB |
Output is correct |
23 |
Correct |
20 ms |
27996 KB |
Output is correct |
24 |
Correct |
34 ms |
27996 KB |
Output is correct |
25 |
Correct |
19 ms |
27996 KB |
Output is correct |
26 |
Correct |
22 ms |
28048 KB |
Output is correct |
27 |
Correct |
27 ms |
27992 KB |
Output is correct |
28 |
Correct |
24 ms |
28056 KB |
Output is correct |
29 |
Correct |
26 ms |
27992 KB |
Output is correct |
30 |
Correct |
30 ms |
27992 KB |
Output is correct |
31 |
Correct |
37 ms |
28104 KB |
Output is correct |
32 |
Correct |
18 ms |
27992 KB |
Output is correct |
33 |
Correct |
25 ms |
27996 KB |
Output is correct |
34 |
Correct |
26 ms |
28100 KB |
Output is correct |
35 |
Correct |
32 ms |
27996 KB |
Output is correct |
36 |
Correct |
39 ms |
27996 KB |
Output is correct |
37 |
Correct |
22 ms |
27996 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
27 ms |
27992 KB |
Output is correct |
2 |
Correct |
20 ms |
27996 KB |
Output is correct |
3 |
Correct |
19 ms |
27992 KB |
Output is correct |
4 |
Correct |
15 ms |
27996 KB |
Output is correct |
5 |
Correct |
24 ms |
27880 KB |
Output is correct |
6 |
Correct |
20 ms |
27992 KB |
Output is correct |
7 |
Correct |
26 ms |
28052 KB |
Output is correct |
8 |
Correct |
19 ms |
27996 KB |
Output is correct |
9 |
Correct |
12 ms |
27996 KB |
Output is correct |
10 |
Correct |
71 ms |
27996 KB |
Output is correct |
11 |
Correct |
18 ms |
27992 KB |
Output is correct |
12 |
Correct |
41 ms |
28108 KB |
Output is correct |
13 |
Correct |
19 ms |
27996 KB |
Output is correct |
14 |
Correct |
20 ms |
27996 KB |
Output is correct |
15 |
Correct |
18 ms |
28124 KB |
Output is correct |
16 |
Correct |
20 ms |
27992 KB |
Output is correct |
17 |
Correct |
14 ms |
27996 KB |
Output is correct |
18 |
Correct |
20 ms |
27996 KB |
Output is correct |
19 |
Correct |
13 ms |
27992 KB |
Output is correct |
20 |
Correct |
11 ms |
27996 KB |
Output is correct |
21 |
Correct |
19 ms |
28128 KB |
Output is correct |
22 |
Correct |
37 ms |
27992 KB |
Output is correct |
23 |
Correct |
33 ms |
27996 KB |
Output is correct |
24 |
Correct |
30 ms |
27996 KB |
Output is correct |
25 |
Correct |
23 ms |
27996 KB |
Output is correct |
26 |
Correct |
14 ms |
27992 KB |
Output is correct |
27 |
Correct |
13 ms |
28036 KB |
Output is correct |
28 |
Correct |
17 ms |
27996 KB |
Output is correct |
29 |
Correct |
28 ms |
27996 KB |
Output is correct |
30 |
Correct |
14 ms |
27876 KB |
Output is correct |
31 |
Correct |
20 ms |
28248 KB |
Output is correct |
32 |
Correct |
27 ms |
27996 KB |
Output is correct |
33 |
Correct |
19 ms |
28248 KB |
Output is correct |
34 |
Correct |
26 ms |
27996 KB |
Output is correct |
35 |
Correct |
19 ms |
27996 KB |
Output is correct |
36 |
Correct |
24 ms |
27996 KB |
Output is correct |
37 |
Correct |
21 ms |
27936 KB |
Output is correct |
38 |
Correct |
21 ms |
27996 KB |
Output is correct |
39 |
Correct |
21 ms |
27996 KB |
Output is correct |
40 |
Correct |
18 ms |
27996 KB |
Output is correct |
41 |
Correct |
15 ms |
27996 KB |
Output is correct |
42 |
Correct |
16 ms |
27996 KB |
Output is correct |
43 |
Correct |
24 ms |
27996 KB |
Output is correct |
44 |
Correct |
18 ms |
27992 KB |
Output is correct |
45 |
Correct |
31 ms |
27948 KB |
Output is correct |
46 |
Correct |
21 ms |
27996 KB |
Output is correct |
47 |
Correct |
25 ms |
27996 KB |
Output is correct |
48 |
Correct |
21 ms |
28008 KB |
Output is correct |
49 |
Correct |
20 ms |
27996 KB |
Output is correct |
50 |
Correct |
19 ms |
27992 KB |
Output is correct |
51 |
Correct |
20 ms |
27996 KB |
Output is correct |
52 |
Correct |
34 ms |
27996 KB |
Output is correct |
53 |
Correct |
19 ms |
27996 KB |
Output is correct |
54 |
Correct |
22 ms |
28048 KB |
Output is correct |
55 |
Correct |
27 ms |
27992 KB |
Output is correct |
56 |
Correct |
24 ms |
28056 KB |
Output is correct |
57 |
Correct |
26 ms |
27992 KB |
Output is correct |
58 |
Correct |
30 ms |
27992 KB |
Output is correct |
59 |
Correct |
37 ms |
28104 KB |
Output is correct |
60 |
Correct |
18 ms |
27992 KB |
Output is correct |
61 |
Correct |
25 ms |
27996 KB |
Output is correct |
62 |
Correct |
26 ms |
28100 KB |
Output is correct |
63 |
Correct |
32 ms |
27996 KB |
Output is correct |
64 |
Correct |
39 ms |
27996 KB |
Output is correct |
65 |
Correct |
22 ms |
27996 KB |
Output is correct |
66 |
Correct |
19 ms |
27992 KB |
Output is correct |
67 |
Correct |
20 ms |
27996 KB |
Output is correct |
68 |
Correct |
11 ms |
27996 KB |
Output is correct |
69 |
Correct |
12 ms |
27996 KB |
Output is correct |
70 |
Correct |
19 ms |
27996 KB |
Output is correct |
71 |
Correct |
27 ms |
27996 KB |
Output is correct |
72 |
Correct |
22 ms |
27992 KB |
Output is correct |
73 |
Correct |
12 ms |
27992 KB |
Output is correct |
74 |
Correct |
14 ms |
27996 KB |
Output is correct |
75 |
Correct |
31 ms |
28100 KB |
Output is correct |
76 |
Correct |
25 ms |
27996 KB |
Output is correct |
77 |
Correct |
36 ms |
27992 KB |
Output is correct |
78 |
Correct |
24 ms |
28084 KB |
Output is correct |
79 |
Correct |
28 ms |
27996 KB |
Output is correct |
80 |
Correct |
48 ms |
27996 KB |
Output is correct |
81 |
Correct |
13 ms |
27996 KB |
Output is correct |
82 |
Correct |
34 ms |
28008 KB |
Output is correct |
83 |
Correct |
11 ms |
27992 KB |
Output is correct |
84 |
Correct |
31 ms |
27996 KB |
Output is correct |
85 |
Correct |
26 ms |
27992 KB |
Output is correct |
86 |
Correct |
40 ms |
27992 KB |
Output is correct |
87 |
Correct |
38 ms |
27992 KB |
Output is correct |
88 |
Correct |
65 ms |
27992 KB |
Output is correct |
89 |
Correct |
47 ms |
27996 KB |
Output is correct |
90 |
Correct |
35 ms |
28108 KB |
Output is correct |
91 |
Correct |
37 ms |
27992 KB |
Output is correct |
92 |
Correct |
54 ms |
28116 KB |
Output is correct |
93 |
Correct |
55 ms |
27996 KB |
Output is correct |
94 |
Correct |
49 ms |
27996 KB |
Output is correct |
95 |
Correct |
38 ms |
27996 KB |
Output is correct |
96 |
Correct |
31 ms |
27992 KB |
Output is correct |
97 |
Correct |
29 ms |
27996 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
27 ms |
27992 KB |
Output is correct |
2 |
Correct |
20 ms |
27996 KB |
Output is correct |
3 |
Correct |
19 ms |
27992 KB |
Output is correct |
4 |
Correct |
15 ms |
27996 KB |
Output is correct |
5 |
Correct |
24 ms |
27880 KB |
Output is correct |
6 |
Correct |
20 ms |
27992 KB |
Output is correct |
7 |
Correct |
26 ms |
28052 KB |
Output is correct |
8 |
Correct |
19 ms |
27996 KB |
Output is correct |
9 |
Correct |
12 ms |
27996 KB |
Output is correct |
10 |
Correct |
71 ms |
27996 KB |
Output is correct |
11 |
Correct |
18 ms |
27992 KB |
Output is correct |
12 |
Correct |
41 ms |
28108 KB |
Output is correct |
13 |
Correct |
19 ms |
27996 KB |
Output is correct |
14 |
Correct |
20 ms |
27996 KB |
Output is correct |
15 |
Correct |
18 ms |
28124 KB |
Output is correct |
16 |
Correct |
20 ms |
27992 KB |
Output is correct |
17 |
Correct |
14 ms |
27996 KB |
Output is correct |
18 |
Correct |
20 ms |
27996 KB |
Output is correct |
19 |
Correct |
13 ms |
27992 KB |
Output is correct |
20 |
Correct |
11 ms |
27996 KB |
Output is correct |
21 |
Correct |
19 ms |
28128 KB |
Output is correct |
22 |
Correct |
37 ms |
27992 KB |
Output is correct |
23 |
Correct |
33 ms |
27996 KB |
Output is correct |
24 |
Correct |
30 ms |
27996 KB |
Output is correct |
25 |
Correct |
23 ms |
27996 KB |
Output is correct |
26 |
Correct |
14 ms |
27992 KB |
Output is correct |
27 |
Correct |
13 ms |
28036 KB |
Output is correct |
28 |
Correct |
17 ms |
27996 KB |
Output is correct |
29 |
Correct |
28 ms |
27996 KB |
Output is correct |
30 |
Correct |
14 ms |
27876 KB |
Output is correct |
31 |
Correct |
20 ms |
28248 KB |
Output is correct |
32 |
Correct |
27 ms |
27996 KB |
Output is correct |
33 |
Correct |
19 ms |
28248 KB |
Output is correct |
34 |
Correct |
26 ms |
27996 KB |
Output is correct |
35 |
Correct |
19 ms |
27996 KB |
Output is correct |
36 |
Correct |
24 ms |
27996 KB |
Output is correct |
37 |
Correct |
21 ms |
27936 KB |
Output is correct |
38 |
Correct |
21 ms |
27996 KB |
Output is correct |
39 |
Correct |
21 ms |
27996 KB |
Output is correct |
40 |
Correct |
18 ms |
27996 KB |
Output is correct |
41 |
Correct |
15 ms |
27996 KB |
Output is correct |
42 |
Correct |
16 ms |
27996 KB |
Output is correct |
43 |
Correct |
24 ms |
27996 KB |
Output is correct |
44 |
Correct |
18 ms |
27992 KB |
Output is correct |
45 |
Correct |
31 ms |
27948 KB |
Output is correct |
46 |
Correct |
21 ms |
27996 KB |
Output is correct |
47 |
Correct |
25 ms |
27996 KB |
Output is correct |
48 |
Correct |
21 ms |
28008 KB |
Output is correct |
49 |
Correct |
20 ms |
27996 KB |
Output is correct |
50 |
Correct |
19 ms |
27992 KB |
Output is correct |
51 |
Correct |
20 ms |
27996 KB |
Output is correct |
52 |
Correct |
34 ms |
27996 KB |
Output is correct |
53 |
Correct |
19 ms |
27996 KB |
Output is correct |
54 |
Correct |
22 ms |
28048 KB |
Output is correct |
55 |
Correct |
27 ms |
27992 KB |
Output is correct |
56 |
Correct |
24 ms |
28056 KB |
Output is correct |
57 |
Correct |
26 ms |
27992 KB |
Output is correct |
58 |
Correct |
30 ms |
27992 KB |
Output is correct |
59 |
Correct |
37 ms |
28104 KB |
Output is correct |
60 |
Correct |
18 ms |
27992 KB |
Output is correct |
61 |
Correct |
25 ms |
27996 KB |
Output is correct |
62 |
Correct |
26 ms |
28100 KB |
Output is correct |
63 |
Correct |
32 ms |
27996 KB |
Output is correct |
64 |
Correct |
39 ms |
27996 KB |
Output is correct |
65 |
Correct |
22 ms |
27996 KB |
Output is correct |
66 |
Correct |
19 ms |
27992 KB |
Output is correct |
67 |
Correct |
20 ms |
27996 KB |
Output is correct |
68 |
Correct |
11 ms |
27996 KB |
Output is correct |
69 |
Correct |
12 ms |
27996 KB |
Output is correct |
70 |
Correct |
19 ms |
27996 KB |
Output is correct |
71 |
Correct |
27 ms |
27996 KB |
Output is correct |
72 |
Correct |
22 ms |
27992 KB |
Output is correct |
73 |
Correct |
12 ms |
27992 KB |
Output is correct |
74 |
Correct |
14 ms |
27996 KB |
Output is correct |
75 |
Correct |
31 ms |
28100 KB |
Output is correct |
76 |
Correct |
25 ms |
27996 KB |
Output is correct |
77 |
Correct |
36 ms |
27992 KB |
Output is correct |
78 |
Correct |
24 ms |
28084 KB |
Output is correct |
79 |
Correct |
28 ms |
27996 KB |
Output is correct |
80 |
Correct |
48 ms |
27996 KB |
Output is correct |
81 |
Correct |
13 ms |
27996 KB |
Output is correct |
82 |
Correct |
34 ms |
28008 KB |
Output is correct |
83 |
Correct |
11 ms |
27992 KB |
Output is correct |
84 |
Correct |
31 ms |
27996 KB |
Output is correct |
85 |
Correct |
26 ms |
27992 KB |
Output is correct |
86 |
Correct |
40 ms |
27992 KB |
Output is correct |
87 |
Correct |
38 ms |
27992 KB |
Output is correct |
88 |
Correct |
65 ms |
27992 KB |
Output is correct |
89 |
Correct |
47 ms |
27996 KB |
Output is correct |
90 |
Correct |
35 ms |
28108 KB |
Output is correct |
91 |
Correct |
37 ms |
27992 KB |
Output is correct |
92 |
Correct |
54 ms |
28116 KB |
Output is correct |
93 |
Correct |
55 ms |
27996 KB |
Output is correct |
94 |
Correct |
49 ms |
27996 KB |
Output is correct |
95 |
Correct |
38 ms |
27996 KB |
Output is correct |
96 |
Correct |
31 ms |
27992 KB |
Output is correct |
97 |
Correct |
29 ms |
27996 KB |
Output is correct |
98 |
Correct |
23 ms |
27996 KB |
Output is correct |
99 |
Correct |
12 ms |
27996 KB |
Output is correct |
100 |
Correct |
26 ms |
28128 KB |
Output is correct |
101 |
Correct |
17 ms |
28064 KB |
Output is correct |
102 |
Correct |
17 ms |
27996 KB |
Output is correct |
103 |
Correct |
41 ms |
28120 KB |
Output is correct |
104 |
Correct |
38 ms |
27996 KB |
Output is correct |
105 |
Correct |
65 ms |
28124 KB |
Output is correct |
106 |
Correct |
68 ms |
28172 KB |
Output is correct |
107 |
Correct |
58 ms |
28240 KB |
Output is correct |
108 |
Correct |
48 ms |
28116 KB |
Output is correct |
109 |
Correct |
31 ms |
27992 KB |
Output is correct |
110 |
Correct |
31 ms |
28148 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
27 ms |
27992 KB |
Output is correct |
2 |
Correct |
20 ms |
27996 KB |
Output is correct |
3 |
Correct |
19 ms |
27992 KB |
Output is correct |
4 |
Correct |
15 ms |
27996 KB |
Output is correct |
5 |
Correct |
24 ms |
27880 KB |
Output is correct |
6 |
Correct |
20 ms |
27992 KB |
Output is correct |
7 |
Correct |
26 ms |
28052 KB |
Output is correct |
8 |
Correct |
19 ms |
27996 KB |
Output is correct |
9 |
Correct |
12 ms |
27996 KB |
Output is correct |
10 |
Correct |
71 ms |
27996 KB |
Output is correct |
11 |
Correct |
18 ms |
27992 KB |
Output is correct |
12 |
Correct |
41 ms |
28108 KB |
Output is correct |
13 |
Correct |
19 ms |
27996 KB |
Output is correct |
14 |
Correct |
20 ms |
27996 KB |
Output is correct |
15 |
Correct |
18 ms |
28124 KB |
Output is correct |
16 |
Correct |
20 ms |
27992 KB |
Output is correct |
17 |
Correct |
14 ms |
27996 KB |
Output is correct |
18 |
Correct |
20 ms |
27996 KB |
Output is correct |
19 |
Correct |
13 ms |
27992 KB |
Output is correct |
20 |
Correct |
11 ms |
27996 KB |
Output is correct |
21 |
Correct |
19 ms |
28128 KB |
Output is correct |
22 |
Correct |
37 ms |
27992 KB |
Output is correct |
23 |
Correct |
33 ms |
27996 KB |
Output is correct |
24 |
Correct |
30 ms |
27996 KB |
Output is correct |
25 |
Correct |
23 ms |
27996 KB |
Output is correct |
26 |
Correct |
14 ms |
27992 KB |
Output is correct |
27 |
Correct |
13 ms |
28036 KB |
Output is correct |
28 |
Correct |
17 ms |
27996 KB |
Output is correct |
29 |
Correct |
15 ms |
27996 KB |
Output is correct |
30 |
Correct |
20 ms |
27996 KB |
Output is correct |
31 |
Correct |
21 ms |
27948 KB |
Output is correct |
32 |
Correct |
16 ms |
27992 KB |
Output is correct |
33 |
Correct |
19 ms |
27996 KB |
Output is correct |
34 |
Correct |
11 ms |
28068 KB |
Output is correct |
35 |
Correct |
20 ms |
28248 KB |
Output is correct |
36 |
Correct |
22 ms |
28020 KB |
Output is correct |
37 |
Correct |
22 ms |
27996 KB |
Output is correct |
38 |
Correct |
32 ms |
28116 KB |
Output is correct |
39 |
Correct |
20 ms |
27996 KB |
Output is correct |
40 |
Correct |
17 ms |
27960 KB |
Output is correct |
41 |
Correct |
15 ms |
28104 KB |
Output is correct |
42 |
Correct |
19 ms |
27888 KB |
Output is correct |
43 |
Correct |
16 ms |
27992 KB |
Output is correct |
44 |
Correct |
13 ms |
27992 KB |
Output is correct |
45 |
Correct |
11 ms |
27996 KB |
Output is correct |
46 |
Correct |
15 ms |
27996 KB |
Output is correct |
47 |
Correct |
17 ms |
27996 KB |
Output is correct |
48 |
Correct |
13 ms |
27996 KB |
Output is correct |
49 |
Correct |
12 ms |
27980 KB |
Output is correct |
50 |
Correct |
13 ms |
27992 KB |
Output is correct |
51 |
Correct |
12 ms |
28068 KB |
Output is correct |
52 |
Correct |
28 ms |
27996 KB |
Output is correct |
53 |
Correct |
14 ms |
27876 KB |
Output is correct |
54 |
Correct |
20 ms |
28248 KB |
Output is correct |
55 |
Correct |
27 ms |
27996 KB |
Output is correct |
56 |
Correct |
19 ms |
28248 KB |
Output is correct |
57 |
Correct |
26 ms |
27996 KB |
Output is correct |
58 |
Correct |
19 ms |
27996 KB |
Output is correct |
59 |
Correct |
24 ms |
27996 KB |
Output is correct |
60 |
Correct |
21 ms |
27936 KB |
Output is correct |
61 |
Correct |
21 ms |
27996 KB |
Output is correct |
62 |
Correct |
21 ms |
27996 KB |
Output is correct |
63 |
Correct |
18 ms |
27996 KB |
Output is correct |
64 |
Correct |
15 ms |
27996 KB |
Output is correct |
65 |
Correct |
16 ms |
27996 KB |
Output is correct |
66 |
Correct |
24 ms |
27996 KB |
Output is correct |
67 |
Correct |
18 ms |
27992 KB |
Output is correct |
68 |
Correct |
31 ms |
27948 KB |
Output is correct |
69 |
Correct |
21 ms |
27996 KB |
Output is correct |
70 |
Correct |
25 ms |
27996 KB |
Output is correct |
71 |
Correct |
21 ms |
28008 KB |
Output is correct |
72 |
Correct |
20 ms |
27996 KB |
Output is correct |
73 |
Correct |
19 ms |
27992 KB |
Output is correct |
74 |
Correct |
20 ms |
27996 KB |
Output is correct |
75 |
Correct |
34 ms |
27996 KB |
Output is correct |
76 |
Correct |
19 ms |
27996 KB |
Output is correct |
77 |
Correct |
22 ms |
28048 KB |
Output is correct |
78 |
Correct |
27 ms |
27992 KB |
Output is correct |
79 |
Correct |
24 ms |
28056 KB |
Output is correct |
80 |
Correct |
26 ms |
27992 KB |
Output is correct |
81 |
Correct |
30 ms |
27992 KB |
Output is correct |
82 |
Correct |
37 ms |
28104 KB |
Output is correct |
83 |
Correct |
18 ms |
27992 KB |
Output is correct |
84 |
Correct |
25 ms |
27996 KB |
Output is correct |
85 |
Correct |
26 ms |
28100 KB |
Output is correct |
86 |
Correct |
32 ms |
27996 KB |
Output is correct |
87 |
Correct |
39 ms |
27996 KB |
Output is correct |
88 |
Correct |
22 ms |
27996 KB |
Output is correct |
89 |
Correct |
19 ms |
27992 KB |
Output is correct |
90 |
Correct |
20 ms |
27996 KB |
Output is correct |
91 |
Correct |
11 ms |
27996 KB |
Output is correct |
92 |
Correct |
12 ms |
27996 KB |
Output is correct |
93 |
Correct |
19 ms |
27996 KB |
Output is correct |
94 |
Correct |
27 ms |
27996 KB |
Output is correct |
95 |
Correct |
22 ms |
27992 KB |
Output is correct |
96 |
Correct |
12 ms |
27992 KB |
Output is correct |
97 |
Correct |
14 ms |
27996 KB |
Output is correct |
98 |
Correct |
31 ms |
28100 KB |
Output is correct |
99 |
Correct |
25 ms |
27996 KB |
Output is correct |
100 |
Correct |
36 ms |
27992 KB |
Output is correct |
101 |
Correct |
24 ms |
28084 KB |
Output is correct |
102 |
Correct |
28 ms |
27996 KB |
Output is correct |
103 |
Correct |
48 ms |
27996 KB |
Output is correct |
104 |
Correct |
13 ms |
27996 KB |
Output is correct |
105 |
Correct |
34 ms |
28008 KB |
Output is correct |
106 |
Correct |
11 ms |
27992 KB |
Output is correct |
107 |
Correct |
31 ms |
27996 KB |
Output is correct |
108 |
Correct |
26 ms |
27992 KB |
Output is correct |
109 |
Correct |
40 ms |
27992 KB |
Output is correct |
110 |
Correct |
38 ms |
27992 KB |
Output is correct |
111 |
Correct |
65 ms |
27992 KB |
Output is correct |
112 |
Correct |
47 ms |
27996 KB |
Output is correct |
113 |
Correct |
35 ms |
28108 KB |
Output is correct |
114 |
Correct |
37 ms |
27992 KB |
Output is correct |
115 |
Correct |
54 ms |
28116 KB |
Output is correct |
116 |
Correct |
55 ms |
27996 KB |
Output is correct |
117 |
Correct |
49 ms |
27996 KB |
Output is correct |
118 |
Correct |
38 ms |
27996 KB |
Output is correct |
119 |
Correct |
31 ms |
27992 KB |
Output is correct |
120 |
Correct |
29 ms |
27996 KB |
Output is correct |
121 |
Correct |
23 ms |
27996 KB |
Output is correct |
122 |
Correct |
12 ms |
27996 KB |
Output is correct |
123 |
Correct |
26 ms |
28128 KB |
Output is correct |
124 |
Correct |
17 ms |
28064 KB |
Output is correct |
125 |
Correct |
17 ms |
27996 KB |
Output is correct |
126 |
Correct |
41 ms |
28120 KB |
Output is correct |
127 |
Correct |
38 ms |
27996 KB |
Output is correct |
128 |
Correct |
65 ms |
28124 KB |
Output is correct |
129 |
Correct |
68 ms |
28172 KB |
Output is correct |
130 |
Correct |
58 ms |
28240 KB |
Output is correct |
131 |
Correct |
48 ms |
28116 KB |
Output is correct |
132 |
Correct |
31 ms |
27992 KB |
Output is correct |
133 |
Correct |
31 ms |
28148 KB |
Output is correct |
134 |
Correct |
31 ms |
28132 KB |
Output is correct |
135 |
Correct |
14 ms |
28096 KB |
Output is correct |
136 |
Correct |
13 ms |
28132 KB |
Output is correct |
137 |
Correct |
41 ms |
27996 KB |
Output is correct |
138 |
Correct |
35 ms |
28244 KB |
Output is correct |
139 |
Correct |
99 ms |
28244 KB |
Output is correct |
140 |
Correct |
110 ms |
28616 KB |
Output is correct |
141 |
Correct |
66 ms |
28752 KB |
Output is correct |
142 |
Correct |
74 ms |
28104 KB |
Output is correct |
143 |
Correct |
35 ms |
28248 KB |
Output is correct |
144 |
Correct |
36 ms |
28500 KB |
Output is correct |