![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
搜索
云淡风轻jzl
一路脚踏实地,不忘仰望星空。
展开
-
牛客3007B-图-记忆化搜索
链接:https://ac.nowcoder.com/acm/contest/3007/B来源:牛客网题目描述:现在有一个N个点的有向图,每个点仅有一条出边你需要求出图中最长的简单路径包含点的数量(1≤N≤1,000,000)输入描述:第一行一个数字N接下来N行,每行一个正整数,第i+1行的数字表示第i个点出边终点的编号(点从1开始标号)输出描述:一行一个数字,最长的简单路径...原创 2020-02-15 19:40:34 · 454 阅读 · 0 评论 -
洛谷1120-小木棍-搜索+剪枝-好题
题解转自:https://www.luogu.org/problemnew/solution/P1120题目描述:乔治有一些同样长的小木棍,他把这些木棍随意砍成几段,直到每段的长都不超过50。现在,他想把小木棍拼接成原来的样子,但是却忘记了自己开始时有多少根木棍和它们的长度。给出每段小木棍的长度,编程帮他找出原始木棍的最小可能长度。输入描述:共二行。第一行为一个单独的整数N表示砍过以...转载 2019-10-08 11:38:59 · 821 阅读 · 0 评论 -
HihoCoder 1829-Tomb Raider-枚举+dfs+map
DescriptionLara Croft, the fiercely independent daughter of a missing adventurer, must push herself beyond her limits when she discovers the island where her father disappeared. In this mysterious is...原创 2019-09-03 09:12:46 · 241 阅读 · 0 评论 -
HihoCoder 1828-Saving Tang Monk II-广搜+记忆化+剪枝
Description《Journey to the West》(also 《Monkey》) is one of the Four Great Classical Novels of Chinese literature. It was written by Wu Cheng’en during the Ming Dynasty. In this novel, Monkey King Sun ...原创 2019-09-02 22:56:04 · 280 阅读 · 0 评论 -
HDU 5012-Dice-bfs的状态搜索
DescriptionThere are 2 special dices on the table. On each face of the dice, a distinct number was written. Consider a1.a2,a3,a4,a5,a6 to be numbers written on top face, bottom face, left face, right...原创 2019-08-28 11:12:40 · 183 阅读 · 0 评论 -
CF 520B-Two Buttons-bfs求最少操作次数
DescriptionVasya has found a strange device. On the front panel of a device there are: a red button, a blue button and a display showing some positive integer. After clicking the red button, device m...原创 2019-08-17 19:52:07 · 274 阅读 · 0 评论 -
HDU 2181-哈密顿绕行世界问题-dfs+链表树存路径
题目描述:一个规则的实心十二面体,它的 20个顶点标出世界著名的20个城市,你从一个城市出发经过每个城市刚好一次后回到出发的城市。输入描述:前20行的第i行有3个数,表示与第i个城市相邻的3个城市.第20行以后每行有1个数m,m<=20,m>=1.m=0退出.输出描述:输出从第m个城市出发经过每个城市1次又回到m的所有路线,如有多条路线,按字典序输出,每行1条路线.每行首先输...原创 2019-08-17 19:32:22 · 197 阅读 · 0 评论 -
CF 1020B-Badge-定向的dfs
DescriptionIn Summer Informatics School, if a student doesn’t behave well, teachers make a hole in his badge. And today one of the teachers caught a group of n students doing yet another trick.Let’s...原创 2019-08-17 18:44:22 · 218 阅读 · 0 评论 -
POJ 1088-滑雪-记忆化搜索
题目描述:Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 516 17 18 19 615 24 25 20 714 23 22 21 8...原创 2019-07-22 16:25:42 · 207 阅读 · 0 评论 -
HDU1069-Monkey and Banana-记忆化搜索
A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. If the monk...原创 2019-07-22 15:02:20 · 221 阅读 · 0 评论 -
蓝桥杯2017年第八届-发现环
题目描述:小明的实验室有N台电脑,编号1~N。原本这N台电脑之间有N-1条数据链接相连,恰好构成一个树形网络。在树形网络上,任意两台电脑之间有唯一的路径相连。不过在最近一次维护网络时,管理员误操作使得某两台电脑之间增加了一条数据链接,于是网络中出现了环路。环路上的电脑由于两两之间不再是只有一条路径,使得这些电脑上的数据传输出现了BUG。为了恢复正常传输。小明需要找到所有在环路上的电脑,你能帮...原创 2019-05-10 09:55:32 · 271 阅读 · 4 评论 -
POJ 2631-Roads in the North-树的直径
Building and maintaining roads among communities in the far North is an expensive business. With this in mind, the roads are build such that there is only one route from a village to a village that do...原创 2019-08-03 18:56:43 · 161 阅读 · 0 评论 -
ZOJ 2972-Hurdles of 110m-记忆化搜索
In the year 2008, the 29th Olympic Games will be held in Beijing. This will signify the prosperity of China and Beijing Olympics is to be a festival for people all over the world as well.Liu Xiang is...原创 2019-07-26 09:59:20 · 152 阅读 · 0 评论 -
HDU 4597-Play Game-记忆化搜索
Alice and Bob are playing a game. There are two piles of cards. There are N cards in each pile, and each card has a score. They take turns to pick up the top or bottom card from either pile, and the s...原创 2019-07-26 09:01:25 · 155 阅读 · 0 评论 -
LightOJ1031-Easy Game-记忆化搜索+博弈
You are playing a two player game. Initially there are n integer numbers in an array and player A and B get chance to take them alternatively. Each player can take one or more numbers from the left or...原创 2019-07-24 13:37:01 · 196 阅读 · 0 评论