Lang:G++
Edit12345678910111213141516171819202122232425262728293031//#include <stdio.h>#include <cstdlib>#include <string>#include <algorithm>#include <iostream>#include <cmath>using namespace std;const int Times = 10;typedef long long LL;LL multi(LL a, LL b, LL m){LL ans = 0;a %= m;while (b){if (b & 1){ans = (ans + a) % m;b--;}b >>= 1;a = (a + a) % m;}return ans;}LL quick_mod(LL a, LL b, LL m){LL ans = 1;