diff --git a/template.cc b/template.cc index a85a615..0cbf1af 100644 --- a/template.cc +++ b/template.cc @@ -376,11 +376,11 @@ template struct MLL { friend MLL operator%(const MLL& lhs, const MLL& rhs) { return mod(lhs.val - (lhs / rhs).val, mdl); } friend bool operator==(const MLL& lhs, const MLL& rhs) { return lhs.val == rhs.val; } friend bool operator!=(const MLL& lhs, const MLL& rhs) { return lhs.val != rhs.val; } - void operator+=(const MLL& rhs) { return *this = *this + rhs; } - void operator-=(const MLL& rhs) { return *this = *this - rhs; } - void operator*=(const MLL& rhs) { return *this = *this * rhs; } - void operator/=(const MLL& rhs) { return *this = *this / rhs; } - void operator%=(const MLL& rhs) { return *this = *this % rhs; } + MLL& operator+=(const MLL& rhs) { return *this = *this + rhs; } + MLL& operator-=(const MLL& rhs) { return *this = *this - rhs; } + MLL& operator*=(const MLL& rhs) { return *this = *this * rhs; } + MLL& operator/=(const MLL& rhs) { return *this = *this / rhs; } + MLL& operator%=(const MLL& rhs) { return *this = *this % rhs; } }; template