随笔分类 -  dfs

摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 11 using namespace std; 12 13 14 int dir[8][2]={{-1,-1},{-1,0},{-1,1},{0,-1},... 阅读全文
posted @ 2016-10-29 23:18 pter 阅读(105) 评论(0) 推荐(0)
摘要:链接:http://acm.fzu.edu.cn/problem.php?pid=2181 思路:乍一看以为是并查集,仔细想了下又找不到让函数结束的条件,所以就看了其他人的搜索大法 阅读全文
posted @ 2016-09-04 13:33 pter 阅读(171) 评论(0) 推荐(0)
摘要:链接:http://acm.hdu.edu.cn/showproblem.php?pid=1501 思路:题目要求第三个串由前两个组成,且顺序不能够打乱,搜索大法好 阅读全文
posted @ 2016-08-08 14:57 pter 阅读(190) 评论(0) 推荐(0)