diff --git a/number/mll.cc b/number/mll.cc index 4ebe5e8..39c5b9c 100644 --- a/number/mll.cc +++ b/number/mll.cc @@ -12,3 +12,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; +}