
DP
文章平均质量分 84
剑不飞
时刻思考,找准方向,坚定执行,永不服输(AC才是王道。)
展开
-
hdu 2082 找单词(母函数)
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2000 Accepted Submission(s): 1423Problem Description假设有x1个字母A, x2个字母B,..... x26个字母Z原创 2012-04-25 20:17:20 · 1543 阅读 · 2 评论 -
poj 1276 Cash Machine(多重背包)
Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 19122 Accepted: 6659DescriptionA Bank plans to install a machine for cash withdrawal. The machine is able to deliver原创 2012-05-15 21:44:11 · 513 阅读 · 0 评论 -
hdu 1081 To The Max
To The MaxTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4437 Accepted Submission(s): 2099Problem DescriptionGiven a two-dimensi原创 2012-05-18 21:45:29 · 476 阅读 · 0 评论 -
USCAO section 1.4 Number Triangles(DP)
Number TrianglesConsider the number triangle shown below. Write a program that calculates the highest sum of numbers that can be passed on a route that starts at the top and ends somewhere on the base原创 2012-08-09 20:24:17 · 508 阅读 · 0 评论 -
nefu 394 素数价值(dp或规律)
素数价值Time Limit 3000msMemory Limit 65536Kdescription我们来定义下一个数的素数价值,假设这个数是N(2<=N<=50000),我们可以通过以下两种方法:1.把当前数字除以某个素数(当然得可以整除),即N = N / p;2.把当前数原创 2012-08-10 11:54:43 · 597 阅读 · 0 评论 -
USCAO section 2,2 Preface Numbering(算是DP吧)
Preface NumberingA certain book's prefaces are numbered in upper case Roman numerals. Traditional Roman numeral values use a single letter to represent a certain subset of decimal numbers. Here is原创 2012-08-29 16:47:01 · 482 阅读 · 0 评论 -
USACO section 2.2 Subset Sums(DP,背包)
Subset SumsJRM For many sets of consecutive integers from 1 through N (1 For example, if N=3, one can partition the set {1, 2, 3} in one way so that the sums of both subsets are identical: {3} and {原创 2012-08-29 20:37:49 · 551 阅读 · 0 评论 -
USACO section 2.3 Longest Prefix(dp)
Longest PrefixIOI'96 The structure of some biological objects is represented by the sequence of their constituents, where each part is denote by an uppercase letter. Biologists are interested in原创 2012-09-07 12:17:26 · 1396 阅读 · 0 评论 -
USACO section 2.3 Money Systems(dp)
Money SystemsThe cows have not only created their own government but they have chosen to create their own money system. In their own rebellious way, they are curious about values of coinage. Tradi原创 2012-09-09 21:01:03 · 446 阅读 · 0 评论 -
USACO section 3.1 Score Inflation(DP背包)
Score InflationThe more points students score in our contests, the happier we here at the USACO are. We try to design our contests so that people can score as many points as possible, and would li原创 2012-10-09 20:17:07 · 639 阅读 · 0 评论 -
USACO section 3.1 Humble Numbers(DP)
Humble NumbersFor a given set of K prime numbers S = {p1, p2, ..., pK}, consider the set of all numbers whose prime factors are a subset of S. This set contains, for example, p1, p1p2, p1p1, a原创 2012-10-12 18:30:36 · 500 阅读 · 0 评论 -
USACO section 3.1 Stamps(dp)
StampsGiven a set of N stamp values (e.g., {1 cent, 3 cents}) and an upper limit K to the number of stamps that can fit on an envelope, calculate the largest unbroken list of postages from 1 cent原创 2012-10-20 15:37:11 · 915 阅读 · 0 评论 -
USACO section 3.2 Factorials(dp)
FactorialsThe factorial of an integer N, written N!, is the product of all the integers from 1 through N inclusive. The factorial quickly becomes very large: 13! is too large to store in a 32-bit原创 2012-10-23 19:47:27 · 487 阅读 · 0 评论 -
USACO section 3.3 Shopping Offers(DP或最短路)
Shopping OffersIOI'95 In a certain shop, each kind of product has an integer price. For example, the price of a flower is 2 zorkmids (z) and the price of a vase is 5z. In order to attract more cus原创 2012-11-12 19:57:01 · 573 阅读 · 0 评论 -
hdu 1011 Starship Troopers(树形DP)
Starship TroopersTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6276 Accepted Submission(s): 1692Problem DescriptionYou, the le原创 2012-11-23 20:31:55 · 438 阅读 · 0 评论 -
Codeforces 245H H Queries for Number of Palindromes(DP)
H. Queries for Number of Palindromestime limit per test5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou've got a string s = s1s2...原创 2012-11-24 21:38:03 · 581 阅读 · 0 评论 -
USACO section 3.3 A Game(DP)
A GameIOI'96 - Day 1 Consider the following two-player game played with a sequence of N positive integers (2 <= N <= 100) laid onto a game board. Player 1 starts the game. The players move alterna原创 2013-01-07 20:32:35 · 466 阅读 · 0 评论 -
hdu 1059 Dividing(dp+二进制优化)
DividingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10438 Accepted Submission(s): 2918Problem DescriptionMarsha and Bill ow原创 2013-01-08 12:24:31 · 628 阅读 · 0 评论 -
hdu 1069 Monkey and Banana(dp)
Monkey and BananaTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4637 Accepted Submission(s): 2388Problem DescriptionA group of原创 2013-01-08 15:19:59 · 563 阅读 · 0 评论 -
hdu 1257 最少拦截系统(dp)
最少拦截系统Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10355 Accepted Submission(s): 4055Problem Description某国为了防御敌国的导弹袭击,发展出一种导原创 2013-01-08 15:52:09 · 1288 阅读 · 0 评论 -
hdu 1023 I NEED A OFFER!(dp)
I NEED A OFFER!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10672 Accepted Submission(s): 4019Problem DescriptionSpeakless很早原创 2013-01-08 16:48:20 · 370 阅读 · 0 评论 -
CF-19B - Checkout Assistant(DP)
B - Checkout AssistantCrawling in process...Crawling failedTime Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmitStatusPracticeCodeForces 19BDescriptionBo原创 2013-01-23 21:58:33 · 616 阅读 · 0 评论 -
hdu 1074 Doing Homework(dp+状态压缩)
Doing HomeworkTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3371 Accepted Submission(s): 1308Problem DescriptionIgnatius has ju原创 2013-01-09 15:40:49 · 545 阅读 · 0 评论 -
hdu 1114 Piggy-Bank(DP背包)
Piggy-BankTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6244 Accepted Submission(s): 3137Problem DescriptionBefore ACM can do原创 2013-01-24 12:25:02 · 311 阅读 · 0 评论 -
hdu 1121 Complete the Sequence(DP多项式差分)
Complete the SequenceTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 161 Accepted Submission(s): 93Problem DescriptionYou proba原创 2013-01-24 13:31:16 · 648 阅读 · 0 评论 -
hdu 1565 方格取数(1)(DP 状态压缩)
方格取数(1)Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2585 Accepted Submission(s): 976Problem Description给你一个n*n的格子的棋盘,每个格子里面原创 2013-01-24 15:54:17 · 449 阅读 · 0 评论 -
hdu 1159 Common Subsequence(DP最长公共子序列)
Common SubsequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14714 Accepted Submission(s): 6106Problem DescriptionA subseq原创 2013-01-25 13:38:23 · 383 阅读 · 0 评论 -
hdu 1158 Employment Planning(DP)
Employment PlanningTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2597 Accepted Submission(s): 1013Problem DescriptionA projec原创 2013-01-25 12:59:11 · 598 阅读 · 0 评论 -
hdu 1080 Human Gene Functions(dp)
Human Gene FunctionsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1506 Accepted Submission(s): 840Problem DescriptionIt is we原创 2013-01-10 17:16:47 · 303 阅读 · 0 评论 -
hdu 1227 Fast Food(DP线性决策)
Fast FoodTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1403 Accepted Submission(s): 609Problem DescriptionThe fastfood chain原创 2013-01-28 10:16:14 · 545 阅读 · 0 评论 -
hdu 1208 Pascal's Travels (DP记忆化搜索)
Pascal's Travels Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1115 Accepted Submission(s): 488Problem DescriptionAn n x n ga原创 2013-01-27 10:34:59 · 419 阅读 · 0 评论 -
hdu 1244 Max Sum Plus Plus Plus(DP线性区间)
Max Sum Plus Plus PlusTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 838 Accepted Submission(s): 417Problem Description给定一个由n个原创 2013-01-27 12:42:07 · 634 阅读 · 0 评论 -
hdu 1224 Free DIY Tour(DP多阶段决策)
Free DIY TourTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2061 Accepted Submission(s): 664Problem DescriptionWeiwei is a sof原创 2013-01-28 09:02:28 · 578 阅读 · 0 评论 -
hdu 1024 Max Sum Plus Plus(DP最大字段和)
Max Sum Plus PlusTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11158 Accepted Submission(s): 3673Problem DescriptionNow I thi原创 2013-01-12 17:14:14 · 444 阅读 · 0 评论 -
CF-13C. Sequence(DP)
C. Sequencetime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputLittle Petya likes to play very much. And most of all he li原创 2013-01-13 11:45:07 · 681 阅读 · 0 评论 -
hdu 1438 钥匙计数之一(DP状态压缩)
钥匙计数之一Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1001 Accepted Submission(s): 406Problem Description一把锁匙有N个槽,槽深为1,2,3,4。每锁原创 2013-01-26 18:30:31 · 804 阅读 · 0 评论 -
hdu 1300 Pearls(dp)
PearlsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 894 Accepted Submission(s): 382Problem DescriptionIn Pearlania everybody原创 2013-01-28 18:27:58 · 467 阅读 · 0 评论 -
hdu 2993 MAX Average Problem(DP+斜率优化)
MAX Average ProblemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4153 Accepted Submission(s): 1052Problem DescriptionConsider原创 2013-01-28 21:49:14 · 588 阅读 · 0 评论 -
hdu 1087 Super Jumping! Jumping! Jumping!(dp+最长递增序列)
Super Jumping! Jumping! Jumping!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14615 Accepted Submission(s): 6145Problem Descrip原创 2013-01-13 10:08:39 · 435 阅读 · 0 评论 -
hdu 1331 Function Run Fun(DP)
Function Run FunTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1475 Accepted Submission(s): 752Problem DescriptionWe all love原创 2013-01-29 08:48:45 · 472 阅读 · 0 评论