mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-02-12 06:56:59 +08:00
Update ncr_modulo_p.cpp
This commit is contained in:
@@ -28,8 +28,8 @@ namespace ncr_modulo_p {
|
|||||||
*/
|
*/
|
||||||
class NCRModuloP {
|
class NCRModuloP {
|
||||||
private:
|
private:
|
||||||
std::vector<uint64_t> fac{};
|
std::vector<uint64_t> fac{}; // stores precomputed factorial(i) % p value
|
||||||
uint64_t p = 0;
|
uint64_t p = 0; // the p from (nCr % p)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** Constructor which precomputes the values of n! % mod from n=0 to size
|
/** Constructor which precomputes the values of n! % mod from n=0 to size
|
||||||
|
|||||||
Reference in New Issue
Block a user