library

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub firiexp/library

:warning: math/comb_table.cpp

Code

vector<vector<mint>> comb_table(int n, int m){
    vector<vector<mint>> res(n+1, vector<mint>(m+1, 0));
    for (int i = 0; i <= n; ++i){
        res[i][0] = 1;
        for(int j = 1; j <= i; j ++){
			res[i][j] = res[i-1][j-1] + res[i-1][j];
        }
    }
    return res;
}
#line 1 "math/comb_table.cpp"
vector<vector<mint>> comb_table(int n, int m){
    vector<vector<mint>> res(n+1, vector<mint>(m+1, 0));
    for (int i = 0; i <= n; ++i){
        res[i][0] = 1;
        for(int j = 1; j <= i; j ++){
			res[i][j] = res[i-1][j-1] + res[i-1][j];
        }
    }
    return res;
}
Back to top page