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