Skip to content

Commit

Permalink
Update Modint&Combination.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Pentagon03 authored Aug 6, 2024
1 parent b5da3e6 commit bcfd4b4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Math/Modint&Combination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ struct modint {
res.x = norm(P - x);
return res;
}
constexpr modint pow(ll b){
return power(*this, b);
}
constexpr modint inv() const {
assert(x != 0);
return power(*this, P - 2);
return power(*this, P-2);
}
constexpr modint &operator*=(modint rhs) {
x = 1LL * x * rhs.x % P;
Expand Down Expand Up @@ -145,6 +148,5 @@ struct comb {
return bm[m][k];
}
};

constexpr MOD = ;
using Z = modint<MOD>;
constexpr int MOD = $0;
using Z = modint<MOD>;

0 comments on commit bcfd4b4

Please sign in to comment.