摘要:
A tree is an undirected connected graph in which there are no cycles. This problem is about non-rooted trees. A leaf of a tree is a vertex that is con 阅读全文
摘要:
看到数据量1e2,直接暴力即可。每一轮暴力检查两棵树上度为0的点,寻找最优答案输出,同时更新deg数组。 #include <bits/stdc++.h> #define N 405 #define M 10005 using namespace std; int n, head[N], ver[2 阅读全文