对于$10\%$的数据:$1 ≤ n, m ≤ 10$; 对于$50\%$的数据:$1 ≤ n, m ≤ 100$; 对于$80\%$的数据:$1 ≤ n, m ≤ 1000$; 对于$90\%$的数据:$1 ≤ n, m ≤ 10^4$; 对于$100\%$的数据:$1 ≤ n, m ≤ 10^5$。
#define I inline #define ll long long #define pb push_back #define MP make_pair #define ull unsigned long long #define PII pair<int , int> #define PSL pair<string , long long> #define PLL pair<long long , long long> #define all(x) (x).begin() , (x).end() #define clean(a , b) memset(a , b , sizeof(a)) #define rep(i , l , r) for (int i = (l); i <= (r); i ++) #define per(i , r , l) for (int i = (r); i >= (l); i --) #define PE(i , x) for(int i = head[x]; i; i = edge[i].last) #define DEBUG(x) std::cerr << #x << '=' << x << std::endl
usingnamespacestd;
constint N = 10001; constint M = 100001; constint HA = 998244353;
ll ans = 0;
ll gcd(ll a , ll b){ return !b ? a : gcd(b , a % b); }
#define I inline #define ll long long #define pb push_back #define MP make_pair #define ull unsigned long long #define PII pair<int , int> #define PSL pair<string , long long> #define PLL pair<long long , long long> #define all(x) (x).begin() , (x).end() #define clean(a , b) memset(a , b , sizeof(a)) #define rep(i , l , r) for (int i = (l); i <= (r); i ++) #define per(i , r , l) for (int i = (r); i >= (l); i --) #define PE(i , x) for(int i = head[x]; i; i = edge[i].last) #define DEBUG(x) std::cerr << #x << '=' << x << std::endl
usingnamespacestd;
constint N = 10001; constint M = 100001; constint HA = 998244353;