#include<bits/stdc++.h> using namespace std; int find(vector<int>&father, int x) { if (father[x] == x)return x; else return find(father, father[x]); } void merg(vector<int>& father, vector<int>& rank, int x, int y) { int X = find(father, x); int Y = find(father, y...