From 6be8c7d8461f245c6b595691354055864627089f Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Sun, 15 Oct 2023 09:43:20 +0800 Subject: [PATCH] modint: fix compile warnings --- Math/modint.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Math/modint.h b/Math/modint.h index 20b2034..fbcf2cb 100644 --- a/Math/modint.h +++ b/Math/modint.h @@ -45,13 +45,13 @@ template 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 {