摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1520类型:树dp简单题AC Code 1 #include <cstdio> 2 #include <cstring> 3 #include <algorithm> 4 using namespace std; 5 #define maxn 6005 6 struct node{ 7 int y,next; 8 }ee[maxn<<1]; 9 int link[maxn],t;10 int f[maxn],g[maxn],val[maxn];11 void m 阅读全文