摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4499//主要剪枝:避免与以前枚举的发生冲突。要回溯即把G[x][y]归零。#include #include #include #include #include #include #include using namespace std;const int maxe = 50000;const int maxn = 10;const int INF = 0x3f3f3f;int N,M,Q;int G[maxn][maxn];int ans;void dfs(int x,int y,int v. 阅读全文
posted @ 2013-08-25 10:48 等待最好的两个人 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4597#include #include #include #include #include #include #include using namespace std;const int maxe = 50000;const int maxn = 26;const int INF = 0x3f3f3f;int dp[maxn][maxn][maxn][maxn]; //dp[l1][r1][l2][r2] 表示先手与后手取得到的最大差值。bool vis[maxn][maxn][maxn][.. 阅读全文
posted @ 2013-08-25 08:40 等待最好的两个人 阅读(279) 评论(0) 推荐(0) 编辑