mirror of
https://github.com/Hizenberg469/Algorithms-snippets.git
synced 2026-04-20 07:02:23 +03:00
9 lines
166 B
C++
9 lines
166 B
C++
int invFac[MAX_N];
|
|
void inverse_factorial(){
|
|
|
|
invFac[0] = invFac[1] = 1;
|
|
|
|
for(int i = 2 ; i <= MAX_N ; i++ ){
|
|
invFac[i] = (inverse(i)*invFac[i-1])%M;
|
|
}
|
|
} |