搜索_DFS深搜
Chook_lxk
你前程有在,但须澄心猛省,不可自甘堕落。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU - 5546 Ancient Go(DFS深搜)
点击打开题目链接 Problem Description Yu Zhou likes to playGowith Su Lu. From the historical research, we found that there are much difference on the rules between ancient go and modern go. Here i原创 2017-04-06 17:31:15 · 701 阅读 · 0 评论 -
HDU - 3699 A hard Aoshu Problem(暴搜dfs)
点击打开题目链接 A hard Aoshu Problem Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 62768/32768 K (Java/Others) Total Submission(s): 1550Accepted Submission(s): 813 Problem Descrip原创 2017-07-25 19:29:21 · 655 阅读 · 0 评论 -
UVA - 208 Firetruck(floyd+DFS)
点击打开题目链接 题目大意: 给出一个无向图及节点n,求解从节点1 到节点n的所有路径,按字典序从小到大输出。 思路: 先用floyd算法求解连通关系,然后dfs求解。(连通关系也可以用并查集) 附上AC代码: #include #include using namespace std; int _map[25][25],path[25],used[25]; int n,u,v; i原创 2017-08-09 10:47:49 · 530 阅读 · 0 评论 -
POJ - 3009 Curling(dfs)
点击打开题目链接 Curling 2.0 Time Limit:1000MS Memory Limit:65536K Total Submissions:21409 Accepted:8726 Description On Planet MM-21, after their Olympic gam原创 2017-06-24 18:31:03 · 744 阅读 · 0 评论 -
二分图判定 (挑战程序设计竞赛)
题目: 给定一个具有n个顶点的图,要给图上每个顶点染色,并且要使相邻的顶点颜色不同。问是否能最多用2种颜色进行染色?题目保证没有重边和自环。 限制条件:1 input: 3 3(顶点数 边数) 0 1(有一条0到1的边) 0 2(有一条0到2的边) 1 2(有一条1到2的边) output: no 先用邻接表将点之间的关系存储下来,然后依次搜索每一个顶点,依次确定相邻顶点的颜色原创 2017-04-07 22:14:31 · 598 阅读 · 0 评论 -
POJ - 1041 John‘s trip(欧拉回路+dfs输出路径)
点击打开题目链接 John's trip Time Limit:1000MS Memory Limit:65536K Total Submissions:8998 Accepted:3018 Special Judge Description Little Johnny has got a原创 2017-04-19 18:19:52 · 809 阅读 · 0 评论 -
HDU - 2894 DeBruijin(欧拉回路)
点击打开题目链接 DeBruijin Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 855Accepted Submission(s): 486 Problem Description 旋转鼓的原创 2017-04-20 22:45:04 · 1104 阅读 · 0 评论 -
POJ - 2230 Watchcow(欧拉回路+dfs输出路径)
点击打开题目链接 Watchcow Time Limit:3000MS Memory Limit:65536K Total Submissions:7926 Accepted:3462 Special Judge Description Bessie's been appointed th原创 2017-04-21 17:42:37 · 729 阅读 · 0 评论 -
POJ - 2337 Catenyms(欧拉回路+dfs输出路径)
点击打开题目链接 Catenyms Time Limit:1000MS Memory Limit:65536K Total Submissions:12004 Accepted:3116 Description A catenym is a pair of words separated by a原创 2017-04-21 23:30:19 · 1326 阅读 · 0 评论 -
UVA - 307 Sticks(dfs + 剪枝)
点击打开题目链接 Sticks DescriptionGeorge took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the original state, but he forgo原创 2017-05-11 22:49:29 · 1146 阅读 · 0 评论 -
Gym - 100741B Personal programming language(dfs)
点击打开题目链接 B. Personal programming language time limit per test 1.0 s memory limit per test 64 MB input standard input output standard output Everybody knows that you原创 2017-08-23 15:33:48 · 388 阅读 · 0 评论
分享