QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#296083 | #4893. Imbalance | zyc070419 | 40 | 1903ms | 53268kb | C++14 | 6.8kb | 2024-01-02 08:04:03 | 2024-01-02 08:04:03 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
inline int add(int x, int y) {x += y; return x >= mod ? x - mod : x;}
inline int del(int x, int y) {x -= y; return x < 0 ? x + mod : x;}
inline void Add(int &x, int y) {x = add(x, y);}
inline void Del(int &x, int y) {x = del(x, y);}
int n, k, m, a[200];
char s[200];
namespace subtask1 {
int dp[2][(1 << 22) + 3], opt, ans, cnt[(1 << 22) + 3];
void work() {
memset(dp, 0, sizeof(dp));
dp[opt][0] = 1;
for (int i = 1; i <= n; ++i) {
opt ^= 1;
for (int S = 0; S < (1 << k); ++S) dp[opt][S] = 0;
for (int S = 0, T; S < (1 << k); ++S) {
if (cnt[S] >= (k / 2)) continue;
if (i > m || a[i] == 0) {
T = (S >> 1);
Add(dp[opt][T], dp[opt ^ 1][S]);
}
if (i > m || a[i] == 1) {
T = (S >> 1) | (1 << (k - 1));
if (cnt[T] >= (k / 2)) continue;
Add(dp[opt][T], dp[opt ^ 1][S]);
}
}
}
for (int S = 0; S < (1 << k); ++S) Add(ans, dp[opt][S]);
}
void solve() {
for (int i = 1; i < (1 << k); ++i) cnt[i] = cnt[i ^ (i & -i)] + 1;
work();
for (int i = 1; i <= m; ++i) a[i] ^= 1;
work();
printf("%d\n", ans);
}
}
namespace subtask2 {
const int Mod = 10997;
struct Hash_Table {
struct edge {
int to, nxt;
edge() {}
edge(int x, int y) {to = x; nxt = y;}
};
struct node {
vector<int> id;
int val;
node() {}
node(vector<int> x, int y) {id = x; val = y;}
};
vector<node> q;
vector<edge> e;
int link[Mod + 10];
inline int g(int x) {return (1ll * x * x % Mod * x % Mod + (x ^ 287) % Mod) % Mod + 1;}
inline int f(vector<int> &tmp) {
int res = 0;
for (auto x : tmp) res = (res + g(x)) % Mod;
return res;
}
void ins(vector<int> &tmp, int val) {
if (val == 0) return;
int ID = f(tmp); bool pd;
for (int i = link[ID], y; i; i = e[i].nxt) {
y = e[i].to; pd = true;
for (int j = 0; j < q[y].id.size(); ++j) pd &= (q[y].id[j] == tmp[j]);
if (pd) {
Add(q[y].val, val);
return;
}
}
q.push_back(node(tmp, val));
e.push_back(edge(q.size() - 1, link[ID]));
link[ID] = e.size() - 1;
}
void clear() {
e.clear(); e.push_back(edge());
q.clear();
for (int i = 1; i <= Mod; ++i) link[i] = 0;
}
}H[2];
int st[10], mx, opt, ans;
vector<int> now, nxt;
void work() {
H[0].clear(); H[1].clear();
now.resize(mx + 1);
for (int i = 0; i <= mx; ++i) now[i] = 0;
H[opt].ins(now, 1);
int pos;
for (int i = 1; i < k; ++i) {
for (int j = 0; j <= mx; ++j) {
pos = j * k + i;
opt ^= 1;
for (auto o : H[opt ^ 1].q) {
now = o.id;
if (pos > m || a[pos] == 0) {
nxt = now; bool pd = true;
if (j < mx && st[j] + nxt[j] + k - i - ((j + 1) * k <= m && a[(j + 1) * k] == 0) < st[j + 1]) pd = false;
if (j < mx && st[j] + nxt[j] + ((j + 1) * k <= m && a[(j + 1) * k] == 1) > st[j + 1]) pd = false;
if (j && nxt[j - 1] + st[j - 1] > nxt[j] + st[j]) pd = false;
if (j && nxt[j - 1] + st[j - 1] + k / 2 <= nxt[j] + st[j]) pd = false;
if (pd) H[opt].ins(nxt, o.val);
}
if (pos <= n && (pos > m || a[pos] == 1)) {
nxt = now; bool pd = true;
nxt[j]++;
if (j < mx && st[j] + nxt[j] + k - i - ((j + 1) * k <= m && a[(j + 1) * k] == 0) < st[j + 1]) pd = false;
if (j < mx && st[j] + nxt[j] + ((j + 1) * k <= m && a[(j + 1) * k] == 1) > st[j + 1]) pd = false;
if (j && nxt[j - 1] + st[j - 1] > nxt[j] + st[j]) pd = false;
if (j && nxt[j - 1] + st[j - 1] + k / 2 <= nxt[j] + st[j]) pd = false;
if (pd) H[opt].ins(nxt, o.val);
}
}
H[opt ^ 1].clear();
}
}
for (auto o : H[opt].q) {
now = o.id;
Add(ans, o.val);
}
}
void dfs(int t, int lst) {
if (t > mx) return work(), void();
for (int i = lst; i < lst + k / 2; ++i) {
st[t] = i;
dfs(t + 1, i);
}
}
void solve() {
mx = n / k;
dfs(1, 0);
for (int i = 1; i <= m; ++i) a[i] ^= 1;
dfs(1, 0);
printf("%d\n", ans);
}
}
namespace subtask3 {
struct node {
int x, y;
}p[10];
int st[10], a[10][10], ans, mx, fac[505], inv[505];
inline int qpow(int x, int y) {
int res = 1;
while (y) {
if (y & 1) res = 1ll * res * x % mod;
x = 1ll * x * x % mod;
y >>= 1;
}
return res;
}
inline int C(int x, int y) {return (x < 0 || y < 0 || x < y) ? 0 : 1ll * fac[x] * inv[y] % mod * inv[x - y] % mod;}
void work() {
// int mem = (n - 1) % k + 1;
// for (int i = 0; i <= mx + 1; ++i) printf("%d ", st[i]); puts("");
for (int i = 0; i < mx; ++i) {
p[i].x = st[i] - k / 2 * i;
p[i].y = st[i + 1] - k / 2 * i;
}
p[mx].x = st[mx] - k / 2 * mx;
p[mx].y = st[mx + 1] - k / 2 * mx;
// for (int i = 0; i <= mx; ++i) printf("(%d %d)\n", p[i].x, p[i].y);
// puts("");
for (int i = 0; i <= mx; ++i) {
for (int j = 0; j <= mx; ++j) {
if (j < mx) {
if (p[i].x > p[mx].y) a[i][j] = C(k, p[j].y - p[i].x);
else {
a[i][j] = 0;
for (int o = p[mx].y - p[i].x; o <= p[j].y - p[i].x; ++o) {
if (o > p[mx].y - p[i].x) Add(a[i][j], 1ll * C(n % k, o) * C(k - n % k, p[j].y - p[i].x - o) % mod);
else Add(a[i][j], 1ll * C(n % k, o) * C(k - n % k - 1, p[j].y - p[i].x - o - 1) % mod);
}
}
}
else a[i][j] = C(n % k, p[j].y - p[i].x);
printf("%d ", a[i][j]);
}
puts("");
}
puts("");
int res = 1;
// for (int i = 0; i <= mx; ++i)
// for (int j = 0; j < i; ++j)
// swap(a[i][j], a[j][i]);
for (int i = 0; i <= mx; ++i) {
for (int j = i + 1; j <= mx; ++j) {
while (a[j][i]) {
swap(a[j], a[i]); res = mod - res;
int tmp = a[j][i] / a[i][i];
for (int o = i; o <= mx; ++o) Del(a[j][o], 1ll * tmp * a[i][o] % mod);
}
}
res = 1ll * res * a[i][i] % mod;
}
// assert(res >= 0);
// printf("{%d}\n", res);
Add(ans, res);
}
void dfs(int t, int lst) {
if (t > mx + 1) return work(), void();
if (t > mx) {
// if (n % k == 0) return st[t] = st[t - 1], dfs(t + 1, lst), void();
for (int i = lst; i <= lst + n % k; ++i) {
st[t] = i;
dfs(t + 1, i);
}
return;
}
for (int i = lst; i < lst + k / 2; ++i) {
st[t] = i;
dfs(t + 1, i);
}
}
void solve() {
fac[0] = 1;
for (int i = 1; i <= 500; ++i) fac[i] = 1ll * fac[i - 1] * i % mod;
inv[500] = qpow(fac[500], mod - 2);
for (int i = 500; i >= 1; --i) inv[i - 1] = 1ll * inv[i] * i % mod;
mx = n / k;
dfs(1, 0); ans = add(ans, ans);
printf("%d\n", ans);
}
}
int main() {
scanf("%d%d%d%s", &n, &k, &m, s + 1);
for (int i = 1; i <= m; ++i) a[i] = s[i] - '0';
// subtask3 :: solve(); return 0;
if (k <= 22 && n <= 66) subtask1 :: solve();
else if (n <= 66) subtask2 :: solve();
else if (m == 0) subtask3 :: solve();
return 0;
}
/*
5 4 0
^Z
*/
詳細信息
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 0ms
memory: 37536kb
input:
2 2 0
output:
2
result:
ok 1 number(s): "2"
Test #2:
score: 0
Accepted
time: 0ms
memory: 38272kb
input:
2 2 1 0
output:
1
result:
ok 1 number(s): "1"
Test #3:
score: 0
Accepted
time: 0ms
memory: 37568kb
input:
3 2 0
output:
2
result:
ok 1 number(s): "2"
Test #4:
score: 0
Accepted
time: 0ms
memory: 38372kb
input:
3 2 1 0
output:
1
result:
ok 1 number(s): "1"
Test #5:
score: 0
Accepted
time: 6ms
memory: 38584kb
input:
4 2 0
output:
2
result:
ok 1 number(s): "2"
Test #6:
score: 0
Accepted
time: 9ms
memory: 38100kb
input:
4 2 1 0
output:
1
result:
ok 1 number(s): "1"
Test #7:
score: 0
Accepted
time: 7ms
memory: 38060kb
input:
4 4 0
output:
10
result:
ok 1 number(s): "10"
Test #8:
score: 0
Accepted
time: 5ms
memory: 37776kb
input:
4 4 1 1
output:
5
result:
ok 1 number(s): "5"
Test #9:
score: 0
Accepted
time: 7ms
memory: 38364kb
input:
4 4 2 00
output:
3
result:
ok 1 number(s): "3"
Test #10:
score: 0
Accepted
time: 3ms
memory: 38424kb
input:
4 4 3 101
output:
1
result:
ok 1 number(s): "1"
Test #11:
score: 0
Accepted
time: 6ms
memory: 38060kb
input:
5 2 0
output:
2
result:
ok 1 number(s): "2"
Test #12:
score: 0
Accepted
time: 0ms
memory: 38832kb
input:
5 2 1 1
output:
1
result:
ok 1 number(s): "1"
Test #13:
score: 0
Accepted
time: 0ms
memory: 38608kb
input:
5 4 0
output:
14
result:
ok 1 number(s): "14"
Test #14:
score: 0
Accepted
time: 4ms
memory: 37348kb
input:
5 4 1 0
output:
7
result:
ok 1 number(s): "7"
Test #15:
score: 0
Accepted
time: 8ms
memory: 37620kb
input:
5 4 2 01
output:
3
result:
ok 1 number(s): "3"
Test #16:
score: 0
Accepted
time: 6ms
memory: 37404kb
input:
5 4 3 110
output:
1
result:
ok 1 number(s): "1"
Test #17:
score: 0
Accepted
time: 0ms
memory: 37404kb
input:
17 2 0
output:
2
result:
ok 1 number(s): "2"
Test #18:
score: 0
Accepted
time: 0ms
memory: 37500kb
input:
17 2 0
output:
2
result:
ok 1 number(s): "2"
Test #19:
score: 0
Accepted
time: 3ms
memory: 38792kb
input:
17 10 6 110111
output:
621
result:
ok 1 number(s): "621"
Test #20:
score: 0
Accepted
time: 5ms
memory: 37288kb
input:
17 10 2 11
output:
8413
result:
ok 1 number(s): "8413"
Test #21:
score: 0
Accepted
time: 0ms
memory: 37972kb
input:
18 2 1 1
output:
1
result:
ok 1 number(s): "1"
Test #22:
score: 0
Accepted
time: 0ms
memory: 37844kb
input:
18 2 1 1
output:
1
result:
ok 1 number(s): "1"
Test #23:
score: 0
Accepted
time: 3ms
memory: 37332kb
input:
18 8 5 00010
output:
918
result:
ok 1 number(s): "918"
Test #24:
score: 0
Accepted
time: 5ms
memory: 36692kb
input:
18 8 3 001
output:
3404
result:
ok 1 number(s): "3404"
Test #25:
score: 0
Accepted
time: 7ms
memory: 38248kb
input:
18 16 6 100011
output:
2458
result:
ok 1 number(s): "2458"
Test #26:
score: 0
Accepted
time: 7ms
memory: 37280kb
input:
18 16 8 00101101
output:
548
result:
ok 1 number(s): "548"
Test #27:
score: 0
Accepted
time: 3ms
memory: 36832kb
input:
19 2 1 1
output:
1
result:
ok 1 number(s): "1"
Test #28:
score: 0
Accepted
time: 6ms
memory: 37988kb
input:
19 2 0
output:
2
result:
ok 1 number(s): "2"
Test #29:
score: 0
Accepted
time: 0ms
memory: 38552kb
input:
19 6 2 00
output:
3413
result:
ok 1 number(s): "3413"
Test #30:
score: 0
Accepted
time: 3ms
memory: 38012kb
input:
19 6 1 1
output:
7012
result:
ok 1 number(s): "7012"
Test #31:
score: 0
Accepted
time: 6ms
memory: 38140kb
input:
19 12 10 1010110000
output:
266
result:
ok 1 number(s): "266"
Test #32:
score: 0
Accepted
time: 2ms
memory: 37480kb
input:
19 12 3 111
output:
19234
result:
ok 1 number(s): "19234"
Test #33:
score: 0
Accepted
time: 3ms
memory: 37240kb
input:
19 16 2 10
output:
77876
result:
ok 1 number(s): "77876"
Test #34:
score: 0
Accepted
time: 3ms
memory: 40756kb
input:
19 16 0
output:
301208
result:
ok 1 number(s): "301208"
Test #35:
score: 0
Accepted
time: 4ms
memory: 37752kb
input:
20 2 1 0
output:
1
result:
ok 1 number(s): "1"
Test #36:
score: 0
Accepted
time: 0ms
memory: 38264kb
input:
20 2 0
output:
2
result:
ok 1 number(s): "2"
Test #37:
score: 0
Accepted
time: 4ms
memory: 38520kb
input:
20 10 9 110111000
output:
76
result:
ok 1 number(s): "76"
Test #38:
score: 0
Accepted
time: 7ms
memory: 37576kb
input:
20 10 9 110101110
output:
372
result:
ok 1 number(s): "372"
Test #39:
score: 0
Accepted
time: 0ms
memory: 37792kb
input:
20 14 11 10110110000
output:
207
result:
ok 1 number(s): "207"
Test #40:
score: 0
Accepted
time: 0ms
memory: 38028kb
input:
20 14 7 0011011
output:
3675
result:
ok 1 number(s): "3675"
Test #41:
score: 0
Accepted
time: 73ms
memory: 42756kb
input:
20 20 14 10111010000000
output:
58
result:
ok 1 number(s): "58"
Subtask #2:
score: 0
Wrong Answer
Dependency #1:
100%
Accepted
Test #42:
score: 0
Wrong Answer
time: 0ms
memory: 3704kb
input:
114 12 11 11010000010
output:
result:
wrong answer Answer contains longer sequence [length = 1], but output contains 0 elements
Subtask #3:
score: 30
Accepted
Dependency #1:
100%
Accepted
Test #84:
score: 30
Accepted
time: 468ms
memory: 42760kb
input:
66 20 5 11001
output:
286180948
result:
ok 1 number(s): "286180948"
Test #85:
score: 0
Accepted
time: 395ms
memory: 42732kb
input:
66 20 19 0101001111011100100
output:
334317215
result:
ok 1 number(s): "334317215"
Test #86:
score: 0
Accepted
time: 1614ms
memory: 53252kb
input:
66 22 19 1001101100000100001
output:
465510840
result:
ok 1 number(s): "465510840"
Test #87:
score: 0
Accepted
time: 1803ms
memory: 52924kb
input:
66 22 11 10001111000
output:
731812403
result:
ok 1 number(s): "731812403"
Test #88:
score: 0
Accepted
time: 245ms
memory: 4268kb
input:
66 24 6 011111
output:
270615978
result:
ok 1 number(s): "270615978"
Test #89:
score: 0
Accepted
time: 247ms
memory: 3980kb
input:
66 24 6 010001
output:
800866476
result:
ok 1 number(s): "800866476"
Test #90:
score: 0
Accepted
time: 204ms
memory: 4304kb
input:
66 26 11 01110011011
output:
292876310
result:
ok 1 number(s): "292876310"
Test #91:
score: 0
Accepted
time: 551ms
memory: 4100kb
input:
66 26 3 110
output:
269818127
result:
ok 1 number(s): "269818127"
Test #92:
score: 0
Accepted
time: 88ms
memory: 3892kb
input:
66 28 22 1111000101010111010110
output:
25687950
result:
ok 1 number(s): "25687950"
Test #93:
score: 0
Accepted
time: 518ms
memory: 4312kb
input:
66 28 7 0010101
output:
21960392
result:
ok 1 number(s): "21960392"
Test #94:
score: 0
Accepted
time: 177ms
memory: 4024kb
input:
66 30 16 1111000000011010
output:
599613456
result:
ok 1 number(s): "599613456"
Test #95:
score: 0
Accepted
time: 100ms
memory: 3916kb
input:
66 30 22 0010101110011001011100
output:
332331060
result:
ok 1 number(s): "332331060"
Test #96:
score: 0
Accepted
time: 212ms
memory: 3968kb
input:
66 32 12 011100101111
output:
692517940
result:
ok 1 number(s): "692517940"
Test #97:
score: 0
Accepted
time: 132ms
memory: 3964kb
input:
66 32 16 0100100100101001
output:
967944648
result:
ok 1 number(s): "967944648"
Test #98:
score: 0
Accepted
time: 478ms
memory: 42680kb
input:
65 20 1 1
output:
42155886
result:
ok 1 number(s): "42155886"
Test #99:
score: 0
Accepted
time: 390ms
memory: 42732kb
input:
65 20 17 10010110011011111
output:
178005033
result:
ok 1 number(s): "178005033"
Test #100:
score: 0
Accepted
time: 1662ms
memory: 53268kb
input:
65 22 16 0001011100100000
output:
785335838
result:
ok 1 number(s): "785335838"
Test #101:
score: 0
Accepted
time: 1770ms
memory: 52984kb
input:
65 22 13 1001101010101
output:
440523928
result:
ok 1 number(s): "440523928"
Test #102:
score: 0
Accepted
time: 463ms
memory: 4228kb
input:
65 24 0
output:
477090711
result:
ok 1 number(s): "477090711"
Test #103:
score: 0
Accepted
time: 76ms
memory: 3984kb
input:
65 24 14 10111111011101
output:
263900154
result:
ok 1 number(s): "263900154"
Test #104:
score: 0
Accepted
time: 234ms
memory: 4320kb
input:
65 26 10 1100111010
output:
343121911
result:
ok 1 number(s): "343121911"
Test #105:
score: 0
Accepted
time: 604ms
memory: 4028kb
input:
65 26 2 01
output:
1028654
result:
ok 1 number(s): "1028654"
Test #106:
score: 0
Accepted
time: 293ms
memory: 4100kb
input:
65 28 11 00010110101
output:
977003245
result:
ok 1 number(s): "977003245"
Test #107:
score: 0
Accepted
time: 78ms
memory: 3948kb
input:
65 28 25 1010000011011011000010010
output:
59779597
result:
ok 1 number(s): "59779597"
Test #108:
score: 0
Accepted
time: 260ms
memory: 4308kb
input:
65 30 12 011010110110
output:
28981686
result:
ok 1 number(s): "28981686"
Test #109:
score: 0
Accepted
time: 570ms
memory: 4012kb
input:
65 30 5 01111
output:
901067934
result:
ok 1 number(s): "901067934"
Test #110:
score: 0
Accepted
time: 202ms
memory: 6220kb
input:
65 32 9 101100011
output:
523898023
result:
ok 1 number(s): "523898023"
Test #111:
score: 0
Accepted
time: 58ms
memory: 4184kb
input:
65 32 31 1010100001010000110110000001000
output:
173664576
result:
ok 1 number(s): "173664576"
Test #112:
score: 0
Accepted
time: 470ms
memory: 43012kb
input:
64 20 2 10
output:
213928626
result:
ok 1 number(s): "213928626"
Test #113:
score: 0
Accepted
time: 383ms
memory: 42792kb
input:
64 20 17 01110111010001000
output:
629845990
result:
ok 1 number(s): "629845990"
Test #114:
score: 0
Accepted
time: 1903ms
memory: 53040kb
input:
64 22 4 0101
output:
755608618
result:
ok 1 number(s): "755608618"
Test #115:
score: 0
Accepted
time: 1553ms
memory: 52968kb
input:
64 22 20 00010010100011111010
output:
381748139
result:
ok 1 number(s): "381748139"
Test #116:
score: 0
Accepted
time: 161ms
memory: 4256kb
input:
64 24 9 100110100
output:
508203808
result:
ok 1 number(s): "508203808"
Test #117:
score: 0
Accepted
time: 54ms
memory: 3932kb
input:
64 24 17 11100000110000111
output:
271951917
result:
ok 1 number(s): "271951917"
Test #118:
score: 0
Accepted
time: 96ms
memory: 3972kb
input:
64 26 16 1100111111111110
output:
947719454
result:
ok 1 number(s): "947719454"
Test #119:
score: 0
Accepted
time: 79ms
memory: 4016kb
input:
64 26 18 101001101111101011
output:
557651914
result:
ok 1 number(s): "557651914"
Test #120:
score: 0
Accepted
time: 450ms
memory: 4300kb
input:
64 28 7 0011101
output:
659928242
result:
ok 1 number(s): "659928242"
Test #121:
score: 0
Accepted
time: 304ms
memory: 4104kb
input:
64 28 10 1100010011
output:
724166061
result:
ok 1 number(s): "724166061"
Test #122:
score: 0
Accepted
time: 655ms
memory: 4020kb
input:
64 30 2 10
output:
922542306
result:
ok 1 number(s): "922542306"
Test #123:
score: 0
Accepted
time: 655ms
memory: 6084kb
input:
64 30 2 10
output:
922542306
result:
ok 1 number(s): "922542306"
Test #124:
score: 0
Accepted
time: 75ms
memory: 3944kb
input:
64 32 14 00100000110010
output:
772135024
result:
ok 1 number(s): "772135024"
Test #125:
score: 0
Accepted
time: 55ms
memory: 3980kb
input:
64 32 19 0110111111001010010
output:
301836349
result:
ok 1 number(s): "301836349"
Test #126:
score: 0
Accepted
time: 33ms
memory: 3960kb
input:
66 48 10 1100101011
output:
250609010
result:
ok 1 number(s): "250609010"
Test #127:
score: 0
Accepted
time: 8ms
memory: 3908kb
input:
66 66 29 01110011011101001000011110101
output:
746018049
result:
ok 1 number(s): "746018049"
Test #128:
score: 0
Accepted
time: 3ms
memory: 38388kb
input:
66 14 7 1001101
output:
871164400
result:
ok 1 number(s): "871164400"
Test #129:
score: 0
Accepted
time: 429ms
memory: 4020kb
input:
66 24 1 0
output:
584525706
result:
ok 1 number(s): "584525706"
Test #130:
score: 0
Accepted
time: 390ms
memory: 4016kb
input:
66 24 2 11
output:
317970168
result:
ok 1 number(s): "317970168"
Test #131:
score: 0
Accepted
time: 660ms
memory: 4008kb
input:
66 26 1 0
output:
391681574
result:
ok 1 number(s): "391681574"
Test #132:
score: 0
Accepted
time: 610ms
memory: 4024kb
input:
66 26 2 00
output:
97862478
result:
ok 1 number(s): "97862478"
Test #133:
score: 0
Accepted
time: 933ms
memory: 3984kb
input:
66 28 1 0
output:
964005824
result:
ok 1 number(s): "964005824"
Test #134:
score: 0
Accepted
time: 856ms
memory: 4316kb
input:
66 28 2 11
output:
521812451
result:
ok 1 number(s): "521812451"
Test #135:
score: 0
Accepted
time: 123ms
memory: 3976kb
input:
57 24 10 0111100111
output:
275357201
result:
ok 1 number(s): "275357201"
Test #136:
score: 0
Accepted
time: 9ms
memory: 3912kb
input:
57 56 13 0111001000100
output:
712420784
result:
ok 1 number(s): "712420784"
Subtask #4:
score: 0
Time Limit Exceeded
Test #137:
score: 0
Time Limit Exceeded
input:
114 20 0
output:
1 0 0 0 0 0 184756 1 0 0 0 0 1 184756 1 0 0 0 0 1 184756 1 0 0 0 0 1 184756 1 0 0 0 0 1 184756 1 1 0 0 0 0 0 184756 1 0 0 0 0 1 184756 1 0 0 0 0 1 184756 1 0 0 0 0 1 184756 1 0 0 0 0 1 184756 14 1 0 0 0 0 0 184756 1 0 0 0 0 1 184756 1 0 0 0 0 1 184756 1 0 0 0 0 1 184756 1 0 0 0 0 ...
result:
Subtask #5:
score: 0
Skipped
Dependency #2:
0%