动态规划
文章平均质量分 83
KinFungYu
前SCAU ACM校队队员
展开
-
poj 2923 Relocation(状态压缩+01背包)
RelocationTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1846 Accepted: 763DescriptionEmma and Eric are moving to their new house they bought after ret原创 2014-07-12 18:37:59 · 898 阅读 · 0 评论 -
poj 1742 Coins(多重背包)
CoinsTime Limit: 3000MS Memory Limit: 30000KTotal Submissions: 25171 Accepted: 8514DescriptionPeople in Silverland use coins.They have coins of value A1,A2,A3...An原创 2013-07-05 09:57:30 · 782 阅读 · 0 评论 -
poj 1609 Tiling Up Blocks(最长不下降序列)
Tiling Up BlocksTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 4656 Accepted: 1816DescriptionMichael The Kid receives an interesting game set from his gr原创 2013-06-25 22:28:33 · 1095 阅读 · 0 评论 -
hdu 4501 小明系列故事——买年货
小明系列故事——买年货Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1309 Accepted Submission(s): 564Problem Description 春节将至,小明要去超市购置原创 2013-04-14 20:09:50 · 948 阅读 · 0 评论 -
UVALive 5006 (BFS+heap+01背包)
DescriptionJoko is taking part in a fire drill which is held by the Jakarta Fire Department to recruit new firemen. The drill is about rescuing volunteers (who act as unconscious people) trapp原创 2013-07-17 22:01:10 · 1110 阅读 · 0 评论 -
HDU 3006 The Number of set
The Number of setTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 897 Accepted Submission(s): 555Problem DescriptionGiven you原创 2013-03-27 19:15:35 · 765 阅读 · 0 评论 -
sdut 1265 马拦过河卒
马拦过河卒题目描述棋盘上A点有一个过河卒,需要走到目标B点。卒行走的规则:可以向下、或者向右。同时在棋盘上C点有一个对方的马,该马所在的点和所有跳跃一步可达的点称为对方马的控制点。因此称之为“马拦过河卒”。棋盘用坐标表示,A点(0,0)、B点(n,m)(n,m为不超过15的整数),同样马的位置坐标是需要给出的。现在要求你计算出卒从A点能够到达B点的路径的条数,假设马的位置是固定不动的,并不原创 2013-07-12 19:36:21 · 1130 阅读 · 0 评论 -
poj 3356 AGTC
AGTCTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8136 Accepted: 3223DescriptionLet x and y be two strings over some finite alphabet A. We would like原创 2013-07-12 16:24:07 · 593 阅读 · 0 评论 -
sdut 1008 最大公共子串(求n个字符串的最长公共子串)
最大公共子串题目描述从一个给定的串中删去(不一定连续地删去)0个或0个以上的字符,剩下地字符按原来顺序组成的串。例如:“ ”,“a”,“xb”,“aaa”,“bbb”,“xabb”,“xaaabbb”都是串“xaaabbb”的子串。(例子中的串不包含引号。) 编程求N个非空串的最长公共子串的长度。限制:2输入文件第1行是一个整数T,表示测试数据的个数(1原创 2013-07-12 11:18:20 · 4105 阅读 · 0 评论 -
poj 1015 Jury Compromise
Jury CompromiseTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 23006 Accepted: 5949 Special JudgeDescriptionIn Frobnia, a far-away country, the verdic原创 2013-06-23 11:28:48 · 1203 阅读 · 0 评论 -
poj 1636 Prison rearrangement
Prison rearrangementTime Limit: 3000MS Memory Limit: 10000KTotal Submissions: 1995 Accepted: 900DescriptionIn order to lower the risk of riots and escape attempts,原创 2013-06-23 16:29:10 · 1177 阅读 · 0 评论 -
poj 2264 Advanced Fruits
Advanced FruitsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1854 Accepted: 919 Special JudgeDescriptionThe company "21st Century Fruits" has specia原创 2013-06-20 23:18:15 · 802 阅读 · 0 评论 -
hdu 1284 钱币兑换问题
钱币兑换问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3652 Accepted Submission(s): 2059Problem Description在一个国家仅有1分,2分,3分硬币,将原创 2013-04-08 14:43:03 · 608 阅读 · 0 评论 -
spoj 2325 String Distance(滚动数组)
String DistanceProblem code: STRDISTLet A = a1a2...ak and B = b1b2...bl be strings of lengths k and l, respectively. The string distance between A and B is defined in the following way (d[原创 2013-07-20 20:42:24 · 667 阅读 · 0 评论 -
poj 2184 Cow Exhibition(01背包)
Cow ExhibitionTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7595 Accepted: 2751Description"Fat and docile, big and dumb, they look so stupid, they aren'原创 2013-07-06 09:45:53 · 982 阅读 · 0 评论 -
hdu 1423 Greatest Common Increasing Subsequence(LCIS)
Greatest Common Increasing SubsequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3603 Accepted Submission(s): 1136Problem Desc原创 2014-04-27 09:40:47 · 685 阅读 · 0 评论 -
poj 3311 Hie with the Pie(floyd + 状压dp)
Hie with the PieTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 3541 Accepted: 1846DescriptionThe Pizazz Pizzeria prides itself in delivering pizzas to原创 2014-04-06 16:12:16 · 733 阅读 · 0 评论 -
zoj 2059 The Twin Towers(DP)
The Twin TowersTime Limit: 2 Seconds Memory Limit: 65536 KBTwin towers we see you standing tall, though a building's lost our faith will never fall.Twin towers the world hears your call原创 2014-03-03 23:11:49 · 834 阅读 · 0 评论 -
hdu 2833 WuKong(最短路 + dp)
WuKongTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1027 Accepted Submission(s): 366Problem DescriptionLiyuan wanted to rewrite原创 2014-02-22 22:56:53 · 1260 阅读 · 1 评论 -
poj 1745 Divisibility(DP)
DivisibilityTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 9562 Accepted: 3329DescriptionConsider an arbitrary sequence of integers. One can place + or -原创 2013-08-03 21:38:18 · 902 阅读 · 0 评论 -
zoj 3543 Number String(DP)
Number StringTime Limit: 5 Seconds Memory Limit: 65536 KBThe signature of a permutation is a string that is computed as follows: for each pair of consecutive elements of the permutation, writ原创 2013-07-24 23:14:54 · 831 阅读 · 0 评论 -
poj 2955 Brackets(区间DP)
BracketsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2046 Accepted: 1040DescriptionWe give the following inductive definition of a “regular bracket原创 2013-07-20 23:31:58 · 747 阅读 · 0 评论 -
hdu 3033 I love sneakers!(分组背包)
I love sneakers!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2857 Accepted Submission(s): 1169Problem DescriptionAfter months原创 2013-07-06 15:21:11 · 1029 阅读 · 0 评论 -
poj 1837 Balance
BalanceTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 8724 Accepted: 5299DescriptionGigel has a strange "balance" and he wants to poise it. Actually, the原创 2013-07-06 11:43:54 · 651 阅读 · 0 评论 -
HDU 1171 Big Event in HDU(多重背包)
Big Event in HDUTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15812 Accepted Submission(s): 5574Problem DescriptionNowadays, w原创 2013-03-26 20:09:03 · 721 阅读 · 0 评论 -
hdu 2844 Coins(多重背包+二进制优化)
CoinsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4428 Accepted Submission(s): 1781Problem DescriptionWhuacmers use coins.原创 2013-04-14 08:37:22 · 915 阅读 · 1 评论 -
poj 2904 The Mailboxes Manufacturers Problem(DP)
The Mailboxes Manufacturers ProblemTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 947 Accepted: 685DescriptionIn the good old days when Swedish childre原创 2013-07-07 23:20:24 · 2676 阅读 · 0 评论 -
poj 1952 BUY LOW, BUY LOWER(求最长下降子序列个数)
BUY LOW, BUY LOWERTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 7475 Accepted: 2608DescriptionThe advice to "buy low" is half the formula to success in原创 2013-07-05 17:29:10 · 719 阅读 · 0 评论 -
HDU 1227 Fast Food
Fast FoodTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1467 Accepted Submission(s): 635Problem DescriptionThe fastfood chain Mc原创 2013-03-27 21:14:19 · 853 阅读 · 0 评论 -
HDU 1422 重温世界杯
重温世界杯Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3138 Accepted Submission(s): 997Problem Description世界杯结束了,意大利人连本带利的收回了法国人6年前原创 2013-03-26 23:49:18 · 659 阅读 · 0 评论 -
hdu 2159 FATE
FATETime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4780 Accepted Submission(s): 2148Problem Description最近xhd正在玩一款叫做FATE的游戏,为了得到极原创 2013-04-10 01:01:18 · 639 阅读 · 0 评论 -
hdu 2059 龟兔赛跑
龟兔赛跑Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7879 Accepted Submission(s): 3020Problem Description据说在很久很久以前,可怜的兔子经历了人生中最大的打击——赛跑输原创 2013-04-09 23:49:58 · 690 阅读 · 0 评论 -
HDU 1267 下沙的沙子有几粒?
下沙的沙子有几粒?Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 1 Accepted Submission(s) : 1Font: Times New Roman | Verdana | GeorgiaFo原创 2013-03-26 13:39:22 · 810 阅读 · 0 评论 -
hdu 1260 Tickets
TicketsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 638 Accepted Submission(s): 319Problem DescriptionJesus, what a great movi原创 2013-04-08 16:32:23 · 834 阅读 · 0 评论 -
hdu 3496 Watch The Movie(二维费用的背包问题)
Watch The MovieTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 3661 Accepted Submission(s): 1164Problem DescriptionNew semest原创 2013-04-06 22:56:43 · 770 阅读 · 0 评论 -
hdu 1160 FatMouse's Speed
FatMouse's SpeedTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6357 Accepted Submission(s): 2780Special JudgeProblem Description原创 2013-04-01 21:33:28 · 505 阅读 · 0 评论 -
hdu 1159 Common Subsequence
Common SubsequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15480 Accepted Submission(s): 6445Problem DescriptionA subseque原创 2013-03-31 22:20:52 · 605 阅读 · 0 评论 -
HDU 1421 搬寝室
搬寝室Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11273 Accepted Submission(s): 3781Problem Description搬寝室是很累的,xhd深有体会.时间追述200原创 2013-03-26 17:43:37 · 1045 阅读 · 0 评论 -
hdu 2571 命运
命运Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5760 Accepted Submission(s): 2039Problem Description穿过幽谷意味着离大魔王lemon已经无限接近了原创 2013-04-10 20:35:26 · 623 阅读 · 0 评论 -
HDU 3732 Ahui Writes Word
Ahui Writes WordTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1388 Accepted Submission(s): 540Problem DescriptionWe all know th原创 2013-03-26 16:41:14 · 682 阅读 · 0 评论