#include<bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0); #define rep(i,a,n) for(int i=a;i<=n;i++) #define per(i,a,n) for(int i=n;i>=a;i--) #define pb push_back int exgcd(int a,int b,int &x,int &y){ if(b==0){ x=1,y=0; return a; } ...