ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#207389 | #3739. 球盒问题 | Allen123456hello | 100 | 202ms | 155124kb | C++11 | 370b | 2024-07-28 18:44:33 | 2024-07-28 20:22:07 |
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const LL mod=998244353;
LL dp[5005][5005];
int n,m;
int main(){
dp[0][0]=1;
scanf("%d%d",&n,&m);
for (int i=1;i<=n;++i){
for (int j=1;j<=m;++j){
(dp[i][j]=dp[i-1][j-1]+(j*dp[i-1][j])%mod)%=mod;
}
}
printf("%lld",dp[n][m]);
return 0;
}
详细
小提示:点击横条可展开更详细的信息
Test #1:
score: 10
Accepted
time: 0ms
memory: 1208kb
input:
5 3
output:
25
result:
ok 1 number(s): "25"
Test #2:
score: 10
Accepted
time: 0ms
memory: 1224kb
input:
8 6
output:
266
result:
ok 1 number(s): "266"
Test #3:
score: 10
Accepted
time: 0ms
memory: 3480kb
input:
92 83
output:
396151882
result:
ok 1 number(s): "396151882"
Test #4:
score: 10
Accepted
time: 0ms
memory: 3476kb
input:
74 70
output:
231315552
result:
ok 1 number(s): "231315552"
Test #5:
score: 10
Accepted
time: 0ms
memory: 5804kb
input:
465 284
output:
189220244
result:
ok 1 number(s): "189220244"
Test #6:
score: 10
Accepted
time: 0ms
memory: 6080kb
input:
474 350
output:
503314172
result:
ok 1 number(s): "503314172"
Test #7:
score: 10
Accepted
time: 0ms
memory: 5676kb
input:
438 298
output:
691903761
result:
ok 1 number(s): "691903761"
Test #8:
score: 10
Accepted
time: 80ms
memory: 120020kb
input:
3947 3327
output:
92333806
result:
ok 1 number(s): "92333806"
Test #9:
score: 10
Accepted
time: 41ms
memory: 76152kb
input:
2966 2692
output:
291036270
result:
ok 1 number(s): "291036270"
Test #10:
score: 10
Accepted
time: 81ms
memory: 155124kb
input:
4313 4052
output:
74515633
result:
ok 1 number(s): "74515633"