#pragma once #include #include namespace internal{ struct PowModStruct{ long a,b,mod; friend std::ostream& operator << (std::ostream& os, const internal::PowModStruct& rhs) { os << rhs.a << "^" << rhs.b << "%" << rhs.mod; return os; }; bool operator<(const internal::PowModStruct&rhs)const{return amapping; public: //a^b % mod static long PowMod(int a,int b,int mod); };