QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#398321 | #4893. Imbalance | jinqihao2023 | 40 | 1883ms | 22504kb | C++14 | 5.2kb | 2024-04-25 10:49:56 | 2024-04-25 10:49:57 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int mod=998244353;
int n,k,m;
string s,t;
int power(int a,int b){int res=1;for(;b;b>>=1){if(b&1)res=1ll*res*a%mod;a=1ll*a*a%mod;}return res;}
namespace work1
{
const int N=125,M=(1<<21)+5;
int f[2][M];
void add(int &x,int y){x+=y;if(x>=mod)x-=mod;}
void solve()
{
memset(f,0,sizeof(f));
int now=0;
for(int i=1;i<=m;i++)now|=((s[i]-'0')<<m-i);
f[m&1][now]=1;
int all=(1<<k-1)-1;
for(int i=m;i<n;i++)
{
memset(f[i+1&1],0,sizeof(f[i+1&1]));
for(int j=0;j<(1<<k-1);j++)if(f[i&1][j])
{
for(int l=0;l<2;l++)
{
int now=(j<<1)|l;
if(i>=k-1 && __builtin_popcount(now)==k/2)continue;
add(f[i+1&1][now&all],f[i&1][j]);
}
}
}
int ans=0;
for(int i=0;i<(1<<k-1);i++)add(ans,f[n&1][i]);
printf("%d\n",ans);
}
}
int ct,ctt;
namespace work2
{
const int N=125;
int num,st[N],ed[N],stx,sty,ans;
int f[N][N][N],g[N][N][N],stt[N][N],edd[N][N],a[N][N];
void sp(int x,int y){for(int i=0;i<=num;i++)swap(a[x][i],a[y][i]);}
inline void add(int &x,int y){x+=y;if(x>=mod)x-=mod;}
inline int md(int x){if(x>=mod)return x-mod;return x;}
int gauss()
{
int ans=1;
for(int i=0;i<=num;i++)
{
if(!a[i][i])for(int j=i+1;j<=num;j++)if(a[j][i]){sp(i,j),ans=md(mod-ans);break;}
if(!a[i][i])return 0;ans=1ll*ans*a[i][i]%mod;
int temp=power(a[i][i],mod-2);
for(int j=i+1;j<=num;j++)
{
int now=1ll*a[j][i]*temp%mod;
for(int l=i;l<=num;l++)a[j][l]=(a[j][l]-1ll*a[i][l]*now%mod+mod)%mod;
}
}
return ans;
}
bool vis[N][N];
void dfs1(int step)
{
if(step==num+1)
{
int mx=0;
for(int i=0;i<=num;i++)mx=max(mx,ed[i]);
// if(ct%10000==0)cout<<ct<<endl;
for(int i=0;i<=num;i++)for(int j=0;j<=num;j++)a[i][j]=0;
int edx=0,edy=0;
edx=(n%k==0?k:n%k),edy=ed[num];
for(int i=1;i<=num;i++)st[i]=ed[i-1]-k/2;
for(int i=1;i<num;i++)if(st[i]>ed[i] || ed[i]-st[i]>k)return ;
if(sty>ed[0])return ;if(st[num]>edy)return ;
if(ed[0]-sty>k-stx)return ;if(edy-st[num]>edx)return ;
// printf("st:(%d,%d) ",stx,sty);
// for(int i=1;i<=num;i++)printf("(%d,%d) ",0,st[i]);printf("\n");
// printf("ed:");
// for(int i=0;i<num;i++)printf("(%d,%d) ",k,ed[i]);printf("(%d,%d) \n",edx,edy);
for(int j=0;j<=k;j++)for(int l=0;l<=mx;l++)edd[j][l]=0;
if(!vis[edx][edy])edd[edx][edy]=1;
for(int j=edx;j>=0;j--)for(int l=edy;l>=0;l--)if(edd[j][l])
{
if(j>0)add(edd[j-1][l],edd[j][l]);
if(j>0 && l>0)add(edd[j-1][l-1],edd[j][l]);
}
for(int i=1;i<=num;i++)for(int j=0;j<num;j++)if(st[i]<=ed[j])
{
int res=f[st[i]][k][ed[j]];
for(int l=0;l<edx;l++)res=(res-1ll*f[st[i]][l][edy]*g[ed[j]][l+1][edy+1]%mod+mod)%mod;
a[i][j]=res;
}else a[i][j]=0;
for(int j=0;j<num;j++)if(sty<=ed[j])
{
int res=stt[k][ed[j]];
for(int l=0;l<edx;l++)res=(res-1ll*stt[l][edy]*g[ed[j]][l+1][edy+1]%mod+mod)%mod;
a[0][j]=res;
}else a[0][j]=0;
for(int i=1;i<=num;i++)if(st[i]<=edy)
{
int res=edd[0][st[i]];
a[i][num]=res;
}
a[0][num]=edd[stx][sty];
// int now=ans;
ans=(ans+gauss())%mod;
// cout<<ans<<endl;
// ct++;
// if(ans!=now)ctt++;
return ;
}
if(!step)for(int i=k/2+1;i<=k;i++)ed[step]=i,dfs1(step+1),ed[step]=0;
else if(step<num)for(int i=ed[step-1]+1;i<=ed[step-1]+k/2;i++)ed[step]=i,dfs1(step+1),ed[step]=0;
else for(int i=ed[step-1]-k/2;i<=ed[step-1]+k/2;i++)ed[step]=i,dfs1(step+1),ed[step]=0;
}
void init()
{
for(int i=0;i<=k;i++)for(int j=0;j<=n;j++)vis[i][j]=0;
for(int i=0;i<=n;i++)for(int j=0;j<=k;j++)for(int l=0;l<=n;l++)f[i][j][l]=g[i][j][l]=0;
int ax=0,ay=0;
for(int i=1;i<=m;i++)
{
vis[ax][ay]=1;
if(s[i]=='1')ax++,ay++;
else ax++;
}
stx=ax,sty=ay;
for(int i=0;i<=n;i++)
{
if(vis[0][i])continue;
f[i][0][i]=1;
for(int j=0;j<=k;j++)for(int l=0;l<=n;l++)if(f[i][j][l])
{
if(j<k && !vis[j+1][l])f[i][j+1][l]=(f[i][j+1][l]+f[i][j][l])%mod;
if(j<k && l<n && !vis[j+1][l+1])f[i][j+1][l+1]=(f[i][j+1][l+1]+f[i][j][l])%mod;
}
}
for(int i=0;i<=n;i++)
{
if(vis[k][i])continue;
g[i][k][i]=1;
for(int j=k;j>=0;j--)for(int l=n;l>=0;l--)if(g[i][j][l])
{
if(j>0 && !vis[j-1][l])g[i][j-1][l]=(g[i][j-1][l]+g[i][j][l])%mod;
if(j>0 && l>0 && !vis[j-1][l-1])g[i][j-1][l-1]=(g[i][j-1][l-1]+g[i][j][l])%mod;
}
}
for(int i=0;i<=k;i++)for(int j=0;j<=n;j++)stt[i][j]=0;
if(!vis[stx][sty])stt[stx][sty]=1;
for(int j=0;j<=k;j++)for(int l=0;l<=n;l++)if(stt[j][l])
{
if(j<k)stt[j+1][l]=(stt[j+1][l]+stt[j][l])%mod;
if(j<k && l<n)stt[j+1][l+1]=(stt[j+1][l+1]+stt[j][l])%mod;
}
}
void solve()
{
num=(n-1)/k;
// cout<<num<<endl;
init();
dfs1(0);
for(int i=1;i<=m;i++)if(s[i]=='0')s[i]='1';else s[i]='0';
stx=sty=0;
for(int i=0;i<=num;i++)st[i]=ed[i]=0;
init();
dfs1(0);
printf("%d\n",ans);
}
}
int main()
{
// int time_st=clock();
// freopen("imbalance.in","r",stdin);
// freopen("imbalance.out","w",stdout);
scanf("%d %d %d",&n,&k,&m);
cin>>s,s=' '+s;
// work2::solve();
if(k<=22)work1::solve();
else work2::solve();
// cerr<<(clock()-time_st)/1e6<<endl;
// cerr<<ct<<endl;
// cerr<<ctt<<endl;
return 0;
}
详细
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 2ms
memory: 20996kb
input:
2 2 0
output:
2
result:
ok 1 number(s): "2"
Test #2:
score: 0
Accepted
time: 2ms
memory: 21472kb
input:
2 2 1 0
output:
1
result:
ok 1 number(s): "1"
Test #3:
score: 0
Accepted
time: 0ms
memory: 20708kb
input:
3 2 0
output:
2
result:
ok 1 number(s): "2"
Test #4:
score: 0
Accepted
time: 5ms
memory: 20352kb
input:
3 2 1 0
output:
1
result:
ok 1 number(s): "1"
Test #5:
score: 0
Accepted
time: 6ms
memory: 20356kb
input:
4 2 0
output:
2
result:
ok 1 number(s): "2"
Test #6:
score: 0
Accepted
time: 0ms
memory: 21132kb
input:
4 2 1 0
output:
1
result:
ok 1 number(s): "1"
Test #7:
score: 0
Accepted
time: 6ms
memory: 22120kb
input:
4 4 0
output:
10
result:
ok 1 number(s): "10"
Test #8:
score: 0
Accepted
time: 0ms
memory: 21840kb
input:
4 4 1 1
output:
5
result:
ok 1 number(s): "5"
Test #9:
score: 0
Accepted
time: 5ms
memory: 21380kb
input:
4 4 2 00
output:
3
result:
ok 1 number(s): "3"
Test #10:
score: 0
Accepted
time: 4ms
memory: 20700kb
input:
4 4 3 101
output:
1
result:
ok 1 number(s): "1"
Test #11:
score: 0
Accepted
time: 0ms
memory: 21524kb
input:
5 2 0
output:
2
result:
ok 1 number(s): "2"
Test #12:
score: 0
Accepted
time: 3ms
memory: 21536kb
input:
5 2 1 1
output:
1
result:
ok 1 number(s): "1"
Test #13:
score: 0
Accepted
time: 0ms
memory: 21508kb
input:
5 4 0
output:
14
result:
ok 1 number(s): "14"
Test #14:
score: 0
Accepted
time: 3ms
memory: 21900kb
input:
5 4 1 0
output:
7
result:
ok 1 number(s): "7"
Test #15:
score: 0
Accepted
time: 6ms
memory: 22048kb
input:
5 4 2 01
output:
3
result:
ok 1 number(s): "3"
Test #16:
score: 0
Accepted
time: 3ms
memory: 22228kb
input:
5 4 3 110
output:
1
result:
ok 1 number(s): "1"
Test #17:
score: 0
Accepted
time: 5ms
memory: 22192kb
input:
17 2 0
output:
2
result:
ok 1 number(s): "2"
Test #18:
score: 0
Accepted
time: 6ms
memory: 21312kb
input:
17 2 0
output:
2
result:
ok 1 number(s): "2"
Test #19:
score: 0
Accepted
time: 4ms
memory: 21204kb
input:
17 10 6 110111
output:
621
result:
ok 1 number(s): "621"
Test #20:
score: 0
Accepted
time: 4ms
memory: 20404kb
input:
17 10 2 11
output:
8413
result:
ok 1 number(s): "8413"
Test #21:
score: 0
Accepted
time: 4ms
memory: 21028kb
input:
18 2 1 1
output:
1
result:
ok 1 number(s): "1"
Test #22:
score: 0
Accepted
time: 10ms
memory: 21184kb
input:
18 2 1 1
output:
1
result:
ok 1 number(s): "1"
Test #23:
score: 0
Accepted
time: 4ms
memory: 22208kb
input:
18 8 5 00010
output:
918
result:
ok 1 number(s): "918"
Test #24:
score: 0
Accepted
time: 7ms
memory: 22436kb
input:
18 8 3 001
output:
3404
result:
ok 1 number(s): "3404"
Test #25:
score: 0
Accepted
time: 4ms
memory: 22060kb
input:
18 16 6 100011
output:
2458
result:
ok 1 number(s): "2458"
Test #26:
score: 0
Accepted
time: 3ms
memory: 20544kb
input:
18 16 8 00101101
output:
548
result:
ok 1 number(s): "548"
Test #27:
score: 0
Accepted
time: 10ms
memory: 21420kb
input:
19 2 1 1
output:
1
result:
ok 1 number(s): "1"
Test #28:
score: 0
Accepted
time: 5ms
memory: 20708kb
input:
19 2 0
output:
2
result:
ok 1 number(s): "2"
Test #29:
score: 0
Accepted
time: 6ms
memory: 21640kb
input:
19 6 2 00
output:
3413
result:
ok 1 number(s): "3413"
Test #30:
score: 0
Accepted
time: 7ms
memory: 22056kb
input:
19 6 1 1
output:
7012
result:
ok 1 number(s): "7012"
Test #31:
score: 0
Accepted
time: 7ms
memory: 21312kb
input:
19 12 10 1010110000
output:
266
result:
ok 1 number(s): "266"
Test #32:
score: 0
Accepted
time: 10ms
memory: 21696kb
input:
19 12 3 111
output:
19234
result:
ok 1 number(s): "19234"
Test #33:
score: 0
Accepted
time: 7ms
memory: 20888kb
input:
19 16 2 10
output:
77876
result:
ok 1 number(s): "77876"
Test #34:
score: 0
Accepted
time: 7ms
memory: 20348kb
input:
19 16 0
output:
301208
result:
ok 1 number(s): "301208"
Test #35:
score: 0
Accepted
time: 7ms
memory: 20520kb
input:
20 2 1 0
output:
1
result:
ok 1 number(s): "1"
Test #36:
score: 0
Accepted
time: 5ms
memory: 20500kb
input:
20 2 0
output:
2
result:
ok 1 number(s): "2"
Test #37:
score: 0
Accepted
time: 4ms
memory: 21980kb
input:
20 10 9 110111000
output:
76
result:
ok 1 number(s): "76"
Test #38:
score: 0
Accepted
time: 4ms
memory: 20780kb
input:
20 10 9 110101110
output:
372
result:
ok 1 number(s): "372"
Test #39:
score: 0
Accepted
time: 4ms
memory: 21852kb
input:
20 14 11 10110110000
output:
207
result:
ok 1 number(s): "207"
Test #40:
score: 0
Accepted
time: 6ms
memory: 22060kb
input:
20 14 7 0011011
output:
3675
result:
ok 1 number(s): "3675"
Test #41:
score: 0
Accepted
time: 8ms
memory: 20612kb
input:
20 20 14 10111010000000
output:
58
result:
ok 1 number(s): "58"
Subtask #2:
score: 10
Accepted
Dependency #1:
100%
Accepted
Test #42:
score: 10
Accepted
time: 32ms
memory: 21568kb
input:
114 12 11 11010000010
output:
394940507
result:
ok 1 number(s): "394940507"
Test #43:
score: 0
Accepted
time: 35ms
memory: 20664kb
input:
114 12 2 01
output:
60509873
result:
ok 1 number(s): "60509873"
Test #44:
score: 0
Accepted
time: 35ms
memory: 22012kb
input:
114 14 10 1001111011
output:
154687039
result:
ok 1 number(s): "154687039"
Test #45:
score: 0
Accepted
time: 42ms
memory: 20968kb
input:
114 14 5 00100
output:
941826071
result:
ok 1 number(s): "941826071"
Test #46:
score: 0
Accepted
time: 50ms
memory: 21884kb
input:
114 16 10 1011101001
output:
391666362
result:
ok 1 number(s): "391666362"
Test #47:
score: 0
Accepted
time: 42ms
memory: 21736kb
input:
114 16 15 000010011111010
output:
599226561
result:
ok 1 number(s): "599226561"
Test #48:
score: 0
Accepted
time: 131ms
memory: 21748kb
input:
114 18 1 0
output:
167675624
result:
ok 1 number(s): "167675624"
Test #49:
score: 0
Accepted
time: 116ms
memory: 21872kb
input:
114 18 8 11000001
output:
165986235
result:
ok 1 number(s): "165986235"
Test #50:
score: 0
Accepted
time: 315ms
memory: 21528kb
input:
114 20 17 11101000010011010
output:
852476378
result:
ok 1 number(s): "852476378"
Test #51:
score: 0
Accepted
time: 336ms
memory: 20820kb
input:
114 20 13 1101011010000
output:
974712368
result:
ok 1 number(s): "974712368"
Test #52:
score: 0
Accepted
time: 34ms
memory: 22016kb
input:
113 12 8 10101100
output:
754580060
result:
ok 1 number(s): "754580060"
Test #53:
score: 0
Accepted
time: 34ms
memory: 22188kb
input:
113 12 10 1110010010
output:
928476173
result:
ok 1 number(s): "928476173"
Test #54:
score: 0
Accepted
time: 37ms
memory: 21148kb
input:
113 14 9 010111000
output:
930953494
result:
ok 1 number(s): "930953494"
Test #55:
score: 0
Accepted
time: 47ms
memory: 20456kb
input:
113 14 0
output:
613264431
result:
ok 1 number(s): "613264431"
Test #56:
score: 0
Accepted
time: 74ms
memory: 21748kb
input:
113 16 4 0011
output:
966491874
result:
ok 1 number(s): "966491874"
Test #57:
score: 0
Accepted
time: 66ms
memory: 21232kb
input:
113 16 10 1110110011
output:
71975445
result:
ok 1 number(s): "71975445"
Test #58:
score: 0
Accepted
time: 130ms
memory: 21380kb
input:
113 18 2 01
output:
35416931
result:
ok 1 number(s): "35416931"
Test #59:
score: 0
Accepted
time: 127ms
memory: 21292kb
input:
113 18 11 01101011111
output:
605684813
result:
ok 1 number(s): "605684813"
Test #60:
score: 0
Accepted
time: 385ms
memory: 21628kb
input:
113 20 1 1
output:
970488755
result:
ok 1 number(s): "970488755"
Test #61:
score: 0
Accepted
time: 310ms
memory: 20540kb
input:
113 20 17 10000001101111001
output:
308768022
result:
ok 1 number(s): "308768022"
Test #62:
score: 0
Accepted
time: 32ms
memory: 21596kb
input:
112 12 10 1011100000
output:
379472486
result:
ok 1 number(s): "379472486"
Test #63:
score: 0
Accepted
time: 41ms
memory: 22504kb
input:
112 12 3 111
output:
876338776
result:
ok 1 number(s): "876338776"
Test #64:
score: 0
Accepted
time: 39ms
memory: 21292kb
input:
112 14 6 100111
output:
850899867
result:
ok 1 number(s): "850899867"
Test #65:
score: 0
Accepted
time: 30ms
memory: 21960kb
input:
112 14 11 11011001011
output:
579315503
result:
ok 1 number(s): "579315503"
Test #66:
score: 0
Accepted
time: 46ms
memory: 21532kb
input:
112 16 11 00000111111
output:
827780781
result:
ok 1 number(s): "827780781"
Test #67:
score: 0
Accepted
time: 54ms
memory: 21660kb
input:
112 16 9 101001101
output:
247916257
result:
ok 1 number(s): "247916257"
Test #68:
score: 0
Accepted
time: 74ms
memory: 20356kb
input:
112 18 16 0011000001111001
output:
740632908
result:
ok 1 number(s): "740632908"
Test #69:
score: 0
Accepted
time: 134ms
memory: 21128kb
input:
112 18 4 0010
output:
594108528
result:
ok 1 number(s): "594108528"
Test #70:
score: 0
Accepted
time: 355ms
memory: 21308kb
input:
112 20 7 1010100
output:
818166882
result:
ok 1 number(s): "818166882"
Test #71:
score: 0
Accepted
time: 196ms
memory: 21668kb
input:
112 20 16 0001100100101000
output:
222914924
result:
ok 1 number(s): "222914924"
Test #72:
score: 0
Accepted
time: 35ms
memory: 21288kb
input:
111 12 2 11
output:
895626591
result:
ok 1 number(s): "895626591"
Test #73:
score: 0
Accepted
time: 35ms
memory: 20260kb
input:
111 12 1 1
output:
543447881
result:
ok 1 number(s): "543447881"
Test #74:
score: 0
Accepted
time: 39ms
memory: 21884kb
input:
111 14 3 111
output:
555958815
result:
ok 1 number(s): "555958815"
Test #75:
score: 0
Accepted
time: 32ms
memory: 21776kb
input:
111 14 13 1110001101010
output:
47749667
result:
ok 1 number(s): "47749667"
Test #76:
score: 0
Accepted
time: 56ms
memory: 22460kb
input:
111 16 5 01000
output:
880732287
result:
ok 1 number(s): "880732287"
Test #77:
score: 0
Accepted
time: 57ms
memory: 21812kb
input:
111 16 7 0110010
output:
153134396
result:
ok 1 number(s): "153134396"
Test #78:
score: 0
Accepted
time: 64ms
memory: 21068kb
input:
111 18 17 11011101001111100
output:
718197735
result:
ok 1 number(s): "718197735"
Test #79:
score: 0
Accepted
time: 124ms
memory: 22192kb
input:
111 18 9 011110101
output:
78875109
result:
ok 1 number(s): "78875109"
Test #80:
score: 0
Accepted
time: 362ms
memory: 20376kb
input:
111 20 6 100101
output:
484008568
result:
ok 1 number(s): "484008568"
Test #81:
score: 0
Accepted
time: 180ms
memory: 20860kb
input:
111 20 19 1100110110001010110
output:
612558978
result:
ok 1 number(s): "612558978"
Test #82:
score: 0
Accepted
time: 296ms
memory: 21288kb
input:
102 20 10 0101000100
output:
678899105
result:
ok 1 number(s): "678899105"
Test #83:
score: 0
Accepted
time: 45ms
memory: 21244kb
input:
97 16 13 0101110011010
output:
456291266
result:
ok 1 number(s): "456291266"
Subtask #3:
score: 0
Wrong Answer
Dependency #1:
100%
Accepted
Test #84:
score: 30
Accepted
time: 177ms
memory: 21444kb
input:
66 20 5 11001
output:
286180948
result:
ok 1 number(s): "286180948"
Test #85:
score: 0
Accepted
time: 77ms
memory: 21776kb
input:
66 20 19 0101001111011100100
output:
334317215
result:
ok 1 number(s): "334317215"
Test #86:
score: 0
Accepted
time: 232ms
memory: 22136kb
input:
66 22 19 1001101100000100001
output:
465510840
result:
ok 1 number(s): "465510840"
Test #87:
score: 0
Accepted
time: 497ms
memory: 21644kb
input:
66 22 11 10001111000
output:
731812403
result:
ok 1 number(s): "731812403"
Test #88:
score: -30
Wrong Answer
time: 4ms
memory: 16284kb
input:
66 24 6 011111
output:
566472734
result:
wrong answer 1st numbers differ - expected: '270615978', found: '566472734'
Subtask #4:
score: 20
Accepted
Test #137:
score: 20
Accepted
time: 397ms
memory: 20508kb
input:
114 20 0
output:
849724285
result:
ok 1 number(s): "849724285"
Test #138:
score: 0
Accepted
time: 1389ms
memory: 21052kb
input:
114 22 0
output:
918046462
result:
ok 1 number(s): "918046462"
Test #139:
score: 0
Accepted
time: 1883ms
memory: 20308kb
input:
114 24 0
output:
471169566
result:
ok 1 number(s): "471169566"
Test #140:
score: 0
Accepted
time: 1060ms
memory: 18564kb
input:
114 26 0
output:
540055361
result:
ok 1 number(s): "540055361"
Test #141:
score: 0
Accepted
time: 291ms
memory: 18600kb
input:
114 28 0
output:
997530597
result:
ok 1 number(s): "997530597"
Test #142:
score: 0
Accepted
time: 415ms
memory: 18668kb
input:
114 30 0
output:
37439521
result:
ok 1 number(s): "37439521"
Test #143:
score: 0
Accepted
time: 304ms
memory: 20532kb
input:
114 32 0
output:
448438493
result:
ok 1 number(s): "448438493"
Test #144:
score: 0
Accepted
time: 394ms
memory: 20524kb
input:
113 20 0
output:
942733157
result:
ok 1 number(s): "942733157"
Test #145:
score: 0
Accepted
time: 1370ms
memory: 21048kb
input:
113 22 0
output:
547536565
result:
ok 1 number(s): "547536565"
Test #146:
score: 0
Accepted
time: 1712ms
memory: 20716kb
input:
113 24 0
output:
219952878
result:
ok 1 number(s): "219952878"
Test #147:
score: 0
Accepted
time: 917ms
memory: 18444kb
input:
113 26 0
output:
763274765
result:
ok 1 number(s): "763274765"
Test #148:
score: 0
Accepted
time: 201ms
memory: 20372kb
input:
113 28 0
output:
910952876
result:
ok 1 number(s): "910952876"
Test #149:
score: 0
Accepted
time: 386ms
memory: 18696kb
input:
113 30 0
output:
968408969
result:
ok 1 number(s): "968408969"
Test #150:
score: 0
Accepted
time: 276ms
memory: 18544kb
input:
113 32 0
output:
118567934
result:
ok 1 number(s): "118567934"
Test #151:
score: 0
Accepted
time: 386ms
memory: 21756kb
input:
112 20 0
output:
275087743
result:
ok 1 number(s): "275087743"
Test #152:
score: 0
Accepted
time: 1355ms
memory: 22072kb
input:
112 22 0
output:
185644824
result:
ok 1 number(s): "185644824"
Test #153:
score: 0
Accepted
time: 1536ms
memory: 18488kb
input:
112 24 0
output:
557785519
result:
ok 1 number(s): "557785519"
Test #154:
score: 0
Accepted
time: 796ms
memory: 20260kb
input:
112 26 0
output:
522996775
result:
ok 1 number(s): "522996775"
Test #155:
score: 0
Accepted
time: 449ms
memory: 18904kb
input:
112 28 0
output:
134122652
result:
ok 1 number(s): "134122652"
Test #156:
score: 0
Accepted
time: 351ms
memory: 20528kb
input:
112 30 0
output:
502459554
result:
ok 1 number(s): "502459554"
Test #157:
score: 0
Accepted
time: 250ms
memory: 18652kb
input:
112 32 0
output:
169309797
result:
ok 1 number(s): "169309797"
Test #158:
score: 0
Accepted
time: 388ms
memory: 22136kb
input:
111 20 0
output:
360310827
result:
ok 1 number(s): "360310827"
Test #159:
score: 0
Accepted
time: 1333ms
memory: 21756kb
input:
111 22 0
output:
516490684
result:
ok 1 number(s): "516490684"
Test #160:
score: 0
Accepted
time: 1379ms
memory: 18560kb
input:
111 24 0
output:
501679698
result:
ok 1 number(s): "501679698"
Test #161:
score: 0
Accepted
time: 665ms
memory: 20312kb
input:
111 26 0
output:
43788136
result:
ok 1 number(s): "43788136"
Test #162:
score: 0
Accepted
time: 409ms
memory: 20664kb
input:
111 28 0
output:
5764962
result:
ok 1 number(s): "5764962"
Test #163:
score: 0
Accepted
time: 316ms
memory: 20536kb
input:
111 30 0
output:
918617250
result:
ok 1 number(s): "918617250"
Test #164:
score: 0
Accepted
time: 223ms
memory: 18888kb
input:
111 32 0
output:
982496307
result:
ok 1 number(s): "982496307"
Test #165:
score: 0
Accepted
time: 15ms
memory: 20916kb
input:
114 114 0
output:
321821768
result:
ok 1 number(s): "321821768"
Test #166:
score: 0
Accepted
time: 29ms
memory: 20584kb
input:
114 50 0
output:
860957763
result:
ok 1 number(s): "860957763"
Test #167:
score: 0
Accepted
time: 30ms
memory: 19040kb
input:
113 50 0
output:
307614098
result:
ok 1 number(s): "307614098"
Test #168:
score: 0
Accepted
time: 30ms
memory: 20876kb
input:
110 10 0
output:
615608372
result:
ok 1 number(s): "615608372"
Test #169:
score: 0
Accepted
time: 11ms
memory: 20540kb
input:
100 50 0
output:
475715516
result:
ok 1 number(s): "475715516"
Test #170:
score: 0
Accepted
time: 12ms
memory: 19160kb
input:
111 78 0
output:
617855013
result:
ok 1 number(s): "617855013"
Test #171:
score: 0
Accepted
time: 215ms
memory: 18732kb
input:
100 26 0
output:
960228335
result:
ok 1 number(s): "960228335"
Test #172:
score: 0
Accepted
time: 143ms
memory: 18920kb
input:
99 28 0
output:
17612739
result:
ok 1 number(s): "17612739"
Test #173:
score: 0
Accepted
time: 302ms
memory: 18696kb
input:
107 28 0
output:
462764365
result:
ok 1 number(s): "462764365"
Subtask #5:
score: 0
Skipped
Dependency #2:
100%
Accepted
Dependency #3:
0%