摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4284#include#include#include#includeusing namespace std;const int maxn = 105;const int maxm = 16;const int INF = 0x3f3f3f3f;int dp[maxm][1>T; while(T--){ cin>>N>>M>>Money; for(int i=0;i w) dist[u][v] = dist[v][u] = w; //... 阅读全文
posted @ 2013-09-02 23:22 等待最好的两个人 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4283#include#include#include#includeusing namespace std;const int maxn = 105;const int INF = 0x3f3f3f3f;int dp[maxn][maxn];//dp[i][j]表示只考虑编号为i到编号为j的人上场的最小不开心值;//枚举i第K(1=>T; for(int cas=1;cas>N; sum[0] = 0; for(int i=1;i=1;i--) ... 阅读全文
posted @ 2013-09-02 23:20 等待最好的两个人 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=2288#include#include#include#includeusing namespace std;const int maxn = 13;typedef long long int ll_int;ll_int dp[maxn][maxn][1>T; while(T--){ int n,m; cin>>n>>m; memset(G,0,sizeof(G)); memset(dp,0,sizeof(dp)); memset(way,0,sizeof... 阅读全文
posted @ 2013-09-02 23:19 等待最好的两个人 阅读(230) 评论(0) 推荐(0) 编辑