We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8ca7f2 commit 95a6273Copy full SHA for 95a6273
atcoder/modint.hpp
@@ -91,6 +91,7 @@ struct static_modint : internal::static_modint_base {
91
92
mint operator+() const { return *this; }
93
mint operator-() const { return mint() - *this; }
94
+ operator bool() const { return _v == 0; }
95
96
mint pow(long long n) const {
97
assert(0 <= n);
@@ -206,6 +207,7 @@ template <int id> struct dynamic_modint : internal::modint_base {
206
207
208
209
210
211
212
213
0 commit comments