Skip to content

Commit

Permalink
modint: fix compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ngthanhtrung23 committed Oct 15, 2023
1 parent 1065c3d commit 6be8c7d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Math/modint.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ template<int MD> struct ModInt {
constexpr bool operator == (const ModInt& a) const { return x == a.x; }
constexpr bool operator != (const ModInt& a) const { return x != a.x; }

friend std::istream& operator >> (std::istream& is, ModInt& x) {
friend std::istream& operator >> (std::istream& is, ModInt& other) {
ll val; is >> val;
x = ModInt(val);
other = ModInt(val);
return is;
}
constexpr friend std::ostream& operator << (std::ostream& os, const ModInt& x) {
return os << x.x;
constexpr friend std::ostream& operator << (std::ostream& os, const ModInt& other) {
return os << other.x;
}

constexpr ModInt pow(ll k) const {
Expand Down

0 comments on commit 6be8c7d

Please sign in to comment.