HDU1561 The more, The Better Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 8490 Accepted Submission(s): 4964 Problem Description ACboy很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中ACboy允许攻克M个城…
#include<cstdio> #include<cstring> #include<iostream> #define INF 999999999 using namespace std; ; struct node { int to; int v; int next; }edge[MAXN*]; int pre[MAXN],n,index,vis[MAXN],m,num[MAXN]; int dp[MAXN][MAXN]; int max(int x,int y)…