diff --git a/number/mll.cc b/number/mll.cc index 104d7db..9b307e7 100644 --- a/number/mll.cc +++ b/number/mll.cc @@ -14,3 +14,13 @@ template struct MLL { void operator/=(const MLL& rhs) { val = (*this / rhs).val; } void operator%=(const MLL& rhs) { val = (*this % rhs).val; } }; + +template +ostream& operator<<(ostream& out, const MLL& num) { + return out << num.val; +} + +template +istream& operator>>(istream& in, MLL& num) { + return in >> num.val; +} \ No newline at end of file