
搜索
Top_Spirit
我的指针已经找了他的对象,而我呢?
展开
-
DFS - 奇偶剪枝
在搜索中需要的剪枝 1.在当前的步数走的步数step > T,需要剪枝;2.假设当前点的到终点的最短距离为s,当前的步数为step , 如果规定的步数T - step < s, 需要剪枝;3.在当前位置,(T - step - s)为奇数,需要剪枝;4.在map中,可走的点数小于规定的时间或者步数T时,需要剪枝。题目连接:点击打开链接Problem DescriptionThe do...原创 2018-04-08 19:22:30 · 163 阅读 · 1 评论 -
Codeforces Find a Number 简单Bfs
A. Find a Number time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output You are given two positive integers dd and ss. Find minimal pos...原创 2018-11-15 20:58:55 · 243 阅读 · 0 评论 -
Codeforces C. Watto and Mechanism (字典树+DFS)
C. Watto and Mechanism time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Watto, the owner of a spare parts store, has recently got...原创 2019-01-17 10:08:57 · 264 阅读 · 0 评论 -
Codeforces C. Spy Syndrome 2 (字典树+DFS)
C. Spy Syndrome 2 time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output After observing the results of Spy Syndrome, Yash realised the...原创 2019-01-17 14:46:20 · 302 阅读 · 0 评论 -
滑雪 OpenJ_Bailian - 1088 (记忆化搜索)
Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长的滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 5 16 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 1...原创 2019-02-20 15:00:06 · 191 阅读 · 0 评论 -
P1019 单词接龙
题目描述 单词接龙是一个与我们经常玩的成语接龙相类似的游戏,现在我们已知一组单词,且给定一个开头的字母,要求出以这个字母开头的最长的“龙”(每个单词都最多在“龙”中出现两次),在两个单词相连时,其重合部分合为一部分,例如 beastbeastbeast和astonishastonishastonish,如果接成一条龙则变为beastonishbeastonishbeastonish,另外相邻的...原创 2019-08-29 14:49:40 · 181 阅读 · 0 评论 -
2019牛客暑期多校训练营(第十场) Coffee Chicken(DFS)
链接:https://ac.nowcoder.com/acm/contest/890/B 来源:牛客网 Dr. JYY has just created the Coffee Chicken strings, denoted as S(n). They are quite similar to the Fibonacci soup --- today's soup is made by m...原创 2019-09-06 18:39:38 · 155 阅读 · 0 评论