![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
dp
文章平均质量分 78
black_miracle
这个作者很懒,什么都没留下…
展开
-
ZOJ 3929 dp
Deque and BallsTime Limit: 2 Seconds Memory Limit: 65536 KBThere are n balls, where the i-th ball is labeled as pi. You are going to put n balls into a deque. In the i-th turn, yo原创 2016-04-24 21:49:22 · 458 阅读 · 0 评论 -
SPOJ BOKAM143SOU dp
Checking cubes. Given a integer **N**. Find number of posiible ways to represent **N** as a sum of at most five cubes.Given a integer N. Find number of possible ways to represent N as原创 2017-02-22 21:00:01 · 207 阅读 · 0 评论 -
SPOJ TRNGL 卡特兰数
Make Triangleno tags Chayanika loves Mathematics. She is learning a new chapter geometry. While reading the chapter a question came in her mind. Given a convex polygon of n sides. In how原创 2017-01-26 19:21:49 · 375 阅读 · 0 评论 -
Codeforces 767C 树形dp
Garlandtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOnce at New Year Dima had a dream in which he was p原创 2017-02-20 14:36:51 · 860 阅读 · 0 评论 -
SPOJ PUTNIK dp
PUTNIK - PutnikChances are that you have probably already heard of the travelling salesman problem. If you have, then you are aware that it is an NP-hard problem because it lacks an efficient原创 2017-02-19 16:38:23 · 304 阅读 · 0 评论 -
LightOJ 1125 dp
Divisible Group SumsGiven a list of N numbers you will be allowed to choose any M of them. So you can choose in NCM ways. You will have to determine how many of these chosen groups have a sum, which原创 2017-02-06 21:37:09 · 217 阅读 · 0 评论 -
LightOJ 1106 dp
Gone Fishing John is going on a fishing trip. He has h hours available, and there are n lakes in the area all reachable along a single, one-way road. John starts at lake 1, but he can finish at原创 2017-02-06 19:52:05 · 275 阅读 · 0 评论 -
BUAA 540 概率dp
多米诺骨牌时间限制: 2000 ms 内存限制: 131072 kb题目描述constroy 喜欢玩多米诺骨牌,他把若干块骨牌排列成一个 nn 行 mm 列的矩阵准备进行游戏。但是 constroy 太笨了,他无法用一次触碰使所有的骨牌全部倒下。于是,他从第一行第一列的骨牌开始检查,依次检查第一行第二列,第一行第三列,……,第二行第一列,第二行第二列,…原创 2016-12-18 23:32:02 · 894 阅读 · 0 评论 -
Codeforces 748E dp
Santa Claus and Tangerinestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSanta Claus has n tangerines, an原创 2016-12-27 15:39:11 · 414 阅读 · 0 评论 -
摇钱树 dp+贪心
摇钱树Time Limit: 1000MS Memory Limit: 1000KTotal Submissions: 106 Accepted: 33DescriptionCpg 正在游览一个梦中之城,在这个城市中有n棵摇钱树。。。这下,可让Cpg看傻了。。。可是Cpg只能在这个城市中呆K天,但是现在摇钱树已经成原创 2017-02-23 17:16:16 · 383 阅读 · 0 评论 -
BZOJ 4760 dp
Hoof, Paper, ScissorsTime Limit: 10 Sec Memory Limit: 128 MB[Submit][Status][Discuss]DescriptionYou have probably heard of the game "Rock, Paper, Scissors". The cows like to play a similar原创 2017-03-05 18:03:49 · 395 阅读 · 0 评论 -
HOJ contests 15 J dp
Birthday PartyTime limit : 1 sMemory limit : 512 mb 64bit Integer Format : %lldProblem DescriptionMr. Frog's birthday party will be held to原创 2017-05-11 16:37:06 · 272 阅读 · 0 评论 -
Codeforces gym 101343 J 状压dp
Husam and the Broken Present 2time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter you helped Husam and re原创 2017-04-16 18:18:04 · 1011 阅读 · 0 评论 -
Codeforces gym 101102 A dp
Coinstime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputHasan and Bahosain want to buy a new video game, they原创 2017-05-01 21:09:47 · 398 阅读 · 0 评论 -
Codeforces gym 101350A dp
Sherlock Bonestime limit per test1.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe great dog detective Sherlock Bones is原创 2017-04-29 21:04:48 · 821 阅读 · 0 评论 -
COCI 2016/2017 Round 4 C dp
Kile and Pogi have found N banknotes on the street. After making sure that the original owneris nowhere to be found, they decided to split the banknotes amongst themselves.In the end they want to “wi原创 2017-04-03 19:43:49 · 680 阅读 · 0 评论 -
SWERC'2016 F 树形DP+树状数组
Performance ReviewEmployee performance reviews are anecessary evil in any company. In a performance review, employees give writtenfeedback about each other on the work done recently. This feedback i原创 2017-03-26 18:59:40 · 510 阅读 · 0 评论 -
ZOJ 3956 dp
Course Selection SystemTime Limit: 1 Second Memory Limit: 65536 KBThere are n courses in the course selection system of Marjar University. The i-th course is described by two values: ha原创 2017-04-10 19:04:15 · 217 阅读 · 0 评论 -
Codeforces 580D 状压DP
Kefa and Dishestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWhen Kefa came to the restaurant and sat at原创 2017-03-09 12:52:12 · 431 阅读 · 0 评论 -
Codeforces 743D 树形dp
Chloe and pleasant prizestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGenerous sponsors of the olympiad原创 2016-12-17 15:46:09 · 597 阅读 · 0 评论 -
Codeforces 741B 并查集+dp
Arpa's weak amphitheater and Mehrdad's valuable Hosestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputJust t原创 2016-12-07 12:25:05 · 594 阅读 · 0 评论 -
HDU 3555 数位dp
BombTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Problem DescriptionThe counter-terrorists found a time bomb in the dust. But this time the terro原创 2016-08-06 21:56:10 · 185 阅读 · 0 评论 -
POJ 1159 dp
PalindromeTime Limit: 3000MS Memory Limit: 65536K DescriptionA palindrome is a symmetrical string, that is, a string read identically from left to right as well原创 2016-08-06 21:20:15 · 223 阅读 · 0 评论 -
HDU 3496 dp
Watch The MovieTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Problem DescriptionNew semester is coming, and DuoDuo has to go to school tomorrow. She de原创 2016-08-06 18:14:19 · 231 阅读 · 0 评论 -
HDU 5791 dp
TwoTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionAlice gets two sequences A and B. A easy problem comes. How many pair of sequence原创 2016-08-02 23:15:02 · 202 阅读 · 0 评论 -
HDU 5763 dp+kmp
Another MeaningTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionAs is known to all, in many cases, a word has two meanings. Suc原创 2016-07-28 21:54:30 · 1277 阅读 · 0 评论 -
POJ 1742 dp
CoinsTime Limit: 3000MS Memory Limit: 30000K DescriptionPeople in Silverland use coins.They have coins of value A1,A2,A3...An Silverland dollar.One day Tony opene原创 2016-05-25 00:40:45 · 234 阅读 · 0 评论 -
POJ 3616 dp
Milking TimeTime Limit: 1000MS Memory Limit: 65536K DescriptionBessie is such a hard-working cow. In fact, she is so focused on maximizing her productivity that原创 2016-05-20 17:51:02 · 278 阅读 · 0 评论 -
HAZU 等差数列 dp
Arithmetic SequenceTime Limit: 1 Sec Memory Limit: 128 MBDescription Giving a number sequence Awith length n, you should choosingm numbers fromA(ignore the order) which can for原创 2016-05-15 19:13:57 · 409 阅读 · 0 评论 -
HDU 3709 数位dp
Balanced NumberTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Problem DescriptionA balanced number is a non-negative integer that can be balanced if原创 2016-08-06 22:18:02 · 182 阅读 · 0 评论 -
Codeforces 55d 数位dp
Beautiful numberstime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVolodya is an odd boy and his taste is st原创 2016-08-06 22:28:33 · 257 阅读 · 0 评论 -
哈尔滨理工大学软件学院ACM程序设计全国邀请赛(网络同步赛)C Coin dp
Coin DescriptionBob will go to buy book. The price of thisbook is M. So Bob will take Ncoins, and the total value equals M. But the actual price for this book may beless than M. Bob wish the N c原创 2016-12-05 16:27:19 · 464 阅读 · 0 评论 -
2016-2017 ACM-ICPC, NEERC, Southern Subregional Contest J dp
Bottlestime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputNick has n bottles of soda left after his birthday.原创 2016-10-31 19:10:23 · 335 阅读 · 0 评论 -
Codeforces 706c dp
Hard problemtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasiliy is fond of solving different tasks. Tod原创 2016-08-13 21:57:51 · 236 阅读 · 0 评论 -
HDU 5965 dp+枚举
扫雷Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem Description扫雷游戏是晨晨和小璐特别喜欢的智力游戏,她俩最近沉迷其中无法自拔。该游戏的界面是一个矩阵,矩阵中有些格子中有一个地雷,其余格子中没有地雷。 游戏中,格子可能处于原创 2016-11-07 19:32:19 · 430 阅读 · 0 评论 -
HDU 5816 状压dp
HearthstoneTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionHearthstone is an online collectible card game from Blizzard Entertainment. S原创 2016-08-09 20:18:54 · 291 阅读 · 0 评论 -
HDU 5900 区间DP
QSC and MasterTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Problem DescriptionEvery school has some legends, Northeastern University is the same原创 2016-09-19 14:31:36 · 229 阅读 · 0 评论 -
HDU 5898 数位DP
odd-even numberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionFor a number,if the length of continuous odd digits is even and the l原创 2016-09-18 17:47:53 · 176 阅读 · 0 评论 -
Lightoj 1068 数位dp
InvestigationTime Limit: 2000MS Memory Limit: 32768KB 64bit IO Format: %lld & %lluDescriptionAn integer is divisible by 3 if the sum of its digits is also d原创 2016-08-06 21:48:27 · 261 阅读 · 0 评论 -
codeforces 1102F
传送门:http://codeforces.com/contest/1102/problem/F题意:给你一个n行m列的矩阵,你可以不限次数的交换任意两行形成一个新的矩阵,然后把这个矩阵的数按列写下来,使得任意两个相邻的差绝对值都大于等于k,求k的最大值。题解:n只有16,所以很容易想到状压dp,我们记录dp[i][j][k]在i状态下,头为j,尾为k的最大值,然后预处理任意两行放在一起的...原创 2019-01-16 13:07:32 · 892 阅读 · 0 评论