// 嘘解法02 #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; ull pow_mod(ull a, ull b, ull mod = ((1LL<<62)-1)*2+1) {ull ans=1, now=a; while(b>0){if(b%2) ans=(ans*now)%mod; now=(now*now)%mod; b/=2;} return ans;} int main() { ll N, M; cin >> N >> M; vector is_appeared(N); for(ll i=0; i