#include <algorithm> #include <iostream> #include <vector> using namespace std; struct Road{ int from; int to; int distance; }; vector<Road>road; int father[26]; int height[26]; void initial(int n){ for(int i=1;i<=n;i++){ father[i]=i; height[i]=0; } return ; } bool compare...