#include using namespace std;int parent[10001];vector>> edges;// findint find(int x) { if (x == parent[x]) return x; else return parent[x] = find(parent[x]);}// unionvoid merge(int a, int b) { int x = find(a); int y = find(b); if (x == y) return; parent[y] = x; // y -> x}int main(void) { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int v, e; long long resul..