#include #include using namespace std; #include #define gc getchar_unlocked #define fo(i,n) for(i=0;in;k>t; while(t--) { iluzn(); } return 0; } int mpow(int base, int exp) { base %= mod; int result = 1; while (exp > 0) { if (exp & 1) result = ((ll)result * base) % mod; base = ((ll)base * base) % mod; exp >>= 1; } return result; } bool isprime(ll n){ if(n<=1) return false; if(n==2) return true; if(n%2==0) return false; ll rt = sqrt(n); for(ll i=3;i>u>>v; g[u].pb(v); // g[v].pb(u); } } void DFS(int n) { ++nodes; vis[n] = 1; for(vector::iterator i = g[n].begin(); i != g[n].end() ; i++) { if(!vis[*i]) DFS(*i); } } void rstgraph(int n){ int i; fo(i,n+1){ g[i].clear(); vis[i]=0; } nodes=0; }