static
This commit is contained in:
parent
0c7b22b1ea
commit
a814952e69
@ -4,8 +4,7 @@
|
||||
using ull = unsigned long long;
|
||||
|
||||
static constexpr size_t max_n {(size_t)2e3+5};
|
||||
|
||||
ull k, c[max_n][max_n], prefix[max_n][max_n], t, n, m;
|
||||
static ull k, c[max_n][max_n], prefix[max_n][max_n], t, n, m;
|
||||
|
||||
static void init(){
|
||||
c[0][0] = c[1][0] = c[1][1] = 1;
|
||||
@ -15,7 +14,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;i++){ //t被修改
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user