![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
深度优先遍历
wang_hoho
这个作者很懒,什么都没留下…
展开
-
HDU - 4403 - A very hard Aoshu problem (DFS)
A very hard Aoshu problemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1740 Accepted Submission(s): 1197Problem Description原创 2017-11-09 21:07:12 · 206 阅读 · 0 评论 -
Codeforces Testing Round #14 (Unrated) - B - Door Frames(DFS)
B. Door Framestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya has equal wooden bars of length n. He w原创 2017-12-22 21:30:36 · 781 阅读 · 0 评论 -
ZOJ - 3983 - Crusaders Quest(DFS)
Crusaders QuestTime Limit: 1 Second Memory Limit: 65536 KBCrusaders Quest is an interesting mobile game. A mysterious witch has brought great darkness to the game world, and the only ho原创 2017-12-17 21:44:04 · 293 阅读 · 0 评论 -
Codeforces Round #460 (Div.2) - D - Substring(DFS)
D. Substringtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a graph with n nodes and m direc原创 2018-02-04 11:12:05 · 161 阅读 · 0 评论 -
2018年全国多校算法寒假训练营练习比赛(第一场) - E - 恋与程序员(DFS)
链接:https://www.nowcoder.net/acm/contest/67/E来源:牛客网题目描述 马云:“哈哈,女生的钱最好赚了!” 叠纸:“马云说得对!” 腾讯:“哇!真的耶!求代理!” 小P眼一眯,嘴角一挑,似乎发现了商机。不就是抽卡过关看CG么,我也能做啊!于是乎,一个月后,一款《恋与程序员》诞生了。 游戏里设置了n个事件,m个关卡原创 2018-02-06 19:44:28 · 176 阅读 · 0 评论 -
2018年全国多校算法寒假训练营练习比赛(第四场) - F - Call to your teacher (DFS)
链接:https://www.nowcoder.com/acm/contest/76/F来源:牛客网题目描述 从实验室出来后,你忽然发现你居然把自己的电脑落在了实验室里,但是实验室的老师已经把大门锁上了。更糟的是,你没有那个老师的电话号码。你开始给你知道的所有人打电话,询问他们有没有老师的电话,如果没有,他们也会问自己的同学来询问电话号码。那么,你能联系到老师并且拿到电脑吗。输入描述:...转载 2018-02-22 12:15:50 · 180 阅读 · 0 评论 -
2018年全国多校算法寒假训练营练习比赛(第四场) - G - 老子的意大利炮呢(搜索)
链接:https://www.nowcoder.com/acm/contest/76/G来源:牛客网题目描述 自攻打过太原县城以后,李云龙这意大利炮就使用的越发的顺手了,指哪打哪也是绝不含糊,于是小野队长开始疯狂打击独立团炮兵营,为了锻炼士兵移动意大利炮的能力,李团长开始给炮兵营进行特训,众(wo)所(xia)周(bian)知(de),意大利炮可由炮管,车轮,炮弹三部分组成,现在李团长在洋...原创 2018-02-22 12:21:39 · 324 阅读 · 0 评论 -
2018年全国多校算法寒假训练营练习比赛(第四场) - H - 老子的全排列呢
求1-8的全排列#include <iostream>#include <stdio.h>#include <string.h>using namespace std;int vis[10],ans[10];void dfs(int k,int m){ ans[m] = k; if(m==7){ for(int i=0;...原创 2018-02-22 12:25:12 · 147 阅读 · 0 评论 -
Codeforces Problem - 37C - Old Berland Language(DFS|字典树)
C. Old Berland Languagetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBerland scientists know that the Old Berland language had exactly n words. ...原创 2018-03-29 22:51:35 · 178 阅读 · 0 评论 -
Codeforces Round #498 (Div.3)
目录A - Adjacent ReplacementsB - Polycarp's PracticeC - Three Parts of the ArrayD - Two Strings SwapsE - Military ProblemF - Xor-PathsA - Adjacent Replacements题意:有一个含有n个元素的数列, 1 <= ...原创 2018-07-17 21:36:42 · 320 阅读 · 0 评论 -
HDU - 5695 - Gym Class(DFS)
Gym ClassTime Limit: 6000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2106 Accepted Submission(s): 801Problem Description众所周知,度度熊喜欢各类体原创 2017-11-24 21:37:46 · 163 阅读 · 0 评论 -
FZU - 2195 - 检查站点(DFS)
Problem 2195 检查站点Accept: 330 Submit: 770Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description在山上一共有N个站点需要检查,检查员从山顶出发去各个站点进行检查,各个站点间有且仅有一条通路,检查员下山前往站点时比较轻松,而上山时却需要额外的时原创 2017-11-24 21:19:31 · 219 阅读 · 0 评论 -
POJ - 1925 - BUY LOW, BUY LOWER (最长上升子序列+建图DFS)
BUY LOW, BUY LOWERTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 10541 Accepted: 3691DescriptionThe advice to "buy low" is half the formula to success原创 2017-11-10 22:52:32 · 155 阅读 · 0 评论 -
POJ - 3414 - Pots (DFS)
PotsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 19046 Accepted: 8028 Special JudgeDescriptionYou are given two pots, having the volume of A an原创 2017-11-03 12:11:32 · 212 阅读 · 0 评论 -
CSU - 1562 - Fun House
1562: Fun HouseSubmit Page Summary Time Limit:1 Sec Memory Limit: 128 Mb Submitted:498 Solved:176 DescriptionAmerican Carnival Makers Inc. (ACM)原创 2017-07-31 19:41:56 · 267 阅读 · 0 评论 -
ACdream - 1740 - 哗啦啦族的24点游戏(DFS)
哗啦啦族的24点游戏Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)Submit Statistic Next ProblemProblem Description哗啦啦族的小Q是一个狂热的24点爱好者,24点就是给你一串数字,问你是否通过加减乘除括号原创 2017-11-29 22:09:53 · 214 阅读 · 0 评论 -
UVALive - 7672 - What a Ridiculous Election(搜索预处理)
In country Light Tower, a presidential election is going on. There are two candidates, Mr. X1andMr. X2, and both of them are not like good persons. One is called a liar and the other is called ama原创 2017-11-15 16:53:22 · 424 阅读 · 0 评论 -
POJ - 3083 - Children of the Candy Corn(BFS+DFS)
Children of the Candy CornTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14378 Accepted: 6203DescriptionThe cornfield maze is a popular Halloween treat原创 2017-11-20 22:47:37 · 168 阅读 · 0 评论 -
HDU - 5934 - Bomb (强连通缩点)
BombTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2468 Accepted Submission(s): 777Problem DescriptionThere are N bombs needing exploding.Ea...原创 2017-11-06 22:07:42 · 235 阅读 · 0 评论 -
POJ - 3087 - Shuffie'm Up (搜索,模拟)
Shuffle'm UpTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12735 Accepted: 5899DescriptionA common pastime for poker players at a poker table is to shu原创 2017-11-20 16:42:51 · 171 阅读 · 0 评论 -
ACdream - 1015 - Double Kings (DFS)
Double KingsTime Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)Submit Statistic Next ProblemProblem DescriptionOur country is tree-like structure, that i原创 2017-11-30 22:48:42 · 193 阅读 · 0 评论 -
HDU - 6341 - Problem J. Let Sudoku Rotate(DFS+剪枝)
HDU - 6341 - Problem J. Let Sudoku Rotate题意:一个16*16的数独,给你将其每块逆时针旋转一些次数后的状态,求出其恢复到数独条件满足最少要旋转多少次。 模拟每块逆时针旋转。每块旋转结束后在该块左上角就已经确定了,可以判断每行每列是否有相同的,用以剪枝。 #include <iostream>#include &l...原创 2018-08-11 18:36:50 · 228 阅读 · 0 评论