#include "paint.h"
#include <bits/stdc++.h>
namespace {
const int N = 2e5 + 5, K = 105;
int a[N], pf[N];
bool p[N][K], s[N][K], b[N];
std::string solve(const std::string &S, const std::vector<int> c) {
int n = S.size(), k = c.size();
for (int i = 0; i < n; ++i) {
pf[i + 1] = pf[i] + (S[i] == '_');
}
p[0][0] = 1;
for (int i = 0; i < n; ++i) {
for (int j = 0; j <= k; ++j) {
if (!p[i][j]) {
continue;
}
if (S[i] != 'X') {
p[i + 1][j] = 1;
}
if (j < k) {
int l = c[j];
if (i + l < n && S[i + l] != 'X' && pf[i + l] - pf[i] == 0) {
p[i + l + 1][j + 1] = 1;
}
}
}
}
s[n + 1][k + 1] = 1;
for (int i = n + 1; i > 1; --i) {
for (int j = 1; j <= k + 1; ++j) {
if (!s[i][j]) {
continue;
}
if (S[i - 2] != 'X') {
s[i - 1][j] = 1;
}
if (j > 1) {
int l = c[j - 2];
if (i - l > 1 && S[i - l - 2] != 'X' && pf[i - 1] - pf[i - l - 1] == 0) {
s[i - l - 1][j - 1] = 1;
}
}
}
}
for (int i = 1; i <= n; ++i) {
for (int j = 0; j <= k; ++j) {
b[i] |= p[i][j] && s[i][j + 1];
if (j < k && i + c[j] - 1 <= n && p[i - 1][j] && s[i + c[j]][j + 2] && pf[i + c[j] - 1] - pf[i - 1] == 0) {
++a[i];
--a[i + c[j]];
}
}
}
std::string res(n, '?');
for (int i = 1; i <= n; ++i) {
a[i] += a[i - 1];
if (!b[i]) {
res[i - 1] = 'X';
}
if (!a[i]) {
res[i - 1] = '_';
}
}
return res;
}
}
std::string solve_puzzle(std::string s, std::vector<int> c) {
return solve(s, c);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
n = 13, m = 1 |
2 |
Correct |
0 ms |
348 KB |
n = 18, m = 1 |
3 |
Correct |
0 ms |
348 KB |
n = 17, m = 1 |
4 |
Correct |
0 ms |
344 KB |
n = 1, m = 1 |
5 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
6 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
7 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
n = 13, m = 1 |
2 |
Correct |
0 ms |
348 KB |
n = 18, m = 1 |
3 |
Correct |
0 ms |
348 KB |
n = 17, m = 1 |
4 |
Correct |
0 ms |
344 KB |
n = 1, m = 1 |
5 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
6 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
7 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
8 |
Correct |
1 ms |
348 KB |
n = 20, m = 5 |
9 |
Correct |
0 ms |
348 KB |
n = 18, m = 3 |
10 |
Correct |
0 ms |
452 KB |
n = 17, m = 2 |
11 |
Correct |
0 ms |
348 KB |
n = 20, m = 2 |
12 |
Correct |
0 ms |
348 KB |
n = 17, m = 4 |
13 |
Correct |
1 ms |
348 KB |
n = 17, m = 6 |
14 |
Correct |
0 ms |
348 KB |
n = 17, m = 1 |
15 |
Correct |
0 ms |
348 KB |
n = 17, m = 4 |
16 |
Correct |
0 ms |
344 KB |
n = 13, m = 3 |
17 |
Correct |
0 ms |
348 KB |
n = 18, m = 4 |
18 |
Correct |
0 ms |
512 KB |
n = 20, m = 10 |
19 |
Correct |
0 ms |
348 KB |
n = 19, m = 10 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
n = 13, m = 1 |
2 |
Correct |
0 ms |
348 KB |
n = 18, m = 1 |
3 |
Correct |
0 ms |
348 KB |
n = 17, m = 1 |
4 |
Correct |
0 ms |
344 KB |
n = 1, m = 1 |
5 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
6 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
7 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
8 |
Correct |
1 ms |
348 KB |
n = 20, m = 5 |
9 |
Correct |
0 ms |
348 KB |
n = 18, m = 3 |
10 |
Correct |
0 ms |
452 KB |
n = 17, m = 2 |
11 |
Correct |
0 ms |
348 KB |
n = 20, m = 2 |
12 |
Correct |
0 ms |
348 KB |
n = 17, m = 4 |
13 |
Correct |
1 ms |
348 KB |
n = 17, m = 6 |
14 |
Correct |
0 ms |
348 KB |
n = 17, m = 1 |
15 |
Correct |
0 ms |
348 KB |
n = 17, m = 4 |
16 |
Correct |
0 ms |
344 KB |
n = 13, m = 3 |
17 |
Correct |
0 ms |
348 KB |
n = 18, m = 4 |
18 |
Correct |
0 ms |
512 KB |
n = 20, m = 10 |
19 |
Correct |
0 ms |
348 KB |
n = 19, m = 10 |
20 |
Correct |
1 ms |
348 KB |
n = 100, m = 5 |
21 |
Correct |
0 ms |
348 KB |
n = 90, m = 3 |
22 |
Correct |
0 ms |
348 KB |
n = 86, m = 2 |
23 |
Correct |
0 ms |
348 KB |
n = 81, m = 4 |
24 |
Correct |
0 ms |
348 KB |
n = 89, m = 10 |
25 |
Correct |
1 ms |
348 KB |
n = 81, m = 23 |
26 |
Correct |
1 ms |
348 KB |
n = 86, m = 8 |
27 |
Correct |
0 ms |
348 KB |
n = 53, m = 22 |
28 |
Correct |
0 ms |
348 KB |
n = 89, m = 35 |
29 |
Correct |
0 ms |
348 KB |
n = 63, m = 25 |
30 |
Correct |
0 ms |
344 KB |
n = 100, m = 50 |
31 |
Correct |
0 ms |
348 KB |
n = 99, m = 50 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
n = 13, m = 1 |
2 |
Correct |
0 ms |
348 KB |
n = 18, m = 1 |
3 |
Correct |
0 ms |
348 KB |
n = 17, m = 1 |
4 |
Correct |
0 ms |
344 KB |
n = 1, m = 1 |
5 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
6 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
7 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
8 |
Correct |
1 ms |
348 KB |
n = 20, m = 5 |
9 |
Correct |
0 ms |
348 KB |
n = 18, m = 3 |
10 |
Correct |
0 ms |
452 KB |
n = 17, m = 2 |
11 |
Correct |
0 ms |
348 KB |
n = 20, m = 2 |
12 |
Correct |
0 ms |
348 KB |
n = 17, m = 4 |
13 |
Correct |
1 ms |
348 KB |
n = 17, m = 6 |
14 |
Correct |
0 ms |
348 KB |
n = 17, m = 1 |
15 |
Correct |
0 ms |
348 KB |
n = 17, m = 4 |
16 |
Correct |
0 ms |
344 KB |
n = 13, m = 3 |
17 |
Correct |
0 ms |
348 KB |
n = 18, m = 4 |
18 |
Correct |
0 ms |
512 KB |
n = 20, m = 10 |
19 |
Correct |
0 ms |
348 KB |
n = 19, m = 10 |
20 |
Correct |
1 ms |
348 KB |
n = 100, m = 5 |
21 |
Correct |
0 ms |
348 KB |
n = 90, m = 3 |
22 |
Correct |
0 ms |
348 KB |
n = 86, m = 2 |
23 |
Correct |
0 ms |
348 KB |
n = 81, m = 4 |
24 |
Correct |
0 ms |
348 KB |
n = 89, m = 10 |
25 |
Correct |
1 ms |
348 KB |
n = 81, m = 23 |
26 |
Correct |
1 ms |
348 KB |
n = 86, m = 8 |
27 |
Correct |
0 ms |
348 KB |
n = 53, m = 22 |
28 |
Correct |
0 ms |
348 KB |
n = 89, m = 35 |
29 |
Correct |
0 ms |
348 KB |
n = 63, m = 25 |
30 |
Correct |
0 ms |
344 KB |
n = 100, m = 50 |
31 |
Correct |
0 ms |
348 KB |
n = 99, m = 50 |
32 |
Correct |
0 ms |
348 KB |
n = 13, m = 4 |
33 |
Correct |
0 ms |
348 KB |
n = 86, m = 2 |
34 |
Correct |
0 ms |
348 KB |
n = 88, m = 2 |
35 |
Correct |
0 ms |
348 KB |
n = 86, m = 2 |
36 |
Correct |
0 ms |
348 KB |
n = 81, m = 6 |
37 |
Correct |
0 ms |
348 KB |
n = 98, m = 7 |
38 |
Correct |
0 ms |
348 KB |
n = 92, m = 7 |
39 |
Correct |
0 ms |
448 KB |
n = 88, m = 21 |
40 |
Correct |
0 ms |
348 KB |
n = 90, m = 21 |
41 |
Correct |
0 ms |
348 KB |
n = 98, m = 22 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
n = 13, m = 1 |
2 |
Correct |
0 ms |
348 KB |
n = 18, m = 1 |
3 |
Correct |
0 ms |
348 KB |
n = 17, m = 1 |
4 |
Correct |
0 ms |
344 KB |
n = 1, m = 1 |
5 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
6 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
7 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
8 |
Correct |
1 ms |
348 KB |
n = 20, m = 5 |
9 |
Correct |
0 ms |
348 KB |
n = 18, m = 3 |
10 |
Correct |
0 ms |
452 KB |
n = 17, m = 2 |
11 |
Correct |
0 ms |
348 KB |
n = 20, m = 2 |
12 |
Correct |
0 ms |
348 KB |
n = 17, m = 4 |
13 |
Correct |
1 ms |
348 KB |
n = 17, m = 6 |
14 |
Correct |
0 ms |
348 KB |
n = 17, m = 1 |
15 |
Correct |
0 ms |
348 KB |
n = 17, m = 4 |
16 |
Correct |
0 ms |
344 KB |
n = 13, m = 3 |
17 |
Correct |
0 ms |
348 KB |
n = 18, m = 4 |
18 |
Correct |
0 ms |
512 KB |
n = 20, m = 10 |
19 |
Correct |
0 ms |
348 KB |
n = 19, m = 10 |
20 |
Correct |
1 ms |
348 KB |
n = 100, m = 5 |
21 |
Correct |
0 ms |
348 KB |
n = 90, m = 3 |
22 |
Correct |
0 ms |
348 KB |
n = 86, m = 2 |
23 |
Correct |
0 ms |
348 KB |
n = 81, m = 4 |
24 |
Correct |
0 ms |
348 KB |
n = 89, m = 10 |
25 |
Correct |
1 ms |
348 KB |
n = 81, m = 23 |
26 |
Correct |
1 ms |
348 KB |
n = 86, m = 8 |
27 |
Correct |
0 ms |
348 KB |
n = 53, m = 22 |
28 |
Correct |
0 ms |
348 KB |
n = 89, m = 35 |
29 |
Correct |
0 ms |
348 KB |
n = 63, m = 25 |
30 |
Correct |
0 ms |
344 KB |
n = 100, m = 50 |
31 |
Correct |
0 ms |
348 KB |
n = 99, m = 50 |
32 |
Correct |
0 ms |
348 KB |
n = 13, m = 4 |
33 |
Correct |
0 ms |
348 KB |
n = 86, m = 2 |
34 |
Correct |
0 ms |
348 KB |
n = 88, m = 2 |
35 |
Correct |
0 ms |
348 KB |
n = 86, m = 2 |
36 |
Correct |
0 ms |
348 KB |
n = 81, m = 6 |
37 |
Correct |
0 ms |
348 KB |
n = 98, m = 7 |
38 |
Correct |
0 ms |
348 KB |
n = 92, m = 7 |
39 |
Correct |
0 ms |
448 KB |
n = 88, m = 21 |
40 |
Correct |
0 ms |
348 KB |
n = 90, m = 21 |
41 |
Correct |
0 ms |
348 KB |
n = 98, m = 22 |
42 |
Correct |
0 ms |
348 KB |
n = 11, m = 2 |
43 |
Correct |
0 ms |
348 KB |
n = 11, m = 2 |
44 |
Correct |
0 ms |
348 KB |
n = 13, m = 3 |
45 |
Correct |
0 ms |
348 KB |
n = 86, m = 2 |
46 |
Correct |
0 ms |
348 KB |
n = 81, m = 2 |
47 |
Correct |
0 ms |
348 KB |
n = 93, m = 2 |
48 |
Correct |
0 ms |
348 KB |
n = 81, m = 2 |
49 |
Correct |
1 ms |
348 KB |
n = 86, m = 2 |
50 |
Correct |
0 ms |
348 KB |
n = 90, m = 2 |
51 |
Correct |
0 ms |
448 KB |
n = 87, m = 2 |
52 |
Correct |
1 ms |
348 KB |
n = 97, m = 2 |
53 |
Correct |
0 ms |
348 KB |
n = 85, m = 2 |
54 |
Correct |
0 ms |
348 KB |
n = 88, m = 7 |
55 |
Correct |
0 ms |
348 KB |
n = 96, m = 7 |
56 |
Correct |
1 ms |
348 KB |
n = 85, m = 7 |
57 |
Correct |
1 ms |
344 KB |
n = 92, m = 7 |
58 |
Correct |
0 ms |
348 KB |
n = 92, m = 7 |
59 |
Correct |
0 ms |
348 KB |
n = 86, m = 7 |
60 |
Correct |
0 ms |
348 KB |
n = 87, m = 7 |
61 |
Correct |
0 ms |
348 KB |
n = 100, m = 7 |
62 |
Correct |
1 ms |
604 KB |
n = 100, m = 7 |
63 |
Correct |
1 ms |
444 KB |
n = 92, m = 21 |
64 |
Correct |
1 ms |
348 KB |
n = 93, m = 22 |
65 |
Correct |
1 ms |
348 KB |
n = 95, m = 22 |
66 |
Correct |
1 ms |
348 KB |
n = 98, m = 22 |
67 |
Correct |
1 ms |
448 KB |
n = 94, m = 22 |
68 |
Correct |
1 ms |
348 KB |
n = 93, m = 22 |
69 |
Correct |
0 ms |
348 KB |
n = 88, m = 21 |
70 |
Correct |
1 ms |
348 KB |
n = 83, m = 20 |
71 |
Correct |
0 ms |
348 KB |
n = 99, m = 23 |
72 |
Correct |
1 ms |
348 KB |
n = 96, m = 19 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
n = 13, m = 1 |
2 |
Correct |
0 ms |
348 KB |
n = 18, m = 1 |
3 |
Correct |
0 ms |
348 KB |
n = 17, m = 1 |
4 |
Correct |
0 ms |
344 KB |
n = 1, m = 1 |
5 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
6 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
7 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
8 |
Correct |
1 ms |
348 KB |
n = 20, m = 5 |
9 |
Correct |
0 ms |
348 KB |
n = 18, m = 3 |
10 |
Correct |
0 ms |
452 KB |
n = 17, m = 2 |
11 |
Correct |
0 ms |
348 KB |
n = 20, m = 2 |
12 |
Correct |
0 ms |
348 KB |
n = 17, m = 4 |
13 |
Correct |
1 ms |
348 KB |
n = 17, m = 6 |
14 |
Correct |
0 ms |
348 KB |
n = 17, m = 1 |
15 |
Correct |
0 ms |
348 KB |
n = 17, m = 4 |
16 |
Correct |
0 ms |
344 KB |
n = 13, m = 3 |
17 |
Correct |
0 ms |
348 KB |
n = 18, m = 4 |
18 |
Correct |
0 ms |
512 KB |
n = 20, m = 10 |
19 |
Correct |
0 ms |
348 KB |
n = 19, m = 10 |
20 |
Correct |
1 ms |
348 KB |
n = 100, m = 5 |
21 |
Correct |
0 ms |
348 KB |
n = 90, m = 3 |
22 |
Correct |
0 ms |
348 KB |
n = 86, m = 2 |
23 |
Correct |
0 ms |
348 KB |
n = 81, m = 4 |
24 |
Correct |
0 ms |
348 KB |
n = 89, m = 10 |
25 |
Correct |
1 ms |
348 KB |
n = 81, m = 23 |
26 |
Correct |
1 ms |
348 KB |
n = 86, m = 8 |
27 |
Correct |
0 ms |
348 KB |
n = 53, m = 22 |
28 |
Correct |
0 ms |
348 KB |
n = 89, m = 35 |
29 |
Correct |
0 ms |
348 KB |
n = 63, m = 25 |
30 |
Correct |
0 ms |
344 KB |
n = 100, m = 50 |
31 |
Correct |
0 ms |
348 KB |
n = 99, m = 50 |
32 |
Correct |
0 ms |
348 KB |
n = 13, m = 4 |
33 |
Correct |
0 ms |
348 KB |
n = 86, m = 2 |
34 |
Correct |
0 ms |
348 KB |
n = 88, m = 2 |
35 |
Correct |
0 ms |
348 KB |
n = 86, m = 2 |
36 |
Correct |
0 ms |
348 KB |
n = 81, m = 6 |
37 |
Correct |
0 ms |
348 KB |
n = 98, m = 7 |
38 |
Correct |
0 ms |
348 KB |
n = 92, m = 7 |
39 |
Correct |
0 ms |
448 KB |
n = 88, m = 21 |
40 |
Correct |
0 ms |
348 KB |
n = 90, m = 21 |
41 |
Correct |
0 ms |
348 KB |
n = 98, m = 22 |
42 |
Correct |
0 ms |
348 KB |
n = 11, m = 2 |
43 |
Correct |
0 ms |
348 KB |
n = 11, m = 2 |
44 |
Correct |
0 ms |
348 KB |
n = 13, m = 3 |
45 |
Correct |
0 ms |
348 KB |
n = 86, m = 2 |
46 |
Correct |
0 ms |
348 KB |
n = 81, m = 2 |
47 |
Correct |
0 ms |
348 KB |
n = 93, m = 2 |
48 |
Correct |
0 ms |
348 KB |
n = 81, m = 2 |
49 |
Correct |
1 ms |
348 KB |
n = 86, m = 2 |
50 |
Correct |
0 ms |
348 KB |
n = 90, m = 2 |
51 |
Correct |
0 ms |
448 KB |
n = 87, m = 2 |
52 |
Correct |
1 ms |
348 KB |
n = 97, m = 2 |
53 |
Correct |
0 ms |
348 KB |
n = 85, m = 2 |
54 |
Correct |
0 ms |
348 KB |
n = 88, m = 7 |
55 |
Correct |
0 ms |
348 KB |
n = 96, m = 7 |
56 |
Correct |
1 ms |
348 KB |
n = 85, m = 7 |
57 |
Correct |
1 ms |
344 KB |
n = 92, m = 7 |
58 |
Correct |
0 ms |
348 KB |
n = 92, m = 7 |
59 |
Correct |
0 ms |
348 KB |
n = 86, m = 7 |
60 |
Correct |
0 ms |
348 KB |
n = 87, m = 7 |
61 |
Correct |
0 ms |
348 KB |
n = 100, m = 7 |
62 |
Correct |
1 ms |
604 KB |
n = 100, m = 7 |
63 |
Correct |
1 ms |
444 KB |
n = 92, m = 21 |
64 |
Correct |
1 ms |
348 KB |
n = 93, m = 22 |
65 |
Correct |
1 ms |
348 KB |
n = 95, m = 22 |
66 |
Correct |
1 ms |
348 KB |
n = 98, m = 22 |
67 |
Correct |
1 ms |
448 KB |
n = 94, m = 22 |
68 |
Correct |
1 ms |
348 KB |
n = 93, m = 22 |
69 |
Correct |
0 ms |
348 KB |
n = 88, m = 21 |
70 |
Correct |
1 ms |
348 KB |
n = 83, m = 20 |
71 |
Correct |
0 ms |
348 KB |
n = 99, m = 23 |
72 |
Correct |
1 ms |
348 KB |
n = 96, m = 19 |
73 |
Correct |
1 ms |
860 KB |
n = 4825, m = 5 |
74 |
Correct |
1 ms |
1116 KB |
n = 4384, m = 5 |
75 |
Correct |
1 ms |
1116 KB |
n = 4528, m = 5 |
76 |
Correct |
1 ms |
1116 KB |
n = 4980, m = 5 |
77 |
Correct |
1 ms |
1116 KB |
n = 4730, m = 5 |
78 |
Correct |
1 ms |
860 KB |
n = 4784, m = 5 |
79 |
Correct |
1 ms |
860 KB |
n = 4875, m = 5 |
80 |
Correct |
1 ms |
860 KB |
n = 4576, m = 5 |
81 |
Correct |
1 ms |
1116 KB |
n = 4297, m = 5 |
82 |
Correct |
2 ms |
1112 KB |
n = 4662, m = 48 |
83 |
Correct |
1 ms |
1116 KB |
n = 4753, m = 49 |
84 |
Correct |
2 ms |
1116 KB |
n = 4148, m = 46 |
85 |
Correct |
2 ms |
1372 KB |
n = 4906, m = 50 |
86 |
Correct |
2 ms |
1372 KB |
n = 4967, m = 50 |
87 |
Correct |
2 ms |
1372 KB |
n = 4828, m = 49 |
88 |
Correct |
1 ms |
1112 KB |
n = 4105, m = 45 |
89 |
Correct |
2 ms |
1472 KB |
n = 4954, m = 50 |
90 |
Correct |
2 ms |
1372 KB |
n = 4884, m = 49 |
91 |
Correct |
2 ms |
1368 KB |
n = 4307, m = 100 |
92 |
Correct |
2 ms |
1372 KB |
n = 4668, m = 100 |
93 |
Correct |
2 ms |
1376 KB |
n = 4647, m = 100 |
94 |
Correct |
2 ms |
1116 KB |
n = 4372, m = 100 |
95 |
Correct |
2 ms |
1372 KB |
n = 4791, m = 100 |
96 |
Correct |
2 ms |
1196 KB |
n = 4029, m = 100 |
97 |
Correct |
2 ms |
1372 KB |
n = 4439, m = 100 |
98 |
Correct |
2 ms |
1116 KB |
n = 4018, m = 100 |
99 |
Correct |
4 ms |
1372 KB |
n = 4979, m = 100 |
100 |
Correct |
2 ms |
1372 KB |
n = 4996, m = 89 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
n = 13, m = 1 |
2 |
Correct |
0 ms |
348 KB |
n = 18, m = 1 |
3 |
Correct |
0 ms |
348 KB |
n = 17, m = 1 |
4 |
Correct |
0 ms |
344 KB |
n = 1, m = 1 |
5 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
6 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
7 |
Correct |
0 ms |
348 KB |
n = 20, m = 1 |
8 |
Correct |
1 ms |
348 KB |
n = 20, m = 5 |
9 |
Correct |
0 ms |
348 KB |
n = 18, m = 3 |
10 |
Correct |
0 ms |
452 KB |
n = 17, m = 2 |
11 |
Correct |
0 ms |
348 KB |
n = 20, m = 2 |
12 |
Correct |
0 ms |
348 KB |
n = 17, m = 4 |
13 |
Correct |
1 ms |
348 KB |
n = 17, m = 6 |
14 |
Correct |
0 ms |
348 KB |
n = 17, m = 1 |
15 |
Correct |
0 ms |
348 KB |
n = 17, m = 4 |
16 |
Correct |
0 ms |
344 KB |
n = 13, m = 3 |
17 |
Correct |
0 ms |
348 KB |
n = 18, m = 4 |
18 |
Correct |
0 ms |
512 KB |
n = 20, m = 10 |
19 |
Correct |
0 ms |
348 KB |
n = 19, m = 10 |
20 |
Correct |
1 ms |
348 KB |
n = 100, m = 5 |
21 |
Correct |
0 ms |
348 KB |
n = 90, m = 3 |
22 |
Correct |
0 ms |
348 KB |
n = 86, m = 2 |
23 |
Correct |
0 ms |
348 KB |
n = 81, m = 4 |
24 |
Correct |
0 ms |
348 KB |
n = 89, m = 10 |
25 |
Correct |
1 ms |
348 KB |
n = 81, m = 23 |
26 |
Correct |
1 ms |
348 KB |
n = 86, m = 8 |
27 |
Correct |
0 ms |
348 KB |
n = 53, m = 22 |
28 |
Correct |
0 ms |
348 KB |
n = 89, m = 35 |
29 |
Correct |
0 ms |
348 KB |
n = 63, m = 25 |
30 |
Correct |
0 ms |
344 KB |
n = 100, m = 50 |
31 |
Correct |
0 ms |
348 KB |
n = 99, m = 50 |
32 |
Correct |
0 ms |
348 KB |
n = 13, m = 4 |
33 |
Correct |
0 ms |
348 KB |
n = 86, m = 2 |
34 |
Correct |
0 ms |
348 KB |
n = 88, m = 2 |
35 |
Correct |
0 ms |
348 KB |
n = 86, m = 2 |
36 |
Correct |
0 ms |
348 KB |
n = 81, m = 6 |
37 |
Correct |
0 ms |
348 KB |
n = 98, m = 7 |
38 |
Correct |
0 ms |
348 KB |
n = 92, m = 7 |
39 |
Correct |
0 ms |
448 KB |
n = 88, m = 21 |
40 |
Correct |
0 ms |
348 KB |
n = 90, m = 21 |
41 |
Correct |
0 ms |
348 KB |
n = 98, m = 22 |
42 |
Correct |
0 ms |
348 KB |
n = 11, m = 2 |
43 |
Correct |
0 ms |
348 KB |
n = 11, m = 2 |
44 |
Correct |
0 ms |
348 KB |
n = 13, m = 3 |
45 |
Correct |
0 ms |
348 KB |
n = 86, m = 2 |
46 |
Correct |
0 ms |
348 KB |
n = 81, m = 2 |
47 |
Correct |
0 ms |
348 KB |
n = 93, m = 2 |
48 |
Correct |
0 ms |
348 KB |
n = 81, m = 2 |
49 |
Correct |
1 ms |
348 KB |
n = 86, m = 2 |
50 |
Correct |
0 ms |
348 KB |
n = 90, m = 2 |
51 |
Correct |
0 ms |
448 KB |
n = 87, m = 2 |
52 |
Correct |
1 ms |
348 KB |
n = 97, m = 2 |
53 |
Correct |
0 ms |
348 KB |
n = 85, m = 2 |
54 |
Correct |
0 ms |
348 KB |
n = 88, m = 7 |
55 |
Correct |
0 ms |
348 KB |
n = 96, m = 7 |
56 |
Correct |
1 ms |
348 KB |
n = 85, m = 7 |
57 |
Correct |
1 ms |
344 KB |
n = 92, m = 7 |
58 |
Correct |
0 ms |
348 KB |
n = 92, m = 7 |
59 |
Correct |
0 ms |
348 KB |
n = 86, m = 7 |
60 |
Correct |
0 ms |
348 KB |
n = 87, m = 7 |
61 |
Correct |
0 ms |
348 KB |
n = 100, m = 7 |
62 |
Correct |
1 ms |
604 KB |
n = 100, m = 7 |
63 |
Correct |
1 ms |
444 KB |
n = 92, m = 21 |
64 |
Correct |
1 ms |
348 KB |
n = 93, m = 22 |
65 |
Correct |
1 ms |
348 KB |
n = 95, m = 22 |
66 |
Correct |
1 ms |
348 KB |
n = 98, m = 22 |
67 |
Correct |
1 ms |
448 KB |
n = 94, m = 22 |
68 |
Correct |
1 ms |
348 KB |
n = 93, m = 22 |
69 |
Correct |
0 ms |
348 KB |
n = 88, m = 21 |
70 |
Correct |
1 ms |
348 KB |
n = 83, m = 20 |
71 |
Correct |
0 ms |
348 KB |
n = 99, m = 23 |
72 |
Correct |
1 ms |
348 KB |
n = 96, m = 19 |
73 |
Correct |
1 ms |
860 KB |
n = 4825, m = 5 |
74 |
Correct |
1 ms |
1116 KB |
n = 4384, m = 5 |
75 |
Correct |
1 ms |
1116 KB |
n = 4528, m = 5 |
76 |
Correct |
1 ms |
1116 KB |
n = 4980, m = 5 |
77 |
Correct |
1 ms |
1116 KB |
n = 4730, m = 5 |
78 |
Correct |
1 ms |
860 KB |
n = 4784, m = 5 |
79 |
Correct |
1 ms |
860 KB |
n = 4875, m = 5 |
80 |
Correct |
1 ms |
860 KB |
n = 4576, m = 5 |
81 |
Correct |
1 ms |
1116 KB |
n = 4297, m = 5 |
82 |
Correct |
2 ms |
1112 KB |
n = 4662, m = 48 |
83 |
Correct |
1 ms |
1116 KB |
n = 4753, m = 49 |
84 |
Correct |
2 ms |
1116 KB |
n = 4148, m = 46 |
85 |
Correct |
2 ms |
1372 KB |
n = 4906, m = 50 |
86 |
Correct |
2 ms |
1372 KB |
n = 4967, m = 50 |
87 |
Correct |
2 ms |
1372 KB |
n = 4828, m = 49 |
88 |
Correct |
1 ms |
1112 KB |
n = 4105, m = 45 |
89 |
Correct |
2 ms |
1472 KB |
n = 4954, m = 50 |
90 |
Correct |
2 ms |
1372 KB |
n = 4884, m = 49 |
91 |
Correct |
2 ms |
1368 KB |
n = 4307, m = 100 |
92 |
Correct |
2 ms |
1372 KB |
n = 4668, m = 100 |
93 |
Correct |
2 ms |
1376 KB |
n = 4647, m = 100 |
94 |
Correct |
2 ms |
1116 KB |
n = 4372, m = 100 |
95 |
Correct |
2 ms |
1372 KB |
n = 4791, m = 100 |
96 |
Correct |
2 ms |
1196 KB |
n = 4029, m = 100 |
97 |
Correct |
2 ms |
1372 KB |
n = 4439, m = 100 |
98 |
Correct |
2 ms |
1116 KB |
n = 4018, m = 100 |
99 |
Correct |
4 ms |
1372 KB |
n = 4979, m = 100 |
100 |
Correct |
2 ms |
1372 KB |
n = 4996, m = 89 |
101 |
Correct |
17 ms |
19880 KB |
n = 178952, m = 10 |
102 |
Correct |
18 ms |
26024 KB |
n = 180674, m = 10 |
103 |
Correct |
17 ms |
21684 KB |
n = 167639, m = 10 |
104 |
Correct |
18 ms |
25056 KB |
n = 172892, m = 10 |
105 |
Correct |
16 ms |
20704 KB |
n = 168125, m = 10 |
106 |
Correct |
17 ms |
22736 KB |
n = 166514, m = 10 |
107 |
Correct |
18 ms |
22616 KB |
n = 183874, m = 10 |
108 |
Correct |
21 ms |
24732 KB |
n = 194560, m = 10 |
109 |
Correct |
18 ms |
26804 KB |
n = 171994, m = 10 |
110 |
Correct |
57 ms |
19696 KB |
n = 165207, m = 100 |
111 |
Correct |
57 ms |
24468 KB |
n = 188459, m = 100 |
112 |
Correct |
72 ms |
22612 KB |
n = 162137, m = 100 |
113 |
Correct |
60 ms |
22228 KB |
n = 169691, m = 100 |
114 |
Correct |
60 ms |
24920 KB |
n = 187642, m = 100 |
115 |
Correct |
55 ms |
22444 KB |
n = 168456, m = 100 |
116 |
Correct |
59 ms |
25172 KB |
n = 180980, m = 100 |
117 |
Correct |
69 ms |
25608 KB |
n = 191687, m = 100 |
118 |
Correct |
64 ms |
22308 KB |
n = 166437, m = 100 |
119 |
Correct |
61 ms |
24816 KB |
n = 186520, m = 100 |
120 |
Correct |
53 ms |
18952 KB |
n = 166675, m = 100 |
121 |
Correct |
60 ms |
23704 KB |
n = 187725, m = 100 |
122 |
Correct |
50 ms |
21680 KB |
n = 161455, m = 100 |
123 |
Correct |
65 ms |
23992 KB |
n = 192977, m = 100 |
124 |
Correct |
61 ms |
24720 KB |
n = 192612, m = 100 |
125 |
Correct |
62 ms |
23636 KB |
n = 196512, m = 100 |
126 |
Correct |
62 ms |
24660 KB |
n = 198968, m = 100 |
127 |
Correct |
54 ms |
22704 KB |
n = 166659, m = 100 |
128 |
Correct |
49 ms |
44260 KB |
n = 199997, m = 34 |
129 |
Correct |
21 ms |
44184 KB |
n = 200000, m = 1 |
130 |
Correct |
22 ms |
44180 KB |
n = 200000, m = 1 |
131 |
Correct |
197 ms |
44168 KB |
n = 199999, m = 100 |
132 |
Correct |
112 ms |
44244 KB |
n = 199999, m = 100 |
133 |
Correct |
4 ms |
3220 KB |
n = 200000, m = 1 |