From 4a682bd607d0319032e5bba9be1731a3f18b67fc Mon Sep 17 00:00:00 2001 From: subcrip Date: Wed, 10 Apr 2024 12:25:35 +0800 Subject: [PATCH] Update number/mll.cc --- number/mll.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) 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