题目
思路:
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
const int maxn = 1e6 + 5, inf = 1e9 + 5, maxm = 4e4 + 5, mod = 1e9 + 7, N = 1e6;
// int a[maxn], b[maxn];
int n, m;
string s;
int qpow(int a, int b){
int res = 1;
while(b){
if(b & 1) res = res * a % mod;
a = a * a % mod;
b >>= 1;
}
return res;
}
int __lcm(int a, int b){
int g = __gcd(a, b);
return a * b / g;
}
void solve()
{
int res = 0;
int a, b