#pragma GCC optimize("Ofast") #pragma GCC target("avx2") #define rd_init() char*rp=({char*mmap();mmap(0l,1l<<25,1,2,0,0ll);}) #define rd_skip() while(*rp++>=48) #define rd() ({int _v=0,_c;while(_c=*rp++-48,_c>=0)_v=_v*10+_c;_v;}) #define rep(v,e) for(typeof(e) v=0;v=0) t=b; while(b=ufbuf[a],b>=0) ufbuf[a]=t,a=b; return t; } void uf_unite(int a,int b){ a=uf_root(a); b=uf_root(b); if(a!=b){ if(ufbuf[a]