ACM_各种DP
bless295
人一我十,人十我万,永不放弃——kuangbin
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
And Then There Was One----DP
题目链接:http://vjudge.net/contest/136644#problem/Auva 1394果然我还是太渣了,DP专题里的最简单的一个DP我都没做出来。问题描述:n个人(编号0~(n-1)),从0开始报数,报到(m-1)的退出,剩下的人继续从0开始报数。求胜利者的编号。一个约瑟夫环的问题,很经典,上来我用链表敲了一发,我知道不取余绝对的原创 2016-10-21 20:08:59 · 263 阅读 · 0 评论 -
B. Working out----暴力dp
B. Working outtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSummer is coming! It's time for Iahub and Ia原创 2017-04-10 16:01:24 · 535 阅读 · 0 评论 -
B - Pick The Sticks ----01背包
The story happened long long ago. One day, Cao Cao made a special order called "Chicken Rib" to his army. No one got his point and all became very panic. However, Cao Cao himself felt very proud of hi原创 2017-04-17 19:35:28 · 293 阅读 · 0 评论 -
F. Training Plan--类似区间dp
F. Training PlanTime Limit: 5000msMemory Limit: 262144KB64-bit integer IO format: %lld Java class name: MainSubmit Status PID: 51640小Q同学为了准备今年的ICPC Regional,计划在天之内刷掉道题原创 2017-04-05 13:35:44 · 313 阅读 · 0 评论 -
CF----思维排序+01背包 山东省第八届省赛K题
CFTime Limit: 1000MS Memory Limit: 65536KBSubmit StatisticProblem DescriptionLYD loves codeforces since there are many Russian contests. In an contest lasting for T minutes there are原创 2017-05-10 20:01:32 · 642 阅读 · 0 评论 -
H - The Battle of Chibi ----dp+树状数组
Cao Cao made up a big army and was going to invade the whole South China. Yu Zhou was worried about it. He thought the only way to beat Cao Cao is to have a spy in Cao Cao's army. But all generals and原创 2017-04-21 21:02:51 · 430 阅读 · 0 评论 -
Seven Segment Display----数位dp
Seven Segment DisplayTime Limit: 2 Seconds Memory Limit: 65536 KBA seven segment display, or seven segment indicator, is a form of electronic display device for displaying decimal numer原创 2017-04-23 09:28:22 · 869 阅读 · 3 评论 -
Problem A: Little Red Riding Hood----普通dp
Problem A: Little Red Riding HoodTime Limit: 1 Sec Memory Limit: 1280 MBSubmit: 876 Solved: 139[Submit][Status][Web Board]Description Once upon a time, there was a little gi原创 2017-04-24 18:50:30 · 499 阅读 · 0 评论 -
B. Free Market----暴力+dp
B. Free Markettime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputJohn Doe has recently found a "Free Market" i原创 2017-08-10 18:18:20 · 342 阅读 · 0 评论 -
C. Dima and Salad----01背包
C. Dima and Saladtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDima, Inna and Seryozha have gathered in a原创 2017-08-10 18:01:53 · 605 阅读 · 1 评论 -
关于dp问题的反思
关于dp问题的一点小反思今天经过与金桔的谈话,发现以前做的dp根本就没有好好反思过。在以前做dp题的时候,要么就是比较明显的dp,要么就是慢慢可以推出状态转移方程来的,根本就没有认真的想过到底什么是dp题,什么是非dp题,而掌握了这种技巧则可以省下大量的时间。首先建议大家先去看dalao的博客,写的很好http://blog.youkuaiyun.com/cangchen/article/de原创 2017-07-27 23:11:00 · 428 阅读 · 0 评论 -
B. Counting Rectangles is Fun----dp
B. Counting Rectangles is Funtime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is an n × m rectangular原创 2017-08-20 10:33:52 · 447 阅读 · 0 评论 -
C. Watching Fireworks is Fun---dp
C. Watching Fireworks is Funtime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA festival will be held in a t原创 2017-08-20 10:38:12 · 468 阅读 · 0 评论 -
百度之星复赛--Pokémon GO----dp
Pokémon GOAccepts: 738Submissions: 1725Time Limit: 3000/1500 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem Description众所周知,度度熊最近沉迷于 Pokémon GO。今天原创 2017-08-20 10:52:42 · 347 阅读 · 0 评论 -
百度之星复赛--Valley Numer----数位dp
Valley NumerAccepts: 548Submissions: 1125Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem Description众所周知,度度熊非常喜欢数字。它最近发明了一种新的数字原创 2017-08-20 10:58:42 · 309 阅读 · 0 评论 -
百度之星初赛(B)--Chess---简单dp
ChessAccepts: 1805Submissions: 5738Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem Description車是中国象棋中的一种棋子,它能攻击同一行或同一列中没有其他棋子阻隔的棋原创 2017-08-13 22:21:44 · 440 阅读 · 0 评论 -
C. Valera and Elections----树形dp
C. Valera and Electionstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe city Valera lives in is going to原创 2017-08-15 00:09:45 · 366 阅读 · 0 评论 -
L3-003. 社交集群----并查集
L3-003. 社交集群时间限制1000 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者陈越在社交网络平台注册时,用户通常会输入自己的兴趣爱好,以便找到和自己兴趣相投的朋友。有部分兴趣相同的人们就形成了“社交集群”。现原创 2017-03-16 19:50:08 · 995 阅读 · 0 评论 -
IGAME - Interesting Game----Nim博弈+数位DP
IGAME - Interesting Gameno tags Alice and Bob play an interesting game and the game is played on a number.So a player, on his chance, can choose any non zero digit of the number an原创 2017-02-21 14:55:23 · 449 阅读 · 0 评论 -
炮兵阵地----状压DP
炮兵阵地Time Limit: 2000MS Memory Limit: 65536KTotal Submissions: 26858 Accepted: 10381Description司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),原创 2017-02-14 14:08:17 · 294 阅读 · 0 评论 -
Balance--DP
BalanceTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 13527 Accepted: 8476DescriptionGigel has a strange "balance" and he wants to poise it. Actually原创 2016-08-14 21:07:18 · 357 阅读 · 0 评论 -
Human Gene Functions--DP
Human Gene FunctionsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 18910 Accepted: 10531DescriptionIt is well known that a human gene can be consider原创 2016-08-03 11:21:41 · 231 阅读 · 0 评论 -
Pearls--DP
PearlsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 8725 Accepted: 4361DescriptionIn Pearlania everybody is fond of pearls. One company, called The原创 2016-08-03 09:05:40 · 342 阅读 · 0 评论 -
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): 24618 Accepted Submission(s): 8461Problem DescriptionNow I t原创 2016-06-08 00:02:47 · 435 阅读 · 0 评论 -
Anniversary party--树形DP
Anniversary partyTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9692 Accepted Submission(s): 4153Problem DescriptionThere is原创 2016-10-21 20:43:41 · 268 阅读 · 0 评论 -
棋盘分割--记忆化搜索
棋盘分割Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 14532 Accepted: 5201Description将一个8*8的棋盘进行如下分割:将原棋盘割下一块矩形棋盘并使剩下部分也是矩形,再将剩下的部分继续如此分割,这样割了(n-1)次后,连同原创 2016-11-17 15:39:08 · 346 阅读 · 0 评论 -
The Lost House--经典树形DP
The Lost HouseTime Limit: 3000MS Memory Limit: 30000KTotal Submissions: 2661 Accepted: 1129DescriptionOne day a snail climbed up to a big tree and finally came原创 2016-11-22 13:18:22 · 567 阅读 · 0 评论 -
Rebuilding Roads--树形DP
Rebuilding RoadsTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 11497 Accepted: 5278DescriptionThe cows have reconstructed Farmer John's farm, with it原创 2016-11-24 16:50:35 · 468 阅读 · 0 评论 -
Apple Tree--树形DP
Apple TreeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10150 Accepted: 3374DescriptionWshxzt is a lovely girl. She likes apple very much. One day H原创 2016-11-28 10:48:10 · 671 阅读 · 0 评论 -
Football----概率DP
FootballTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5186 Accepted: 2644DescriptionConsider a single-elimination football tournament involving 2n原创 2017-02-06 20:57:43 · 394 阅读 · 0 评论 -
ZOJ 3777 11th省赛 B Problem Arrangement【状态压缩DP】
题目链接http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5264思路题意就是n个题目,第i个题目放到第j个位置的有趣值是p[i][j],问你随机排列使得有趣值总和大于等于m的期望值是多少。 这个期望值很好算就是n!/cnt。直接dfs会超时,这里用到了DP,而DP的话,如果设dp[i][j]表示放转载 2017-01-16 14:00:57 · 426 阅读 · 0 评论 -
题目1 : 建造基地----完全背包
时间限制:10000ms单点时限:1000ms内存限制:256MB描述在遥远的未来,小Hi成为了地球联邦外空间联合开发工作组的一员,前往一颗新发现的星球开发当地的重金属资源。为了能够在当地生存下来,小Hi首先要建立一个基地。建立基地的材料可以直接使用当地的石材和富裕的重金属资源。基地建设分为N级,每一级都需要达成K的建设值后才能够完成建设,当前级别的原创 2017-02-16 15:06:20 · 381 阅读 · 0 评论 -
E. Mahmoud and a xor trip----树形DP
E. Mahmoud and a xor triptime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMahmoud and Ehab live in a countr原创 2017-02-08 21:29:35 · 637 阅读 · 0 评论 -
C. Mahmoud and a Message----基础DP
C. Mahmoud and a Messagetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMahmoud wrote a message s of lengt原创 2017-02-08 10:53:12 · 469 阅读 · 0 评论 -
Mondriaan's Dream----状压DP
Mondriaan's DreamTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 16013 Accepted: 9267DescriptionSquares and rectangles fascinated the famous Dutch pai原创 2017-02-13 19:34:10 · 264 阅读 · 0 评论 -
Corn Fields----状压DP
Corn FieldsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 14230 Accepted: 7460DescriptionFarmer John has purchased a lush new rectangular pasture com原创 2017-02-14 09:37:01 · 294 阅读 · 0 评论 -
B. Maximum Submatrix 2----dp
B. Maximum Submatrix 2time limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputYou are given a matrix consisting of原创 2017-08-23 15:11:16 · 431 阅读 · 0 评论
分享