//union-find #define LIMIT 100000 int uniroot[LIMIT+10],unicnt[LIMIT+10]; void ufinit(int n){for(int i=0;i