#include #include #include #include #include using namespace std; const int MAX=210; int n,cnt,ret; int p[MAX],ran[MAX]; bool ext[MAX]; struct Edge { int from; int to; int weight; bool operator<(const Edge& edge) const { if(ext[from]==false||ext[to]==false) return false; if(ext[edge.from]==false||ext[edge.to]==false) return true; return weight