动态规划
文章平均质量分 78
涅槃phy
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
POJ 1722 SUBTRACT
Description (Special Judge)We are given a sequence of Npositive integers a = [a1, a2, ..., aN] on which we can perform contractionoperations.One contraction operation consists of replacing adjac原创 2013-04-16 14:41:19 · 1078 阅读 · 0 评论 -
ZOJ 3734 LIKE vs CANDLE
LIKE vs CANDLETime Limit: 2 Seconds Memory Limit: 65536 KBA microblog caused a war recently -There's the war between LIKE and CANDLE.As you see, there are N accounts are tryin原创 2014-02-09 09:46:29 · 1048 阅读 · 0 评论 -
HDU 3593 The most powerful force
ProblemDescriptionThe leaders of ACcountry made a decision to regain the TW Island. But they have to face thepowerful force from USB. So the leaders have to hire some excellent soldiersfrom the trai原创 2014-02-09 10:28:29 · 1234 阅读 · 1 评论 -
HDU 1054 Strategic Game
ProblemDescriptionBob enjoys playingcomputer games, especially strategic games, but sometimes he cannot find thesolution fast enough and then he is very sad. Now he has the following problem.He must原创 2014-02-09 09:19:49 · 677 阅读 · 0 评论 -
POJ 1947 Rebuilding Roads
DescriptionThe cows havereconstructed Farmer John's farm, with its N barns (1 <= N <= 150, number1..N) after the terrible earthquake last May. The cows didn't have time torebuild any extra roads, so原创 2014-02-09 10:45:22 · 670 阅读 · 0 评论 -
HDU 4778 Gems Fight!
Problem DescriptionAlice and Bob are playing "GemsFight!":There are Gems of G different colors , packedin B bags. Each bag has several Gems. G different colors are numbered fromcolor 1 to color G.原创 2014-02-09 17:24:45 · 1128 阅读 · 0 评论 -
HDU 2167 Pebbles
Problem DescriptionYou're given an unlimited number of pebbles to distributeacross an N x N game board (N drawn from [3, 15]), where each square on theboard contains some positive point value betwee原创 2014-02-09 19:48:56 · 916 阅读 · 0 评论 -
HDU 2224 The shortest path
Problem DescriptionThere are n pointson the plane, Pi(xi, yi)(1 Before you reach the rightmost point Pn, you can only visit the points thosehave the bigger x-coordinate value. For example, you ar原创 2014-02-09 11:20:38 · 1523 阅读 · 2 评论 -
HDU 4568 Hunter
Problem DescriptionOne day, a hunter named James went to amysterious area to find the treasures. James wanted to research the area andbrought all treasures that he could.The area can be represente原创 2014-02-09 14:45:16 · 1437 阅读 · 0 评论 -
BNUT 1548 NEW YEARS 2014
Description In the New Year2014, Xiao Ming is thinking about the question: give two integers Nand K, Calculate thenumber of the numbers of satisfy the following conditions:1. It is a positiv原创 2014-02-18 17:27:03 · 848 阅读 · 0 评论 -
hdu 3311 Dig The Wells (SteinerTree斯坦纳树)
Problem DescriptionYou may all know the famousstory “Three monks”. Recently they find some places around their temples canbeen used to dig some wells. It will help them save a lot of time. But to di原创 2014-03-05 22:36:18 · 1612 阅读 · 0 评论 -
2014年百度之星资格赛第二题Disk Schedule
Problem Description有很多从磁盘读取数据的需求,包括顺序读取、随机读取。为了提高效率,需要人为安排磁盘读取。然而,在现实中,这种做法很复杂。我们考虑一个相对简单的场景。磁盘有许多轨道,每个轨道有许多扇区,用于存储数据。当我们想在特定扇区来读取数据时,磁头需要跳转到特定的轨道、具体扇区进行读取操作。为了简单,我们假设磁头可以在某个轨道顺时针或逆时针匀速旋转,旋转一周的时间是原创 2014-05-16 19:32:15 · 1777 阅读 · 0 评论 -
HDU 2412 Party at Hali-Bula
ProblemDescriptionDear Contestant,I'm going to have a party at my villa at Hali-Bula to celebrate my retirementfrom BCM. I wish I could invite all my co-workers, but imagine how an employeecan e原创 2014-02-09 08:59:49 · 783 阅读 · 0 评论 -
HDU 1081 To The Max
Problem DescriptionGiven atwo-dimensional array of positive and negative integers, a sub-rectangle is anycontiguous sub-array of size 1 x 1 or greater located within the whole array.The sum of a rec原创 2014-01-31 18:35:38 · 673 阅读 · 0 评论 -
HDU 1158 Employment Planning
Problem DescriptionA project managerwants to determine the number of the workers needed in every month. He doesknow the minimal number of the workers needed in each month. When he hires orfires a wo原创 2014-01-31 20:42:15 · 840 阅读 · 0 评论 -
POJ 2168 Joke with Turtles
Description (Special Judge)There is a famous joke-riddlefor children: Three turtles are crawlingalong a road. One turtle says: "There are two turtles ahead of me."The other turtle says: "There原创 2013-04-26 21:25:17 · 1050 阅读 · 0 评论 -
POJ 1160 Post Office
DescriptionThere is a straight highwaywith villages alongside the highway. The highway is represented as an integeraxis, and the position of each village is identified with a single integercoordinat原创 2013-04-23 14:52:26 · 884 阅读 · 0 评论 -
HDU 1114 Piggy-Bank
Problem DescriptionBefore ACM can do anything, abudget must be prepared and the necessary financial support obtained. The mainincome for this action comes from Irreversibly Bound Money (IBM). The id原创 2013-07-02 17:38:56 · 775 阅读 · 0 评论 -
POJ 1276 Cash Machine
DescriptionA Bank plans to install amachine for cash withdrawal. The machine is able to deliver appropriate @ billsfor a requested cash amount. The machine uses exactly N distinct billdenominations,原创 2013-07-02 19:14:02 · 806 阅读 · 0 评论 -
HDU 1712 ACboy needs your help
Problem DescriptionACboy has N courses this term,and he plans to spend at most M days on study.Of course,the profit he will gainfrom different course depending on the days he spend on it.How to arra原创 2013-07-04 19:23:39 · 754 阅读 · 0 评论 -
HDU 1520 Anniversary party
Problem DescriptionThere is going to be a partyto celebrate the 80-th Anniversary of the Ural State University. The Universityhas a hierarchical structure of employees. It means that the supervisorr原创 2013-07-31 09:35:30 · 945 阅读 · 0 评论 -
HDU 1561 The more, The Better
Problem DescriptionACboy很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中ACboy允许攻克M个城堡并获得里面的宝物。但由于地理位置原因,有些城堡不能直接攻克,要攻克这些城堡必须先攻克其他某一个特定的城堡。你能帮ACboy算出要获得尽量多的宝物应该攻克哪M个城堡吗? Input每个测试实例首先包括2个整数,N,M.(1原创 2013-07-31 09:51:10 · 732 阅读 · 0 评论 -
hdu 1864 最大报销额
Problem Description现有一笔经费可以报销一定额度的发票。允许报销的发票类型包括买图书(A类)、文具(B类)、差旅(C类),要求每张发票的总额不得超过1000元,每张发票上,单项物品的价值不得超过600元。现请你编写程序,在给出的一堆发票中找出可以报销的、不超过给定额度的最大报销额。 Input测试输入包含若干测试用例。每个测试用例的第1行包含两个正数 Q 和 N,原创 2014-01-29 18:33:54 · 921 阅读 · 0 评论 -
hdu 1506 Largest Rectangle in a Histogram
Problem DescriptionA histogram is apolygon composed of a sequence of rectangles aligned at a common base line. Therectangles have equal widths but may have different heights. For example, thefigure原创 2014-01-29 19:44:19 · 682 阅读 · 0 评论 -
hdu 1159 Common Subsequence
Problem DescriptionA subsequence of agiven sequence is the given sequence with some elements (possible none) leftout. Given a sequence X = another sequence Z = is a subsequence of X if there exi原创 2014-01-29 20:06:34 · 653 阅读 · 0 评论 -
hdu 2955 Robberies
很久没写过题了。DP又是最拙计之处。只好从最简单的DP重新写一遍了 Problem DescriptionThe aspiring Roy the Robber has seen a lot of American movies, and knowsthat the bad guys usually gets caught in the end, often because they原创 2014-01-29 18:01:37 · 593 阅读 · 0 评论 -
hdu 1069 Monkey and Banana
Problem DescriptionA group of researchers aredesigning an experiment to test the IQ of a monkey. They will hang a banana atthe roof of a building, and at the mean time, provide the monkey with someb原创 2014-01-30 12:31:47 · 876 阅读 · 0 评论 -
2014年百度之星资格赛第四题Labyrinth
Problem Description度度熊是一只喜欢探险的熊,一次偶然落进了一个m*n矩阵的迷宫,该迷宫只能从矩阵左上角第一个方格开始走,只有走到右上角的第一个格子才算走出迷宫,每一次只能走一格,且只能向上向下向右走以前没有走过的格子,每一个格子中都有一些金币(或正或负,有可能遇到强盗拦路抢劫,度度熊身上金币可以为负,需要给强盗写欠条),度度熊刚开始时身上金币数为0,问度度熊走出迷宫时候身上原创 2014-05-16 19:35:01 · 1387 阅读 · 1 评论
分享