![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
ACM__dfs
dfs相关题目
P1n9
这个作者很懒,什么都没留下…
展开
-
hdu1010(DFS + 奇偶剪枝)
Tempter of the BoneTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 132730 Accepted Submission(s): 35701Problem Description The doggie found转载 2017-12-02 23:53:19 · 147 阅读 · 0 评论 -
pat 1018 Public Bike Management dfs
地址:https://pintia.cn/problem-sets/994805342720868352/problems/994805489282433024 pat给的题意真的是迷,我理解的是来回的途中只要把沿途的车站弄成完美即可,题意是在去的路上就得把每一个车站弄的完美,不考虑回; 用dfs遍历到sp的每一条路,不会超时,去最优值即可; 原先一直犹豫使用最短路求吧,还是用dfs,网上看了看,...原创 2019-02-12 11:02:49 · 97 阅读 · 0 评论 -
搜索进阶-----I - A计划
可怜的公主在一次次被魔王掳走一次次被骑士们救回来之后,而今,不幸的她再一次面临生命的考验。魔王已经发出消息说将在T时刻吃掉公主,因为他听信谣言说吃公主的肉也能长生不老。年迈的国王正是心急如焚,告招天下勇士来拯救公主。不过公主早已习以为常,她深信智勇的骑士LJ肯定能将她救出。 现据密探所报,公主被关在一个两层的迷宫里,迷宫的入口是S(0,0,0),公主的位置用P表示,时空传输机用#表示,墙用表示,平...原创 2018-09-29 12:59:38 · 245 阅读 · 0 评论 -
搜索进阶------E - DNA sequence
The twenty-first century is a biology-technology developing century. We know that a gene is made of DNA. The nucleotide bases from which DNA is built are A(adenine), C(cytosine), G(guanine), and T(thy...原创 2018-09-29 10:10:49 · 271 阅读 · 0 评论 -
搜索进阶------F - Magic Cube
This is a very popular game for children. In this game, there’s a cube, which consists of 3 * 3 * 3 small cubes. We can unwrap the cube, it will become like this: w w w w w w w w w r r r g g g ...原创 2018-10-01 00:07:38 · 287 阅读 · 0 评论 -
简单搜索------D - Fliptile (枚举搜索)
Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which they manipulate an M × N grid (1 ≤ M ≤ 15; 1 ≤ N ≤ 15...原创 2018-09-23 16:07:30 · 173 阅读 · 0 评论 -
无法拯救我的菜----徐州网络赛 B. BE, GE or NE
地址:https://nanti.jisuanke.com/t/31454 不会,看的题解。。。。。菜。。。 可以理解为一个人想让最终分数尽可能高,另一个想让最终分数尽可能低,然后根据每个问题双向dp #include<bits/stdc++.h> using namespace std; typedef long long LL; const int inf = 0x3f3...转载 2018-09-12 22:20:10 · 162 阅读 · 0 评论 -
Codeforces Round #505 D - Recovering BST
地址:http://codeforces.com/contest/1025/problem/D 听说是dp,但是爆搜也可以过,但是空间容易爆,用bool存储搜索的状态,会爆空间,所以用bitset,二进制位存储 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int inf = 0x3...原创 2018-08-30 20:13:08 · 123 阅读 · 0 评论 -
hdu6370 搜索 + 并查集 Werewolf
Werewolf Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 448 Accepted Submission(s): 85 Problem Description “The Werewolves” is a popu...原创 2018-08-08 20:24:52 · 750 阅读 · 5 评论 -
无法拯救我的菜系列------hdu6386 Age of Moyu
Age of Moyu Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 2384 Accepted Submission(s): 714 Problem Description Mr.Quin love fishes s...转载 2018-08-14 20:38:05 · 283 阅读 · 0 评论 -
牛客多校第七场 C Bit Compression
链接:https://www.nowcoder.com/acm/contest/145/C 来源:牛客网 Bit Compression 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 262144K,其他语言524288K Special Judge, 64bit IO Format: %lld 题目描述 A binary string s of length N...原创 2018-08-10 16:43:13 · 191 阅读 · 0 评论 -
hdu6341 Problem J. Let Sudoku Rotate
Problem J. Let Sudoku Rotate Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Problem Description Sudoku is a logic-based, combinatorial number-placement puzzle, w...转载 2018-08-04 20:22:57 · 215 阅读 · 0 评论 -
codefoeces div480 E. Cyclic Components
题的地址:http://codeforces.com/contest/977/problem/E 这个是简单深搜,但是自己写的太烂了,我用并查集就是为了一个连通分图只遍历一次,但可以边深搜边标记,这样就省掉了并查集的时间,我写的时间是一千多秒,但后面那样写就几百秒,真的是强 #include<iostream> #include<cstdio> #include<...原创 2018-05-12 13:26:37 · 116 阅读 · 0 评论 -
练习赛补题------B Connect3 dfs模拟
题目:https://codeforces.com/gym/101667/attachments 难点只是在如何标记出现过的状态,这样相当于剪枝了,只有三种状态,所以可以用三进制来编码16个数字得到一个唯一的数; 剩下的就是很普通的搜索了 #include<bits/stdc++.h> using namespace std; typedef long long LL; const i...原创 2019-04-05 20:40:52 · 218 阅读 · 0 评论