
DFS
文章平均质量分 85
kyoma
这个kyoma就是逊啦
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hdu5925 Coconuts 离散化 dfs搜索 TWT Tokyo Olympic 1combo-1
#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const int N = 1000; int zx[N], zy[N]; int gx[N]原创 2016-10-06 20:43:51 · 547 阅读 · 0 评论 -
uva11882 Biggest Number dfs搜索 剪很多枝
奶奶的有一天mirror58229提起一道dfs题 还是我们学校oj的,她说写的很麻烦 我就凑过去看,啊!这么标准的dfs究竟哪里会麻烦了呢? 。 。 。 。 于是就自己写了。。。 真的好麻烦啊!!! TLE到WA到TLE。。。。 去网上搜题解都说要dfs走一步bfs一下,奶奶的好麻烦啊!! 我就是不想写bfs啊!!! 另外一个方法(当前结果已为最长,若此时搜索的第一个字比当原创 2016-11-18 01:23:16 · 472 阅读 · 0 评论 -
2016年首届南航-河海联合程序设计竞赛暨第十一届南航程序设计竞赛 题解
问题 A: Unhappy sion 时间限制: 1 Sec 内存限制: 128 MB 提交: 335 解决: 153 [提交][状态][讨论版] 题目描述 After 2rd ccpc,UNCLE RAN give sion a task,sion have to set 10 questions for this contest.But as a acm fan,原创 2016-12-04 23:27:01 · 1223 阅读 · 0 评论 -
hdu2016校赛1002递增数 dfs搜索
递增数 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 921 Accepted Submission(s): 196 Problem Description 若一个正整数A,相邻位总是满足低位大于等于高位,原创 2016-12-26 21:49:13 · 755 阅读 · 0 评论 -
poj1426 Find The Multiple dfs搜索答案
Find The Multiple Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 28704 Accepted: 11898 Special Judge Description Given a positive integer n, write a原创 2017-01-07 10:13:39 · 288 阅读 · 0 评论 -
poj3279 Fliptile dfs暴力枚举状态
Fliptile Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 8632 Accepted: 3230 Description Farmer John knows that an intellectually satisfied cow is a happ原创 2017-01-21 00:44:59 · 726 阅读 · 1 评论 -
Hdu1539 Shredding Company dfs搜索
Shredding Company Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 679 Accepted Submission(s): 222 Problem Description You have j原创 2017-03-01 20:35:35 · 395 阅读 · 0 评论 -
hdu1010 Tempter of the Bone dfs搜索 剪枝
Tempter of the Bone Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 116519 Accepted Submission(s): 31594 Problem Description The原创 2017-03-02 18:03:38 · 279 阅读 · 0 评论 -
hdu2553 n皇后问题 dfs搜索 记忆化
N皇后问题 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 21710 Accepted Submission(s): 9709 Problem Description 在N*N的方格棋盘放置了N个皇后,使得原创 2017-03-02 23:06:37 · 342 阅读 · 0 评论 -
hdu1728 逃离迷宫 dfs搜索剪枝
逃离迷宫 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 25424 Accepted Submission(s): 6204 Problem Description 给定一个m × n (m行, n列)原创 2017-03-03 20:02:13 · 404 阅读 · 0 评论 -
Codeforces 780C Andryusha and Colored Balloons 搜索dfs
C. Andryusha and Colored Balloons time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Andryusha goes through a原创 2017-03-11 14:58:31 · 482 阅读 · 0 评论 -
poj2965 The Pilots Brothers' refrigerator dfs+枚举
The Pilots Brothers' refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 24732 Accepted: 9535 Special Judge Description The game “The Pilo原创 2016-11-02 18:00:03 · 384 阅读 · 0 评论 -
poj1753 Flip Game dfs 枚举 待补完 位运算
Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 41219 Accepted: 17896 Description Flip game is played on a rectangular 4x4 field with two-sided原创 2016-11-02 17:30:10 · 451 阅读 · 0 评论 -
HHUOJ LCM and Walk 数学 逆推 gcd&lcm DFS TWT Tokyo Olympic 2Combo -1
问题 D: LCM and Walk 时间限制: 1 Sec 内存限制: 128 MB 提交: 7 解决: 4 [提交][状态][讨论版] 题目描述 Jerry has just learned some number theory, and can't wait to show his ability to Tom. Now Jerry is sitting on a grid原创 2016-09-09 16:35:31 · 1250 阅读 · 0 评论 -
poj2386 Lake Counting dfs入门 TWT Tokyo Olympic 2combo-2
Lake Counting Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 30099 Accepted: 15044 Description Due to recent rains, water has pooled in various places i原创 2016-09-23 14:19:36 · 477 阅读 · 0 评论 -
蓝桥杯 振兴中华 dfs入门 TWT Tokyo Olympic 2combo-3
/* ━━━━━┒ ┓┏┓┏┓┃μ'sic foever!! ┛┗┛┗┛┃\○/ ┓┏┓┏┓┃ / ┛┗┛┗┛┃ノ) ┓┏┓┏┓┃ ┛┗┛┗┛┃ ┓┏┓┏┓┃ ┛┗┛┗┛┃ ┓┏┓┏┓┃ ┛┗┛┗┛┃ ┓┏┓┏┓┃ ┃┃┃┃┃┃ ┻┻┻┻┻┻ */ #include #include #include #include #include #include原创 2016-09-23 15:26:10 · 341 阅读 · 0 评论 -
poj1321 棋盘问题 dfs入门 TWT Tokyo Olympic 1combo-1
棋盘问题 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 36938 Accepted: 18203 Description 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编原创 2016-09-25 22:56:28 · 387 阅读 · 0 评论 -
hdu1241 Oil Deposits dfs水题 TWT Tokyo Olympic 2combo-3
Description The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid原创 2016-09-26 19:04:33 · 405 阅读 · 0 评论 -
hdu1285 确定比赛名次 拓扑排序学习 待补完
确定比赛名次 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 23153 Accepted Submission(s): 9378 Problem Description 有N个比赛队(1原创 2016-10-20 17:21:39 · 310 阅读 · 0 评论 -
POJ3414 Pots BFS搜索 TWT TokyoOlympic 4combo-2
/* ━━━━━┒ ┓┏┓┏┓┃μ'sic foever!! ┛┗┛┗┛┃\○/ ┓┏┓┏┓┃ / ┛┗┛┗┛┃ノ) ┓┏┓┏┓┃ ┛┗┛┗┛┃ ┓┏┓┏┓┃ ┛┗┛┗┛┃ ┓┏┓┏┓┃ ┛┗┛┗┛┃ ┓┏┓┏┓┃ ┃┃┃┃┃┃ ┻┻┻┻┻┻ */ #include #include #include #include #include #include原创 2016-09-28 18:19:09 · 485 阅读 · 0 评论 -
hdu5546 Ancient Go DFS搜索 国庆咸鱼
Ancient Go Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 1660 Accepted Submission(s): 528 Problem Description Yu Zhou likes to原创 2016-10-05 17:00:13 · 789 阅读 · 0 评论 -
poj1416 Shredding Company dfs 记录路径
Shredding Company Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 5657 Accepted: 3175 Description You have just been put in charge of developing a new sh原创 2016-10-28 15:41:25 · 408 阅读 · 0 评论 -
UVA10305 Ordering Tasks 拓扑排序
用了dfs模版写居然wa了。。。 抓狂。。。。两道拓扑排序都和我有仇。。。 还以为自己写错了。。。。看了好几遍还是没啥问题。。。 结果居然。。。这题的m可能等于0.。。。。 我的判断是m==0的话就停止输入。。。 呵呵。。。 代码: #include #include #include #include #include #include #include #inclu原创 2016-10-20 17:50:58 · 392 阅读 · 0 评论 -
[kuangbin带你飞]专题二 搜索进阶 题解(康托展开、映射、迭代加深)
专题链接 A:Eight 经典的八数码问题,这题直接bfs是不行的,时限不够,主要是在每个状态判重的时候使用map,在这里的复杂度可以通过康托展开来达到查重O(1),那么!什么是康托展开呢?! 我觉得这个博客写的很好,总之康托展开用来看当前状态中在全排列中是第几个,可以把问题的全部状态不用map来表示 这题hdu是多组样例输入,poj则单组。 本来网上写做这题要有八境界,把代码写八遍原创 2017-12-01 15:22:49 · 531 阅读 · 0 评论