
搜索
lyhvoyage
不抛弃,不放弃!
展开
-
NYOJ 679 The Weight of Tree 搜索+dp+邻接表
The Weight of Tree时间限制:3000 ms | 内存限制:65535 KB难度:4描述456 has a tree of n nodes, each node is assigned with an integer number. Now 456 wants to select a subtree, such that the sum of a原创 2013-05-02 10:42:56 · 937 阅读 · 0 评论 -
CodeForce 526B Om Nom and Dark Park(dp + 递归)
Om Nom and Dark Parktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputOm Nom is the main character of a game原创 2015-04-19 11:54:06 · 1688 阅读 · 0 评论 -
ZOJ 1204 Additive equations(深搜)
Additive equationsTime Limit: 10 Seconds Memory Limit: 32768 KB We all understand that an integer set is a collection of distinct integers. Now the question is: given an integer set, c原创 2014-10-04 18:03:37 · 2518 阅读 · 0 评论 -
SPOJ AMR 10I Dividing Stones(搜索)
Dividing StonesTime limit:7sSource limit:50000BMemory limit:256MBThere are N stones, which can be divided into some piles arbitrarily. Let the v原创 2014-08-01 18:36:29 · 1706 阅读 · 0 评论 -
NYOJ 692 Chinese checkers(广搜)
分析:用广搜把所有的情况都求出来,之后每输入一个值,直接输出答案即可。//step[i][j]记录两个球分别到达i、j点的最小步数//step[i][j]=0时表示后面的球在i位置、前面的球在j位置这个状态没有出现过#include#include#include#includeusing namespace std;const int N = 1010;int step[N][N原创 2014-04-17 19:31:12 · 1366 阅读 · 0 评论 -
NYOJ 20 吝啬的国度 (搜索)
吝啬的国度时间限制:1000 ms | 内存限制:65535 KB难度:3描述在一个吝啬的国度里有N个城市,这N个城市间只有N-1条路把这个N个城市连接起来。现在,Tom在第S号城市,他有张该国地图,他想知道如果自己要去参观第T号城市,必须经过的前一个城市是几号城市(假设你不走重复的路)。输入第一行输入一个整数M表示测试数据共有M(1每组测试数据原创 2014-02-18 19:12:25 · 1585 阅读 · 0 评论 -
HDU 2488 A Knight's Journey(深搜)
A Knight's JourneyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 27258 Accepted: 9295DescriptionBackground The knight is getting bored of seeing the原创 2014-01-16 13:15:05 · 8831 阅读 · 8 评论 -
HDU 1242 Rescue (优先队列 + 广搜)
RescueTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is原创 2014-01-15 14:57:35 · 1873 阅读 · 0 评论 -
POJ 3126 Prime Path (BFS)
Prime PathTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9982 Accepted: 5724DescriptionThe ministers of the cabinet were quite upset by the message fro原创 2014-01-13 18:58:43 · 8463 阅读 · 3 评论 -
POJ 3278 Catch That Cow(BFS)
Catch That CowTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 40350 Accepted: 12560DescriptionFarmer John has been informed of the location of a fugitiv原创 2014-01-13 19:24:25 · 6453 阅读 · 0 评论 -
ZOJ 1940 Dungeon Master (三维广搜)
Dungeon MasterTime Limit: 2 Seconds Memory Limit: 65536 KBYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not原创 2014-01-12 14:11:42 · 1683 阅读 · 0 评论 -
UVA 10285 - Longest Run on a Snowboard (记忆化搜索+dp)
Longest Run on a SnowboardInput: standard inputOutput: standard outputTime Limit: 5 secondsMemory Limit: 32 MB Michael likes snowboarding. That's not very surprising, since snowboarding is原创 2013-08-02 19:25:22 · 1378 阅读 · 0 评论 -
hdu 1010 Tempter of the Bone 深搜+剪枝
Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He realized that the bone was a trap, and he tried desperately原创 2013-07-18 15:54:17 · 1077 阅读 · 0 评论 -
UVA 657 - The die is cast 深度搜索
657 - The die is castInterGames is a high-tech startup company that specializes in developing technology that allows users to play games over the Internet. A market analysis has alerted them to th原创 2013-07-17 18:42:03 · 2392 阅读 · 3 评论 -
UVA 216 - Getting in Line
216 - Getting in LineComputer networking requires that the computers in the network be linked.This problem considers a ``linear" network in which the computers are chained together so that eac原创 2013-07-17 09:38:15 · 1612 阅读 · 0 评论 -
nyoj 42 一笔画问题 (搜索+队列)
点击打开链接一笔画问题时间限制:3000 ms | 内存限制:65535 KB难度:4描述zyc从小就比较喜欢玩一些小游戏,其中就包括画一笔画,他想请你帮他写一个程序,判断一个图是否能够用一笔画下来。规定,所有的边都只能画一次,不能重复画。 输入第一行只有一个正整数N(N每组测试数据的第一行有两个正整数P,Q(P随后的Q行,每行原创 2013-03-21 16:40:13 · 1565 阅读 · 0 评论 -
CSU 1081集训队分组(搜索)
集训队分组Time Limit: 2 Sec Memory Limit: 128 MBDescription中南大学ACM的暑期集训马上就要开始了,这次集训会将全体N名集训队员(编号分别为1, 2, …, N)按集训选拔赛的排名分成两组,前K名队员分入A组,其余队员分入B组。但现在助理教练CSGrandeur一不小心把集训选拔赛的排名弄丢了,而之前又没将A组和B组的人员确原创 2016-03-01 23:02:38 · 1026 阅读 · 0 评论