摘要:
/*DFSDate: 2012/10/12题目链接地址:http://www.cnblogs.com/sorryhao/admin/EditPosts.aspx?opt=1思路:从开始点找,一直找到门,这是判断时间是不是刚好t秒,如果是则输出YES,否则输出NO需要注意的是奇偶剪枝奇偶剪枝:http://baike.baidu.com/view/7789287.htm*/#include<iostream>#include<cmath>using namespace std;#define maxn 8char matrix[maxn][maxn];int n,m,t, 阅读全文
posted @ 2012-10-12 21:57
sorryhao
阅读(152)
评论(0)
推荐(0)
摘要:
/*简单DFSDate: 2012/10/12思路:和Prime Ring Problem基本一样题目链接地址:http://acm.hdu.edu.cn/showproblem.php?pid=2181*/#include<iostream>using namespace std;#define maxn 20int matrix[maxn+1][maxn+1],arr[maxn+1];bool visited[maxn+1];int m,count = 1;void dfs(int val,int num) //val为当前走的城市,num为已走的城市个数{ int i; .. 阅读全文
posted @ 2012-10-12 10:55
sorryhao
阅读(210)
评论(0)
推荐(0)

浙公网安备 33010602011771号