把树转化为二叉树,然后再左右DP: #include<stdio.h> #include<string.h> #include<iostream> #include<algorithm> using namespace std; struct list { int l; int r; }node[2001]; int val[2001]; int vis[2001][101]; int m,n; int dp(int x,int m) { if(m==0)r…
Network Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 4478 Accepted: 1292 Description Yixght is a manager of the company called SzqNetwork(SN). Now she's very worried because she has just received a bad news which denotes that DxtNet…