|Hdu 1561|动态规划|The more, The Better

http://acm.hdu.edu.cn/showproblem.php?pid=1561

此题与选课一题一样,讲解看

http://blog.csdn.net/Darost/article/details/52555114

#include
#include
#include
#include
#define ms(i,j) memset(i, j, sizeof(i));
using namespace std;
int n,m;
int c[205];
vector G[205];
int f[205][205];
int t;
void dfs(int u)
{
	for (int i=1;i<=m;i++)
	f[u][i] = c[u];
	for (int i=0;i=2;j--)
		for (int k=1;k


你可能感兴趣的:(动态规划,-,树形,Poj/Hdu)