This commit is contained in:
Zengtudor 2024-10-09 01:01:03 +08:00
parent 489dd58f85
commit 48ad276a56

View File

@ -16,7 +16,7 @@ static void init(){
c[i][j] = (c[i-1][j-1] + c[i-1][j])%k;
}
}
for(ull i = 2;i<max_n;i++){ //t被修改
for(ull i = 2;i<max_n-1;i++){ //注意这里是max_n-1
for(ull j{1};j<=i;j++){
prefix[i][j] = prefix[i-1][j]+prefix[i][j-1]-prefix[i-1][j-1] + (c[i][j]==0?1:0);
}