动态规划
文章平均质量分 81
Killerfear
这个作者很懒,什么都没留下…
展开
-
(advanced) 动态规划 UVA 1437 - String painter
There are two strings A and B with equal length. Both strings are made up of lower case letters. Now you have a powerful string painter. With the help of the painter, you can change a segment of chara原创 2014-03-10 12:43:20 · 1374 阅读 · 0 评论 -
BZOJ 1047: [HAOI2007]理想的正方形
题目:http://www.lydsy.com/JudgeOnline/problem.php?id=1047原创 2014-08-31 11:28:06 · 389 阅读 · 0 评论 -
BZOJ 1046: [HAOI2007]上升序列
题目:原创 2014-08-31 10:05:13 · 369 阅读 · 0 评论 -
BZOJ 1088: [SCOI2005]扫雷Mine
代码:原创 2014-08-28 22:50:09 · 428 阅读 · 0 评论 -
BZOJ 1024: [SCOI2009]生日快乐
题目:原创 2014-08-27 23:34:34 · 420 阅读 · 0 评论 -
BZOJ 状态压缩dp 1087: [SCOI2005]互不侵犯King
题目:原创 2014-08-28 11:06:34 · 402 阅读 · 0 评论 -
BZOJ 斜率优化 1096: [ZJOI2007]仓库建设
题目:http://www.lydsy.com/JudgeOnline/problem.php?id=1096dai ma原创 2014-08-28 10:29:16 · 391 阅读 · 0 评论 -
2014 多校07 1001 Prime Tree
Prime TreeTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 122 Accepted Submission(s): 18Problem DescriptionGiven an integer n原创 2014-08-13 11:17:58 · 496 阅读 · 0 评论 -
背包 ZOJ 3812 We Need Medicine
We Need MedicineTime Limit: 10 Seconds Memory Limit: 65536 KB Special JudgeA terrible disease broke out! The disease was caused by a new type of virus, which will lead to lethal ly原创 2014-09-19 12:10:41 · 467 阅读 · 0 评论 -
BZOJ 1023: [SHOI2008]cactus仙人掌图
题目:原创 2014-09-05 17:41:50 · 502 阅读 · 0 评论 -
BZOJ 1019: [SHOI2008]汉诺塔
题目:http://www.lydsy.com/JudgeOnline/problem.php?id=1019原创 2014-09-04 17:57:35 · 1393 阅读 · 0 评论 -
(advanced) UVA 10949 Kids in a Grid
Problem AKids in a GridInput: standard inputOutput: standard output Two kids are walking in a H x W grid. Each square in the grid contains a character (whose ASCII code lies between 33 and 1原创 2014-07-15 19:58:37 · 906 阅读 · 0 评论 -
(LCIS)最长公共上升子序列 ZOJ 2432
Greatest Common Increasing Subsequence Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge You are given two sequences of integer numbers. Write a program to determine原创 2014-04-26 22:38:32 · 1319 阅读 · 0 评论 -
状态压缩dp POJ 1038 Bugs Integrated, Inc.
Bugs Integrated, Inc.Time Limit: 15000MS Memory Limit: 30000KTotal Submissions: 8789 Accepted: 3372Case Time Limit: 5000MSDescriptionBugs Integrated, Inc. is原创 2014-05-09 11:56:48 · 566 阅读 · 0 评论 -
动态规划 UVA 1344 - Tian Ji -- The Horse Racing
Here is a famous story in Chinese history.That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes to play horse racing with the king and others.Both of T原创 2014-03-25 18:32:23 · 669 阅读 · 0 评论 -
HDU 斜率优化dp 2829 Lawrence
LawrenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1949 Accepted Submission(s): 858Problem DescriptionT. E. Lawrence was原创 2014-04-03 21:42:01 · 474 阅读 · 0 评论 -
HDU 斜率优化dp 3507 Print Article
Print ArticleTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 4567 Accepted Submission(s): 1370Problem DescriptionZero has an原创 2014-04-02 21:39:16 · 944 阅读 · 0 评论 -
BZOJ 1037: [ZJOI2008]生日聚会Party
题目:原创 2014-08-31 13:17:33 · 690 阅读 · 0 评论 -
BZOJ 1025: [SCOI2009]游戏
题目:原创 2014-08-31 15:40:33 · 387 阅读 · 0 评论 -
BZOJ 1057: [ZJOI2007]棋盘制作
题目:原创 2014-08-31 15:59:41 · 418 阅读 · 0 评论 -
HDU 4799 LIKE vs CANDLE 树形dp
LIKE vs CANDLETime Limit: 4000/2000 MS (Java/Others) Memory Limit: 327680/327680 K (Java/Others)Total Submission(s): 242 Accepted Submission(s): 53Problem DescriptionA microblog原创 2014-12-11 23:17:49 · 565 阅读 · 0 评论 -
UVA 10581 Partitioning for fun and profit
Problem A: Partitioning for fun and profitA partition of a positive integer number m into nelements (n ≤ m) is a sequence of positive numbersa1,...,an such that a1+...+an = m anda1 ≤ a2 ≤ ...原创 2014-12-28 15:33:18 · 406 阅读 · 0 评论 -
UVA 10593 - Kites
Problem EKitesTime Limit4 Seconds The season of flying kites is well ahead. So what? Let us make an inventory for kites. We are given a square shaped sheet of paper.原创 2014-12-28 19:48:42 · 458 阅读 · 0 评论 -
UVA 12034 Race
Race Disky and Sooma, two of the biggest mega minds of Bangladesh went to a far country. They ate, coded and wandered around, even in their holidays. They passed several months in this way原创 2014-12-28 13:10:12 · 466 阅读 · 0 评论 -
UVA 10237 Bishops
Problem BBishopsInput: standard inputOutput: standard outputTime Limit: 4 secondsMemory Limit: 32 MB A bishop is a piece used in the game of chess which is played on a board of squar原创 2014-12-22 23:47:35 · 592 阅读 · 0 评论 -
UVA 1436 Counting heaps (树形dp)
We are given a rooted tree of n vertices. The vertices are to be labeled with numbers 1, 2,..., n so that each label is unique and the heap condition holds, i.e. the label of any vertex is less than原创 2014-12-22 17:32:28 · 633 阅读 · 0 评论 -
HDU 4796 Winter's Coming 插头DP
Winter's ComingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 55 Accepted Submission(s): 9Problem Description″You are too yo原创 2014-12-11 22:51:02 · 1255 阅读 · 0 评论 -
UVA 11133 - Eigensequence
Problem E: EigensequenceGiven an increasing sequence of integers a1, a2, a3, ..., ak, the E-transform produces a sequence of the same length, b1, b2, b3, ..., bk such thatb1 = a1for j>1, bj原创 2015-01-09 16:29:37 · 432 阅读 · 0 评论 -
ZOJ 3824 Fiber-optic Network 树形dp 2014牡丹江现场赛F
Fiber-optic NetworkTime Limit: 15 Seconds Memory Limit: 262144 KBMarjar University has decided to upgrade the infrastructure of school intranet by using fiber-optic technology. There are原创 2014-10-24 18:16:15 · 1274 阅读 · 0 评论 -
ZOJ 3822 Domination 动态规划 2014牡丹江现场赛D
DominationTime Limit: 8 Seconds Memory Limit: 131072 KB Special JudgeEdward is the headmaster of Marjar University. He is enthusiastic about chess and often plays chess with his frie原创 2014-10-24 18:12:25 · 832 阅读 · 0 评论 -
BZOJ 1055: [HAOI2008]玩具取名
题目:原创 2014-09-03 23:29:38 · 442 阅读 · 0 评论 -
HDU 4778 Gems Fight! 状态压缩dp
Gems Fight!Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 327680/327680 K (Java/Others)Total Submission(s): 1112 Accepted Submission(s): 465Problem Description Alice and Bob are p原创 2014-09-27 00:06:35 · 726 阅读 · 0 评论 -
BZOJ 1042: [HAOI2008]硬币购物
题目:原创 2014-09-01 12:45:02 · 422 阅读 · 0 评论 -
BZOJ 1079: [SCOI2008]着色方案
题目:原创 2014-09-01 18:41:11 · 505 阅读 · 0 评论 -
BZOJ 1044: [HAOI2008]木棍分割
题目:原创 2014-09-01 15:05:09 · 722 阅读 · 0 评论 -
BZOJ 1040: [ZJOI2008]骑士
题目:原创 2014-08-31 17:17:03 · 428 阅读 · 0 评论 -
BZOJ 斜率优化dp 1010: [HNOI2008]玩具装箱toy
1010: [HNOI2008]玩具装箱toyTime Limit: 1 Sec Memory Limit: 162 MBSubmit: 5257 Solved: 1886[Submit][Status]DescriptionP教授要去看奥运,但是他舍不下他的玩具,于是他决定把所有的玩具运到北京。他使用自己的压缩器进行压缩,其可以将任意物品变成一堆,再放到一种特殊的一维原创 2014-04-02 18:27:55 · 569 阅读 · 0 评论 -
动态规划 BZOJ 1002 轮状病毒
1002: [FJOI2007]轮状病毒Time Limit: 1 Sec Memory Limit: 162 MBSubmit: 1947 Solved: 1056[Submit][Status]Description 给定n(NInput第一行有1个正整数n。Output将编程计算出的不同的n轮状病毒数输出Sample Inp原创 2014-03-31 18:14:32 · 645 阅读 · 0 评论 -
(男人八题之一)树形dp poj 1741 Tree
TreeTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 8103Accepted: 2375DescriptionGive a tree with n vertices,each edge has a length(positive integer less than 1001). Define dist原创 2014-02-08 09:51:59 · 448 阅读 · 0 评论 -
(基础) 树形dp HDU 1520 Anniversary party
Anniversary partyTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3509 Accepted Submission(s): 1622Problem DescriptionThere is going to be a p原创 2014-02-08 09:51:57 · 444 阅读 · 0 评论