
我就是DP
文章平均质量分 81
笑着走完自己的路
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Codeforces 607A Chain Reaction 【二分 + dp】
A. Chain Reactiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n beacons located at distinct p原创 2016-01-03 12:44:10 · 1080 阅读 · 0 评论 -
hdoj 5617 Jam's maze 【dp】
Jam's mazeTime Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 48 Accepted Submission(s): 17Problem DescriptionJam got into a maze原创 2016-01-31 19:27:58 · 722 阅读 · 1 评论 -
Codeforces 621B Wet Shark and Bishops 【dp】
B. Wet Shark and Bishopstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputToday, Wet Shark is given n bishop原创 2016-02-01 14:03:49 · 601 阅读 · 0 评论 -
hdoj 2224 && poj 2677 The shortest path 【TSP】
The shortest pathTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1174 Accepted Submission(s): 597Problem DescriptionThere are原创 2016-01-14 20:22:31 · 438 阅读 · 0 评论 -
hdoj 4824 Disk Schedule 【TSP】
Disk ScheduleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 384 Accepted Submission(s): 176Problem Description有很多从磁盘读取数据的需求,原创 2016-01-14 20:23:15 · 388 阅读 · 0 评论 -
hdoj 4826 Labyrinth 【dp】
LabyrinthTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 556 Accepted Submission(s): 255Problem Description度度熊是一只喜欢探险的熊,一次偶然落原创 2016-01-14 20:24:12 · 406 阅读 · 0 评论 -
蓝桥杯 垒骰子 【矩阵加速dp】
垒骰子赌圣atm晚年迷恋上了垒骰子,就是把骰子一个垒在另一个上边,不能歪歪扭扭,要垒成方柱体。经过长期观察,atm 发现了稳定骰子的奥秘:有些数字的面贴着会互相排斥!我们先来规范一下骰子:1 的对面是 4,2 的对面是 5,3 的对面是 6。假设有 m 组互斥现象,每组中的那两个数字的面紧贴在一起,骰子就不能稳定的垒起来。 atm想计算一下有多少种不同的可能的垒骰子方式。原创 2016-03-03 14:22:36 · 1385 阅读 · 0 评论 -
Codeforces 621E Wet Shark and Blocks 【矩阵加速dp】
E. Wet Shark and Blockstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are b blocks of digits. Each原创 2016-02-01 14:04:20 · 961 阅读 · 0 评论 -
hdoj 5653 Bomber Man wants to bomb an Array. 【dp】
题目链接:hdoj 5653 Bomber Man wants to bomb an Array.原创 2016-03-29 15:26:39 · 387 阅读 · 0 评论 -
NBUT 1593 Max Sum 【环上最大子段和】
题目:链接题意:求环上的最大子段和。醉了因为long long WA成狗了,用__int64。。。思路一:考虑以a[i]结尾的状态。状态来源有两个1,区间[j, i]的和(1来源1——直接dp就好了。 来源2——维护区间[i+1, n]的最大后缀和即可。思路二:记sum为总和,求出最大子段和sum1和最小子段和sum2,取max(sum1, sum-sum2原创 2016-03-04 17:21:11 · 569 阅读 · 0 评论 -
Codeforces 622C Not Equal on a Segment 【线段树 or dp】
C. Not Equal on a Segmenttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given array a with n integ原创 2016-02-13 18:20:43 · 630 阅读 · 0 评论 -
lightoj 1085 - All Possible Increasing Subsequences 【树状数组优化dp】
1085 - All Possible Increasing SubsequencesPDF (English)StatisticsForumTime Limit: 3 second(s)Memory Limit: 64 MBAn increasing subsequence from a sequen原创 2015-12-24 15:04:27 · 659 阅读 · 0 评论 -
hihoCoder week 84 P1 : Lucky Substrings 【dp】
P1 : Lucky SubstringsTime Limit:10000msCase Time Limit:1000msMemory Limit:256MBDescriptionA string s is LUCKY if and only if the number of different characters in s is a原创 2016-02-10 18:57:49 · 523 阅读 · 0 评论 -
poj 2385 Apple Catching 【暴力dp】
Apple CatchingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9790 Accepted: 4763DescriptionIt is a little known fact that cows love apples. Farmer Jo原创 2015-12-20 12:02:24 · 528 阅读 · 0 评论 -
poj 3616 Milking Time 【dp】
Milking TimeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6534 Accepted: 2745DescriptionBessie is such a hard-working cow. In fact, she is so focuse原创 2015-12-20 15:01:58 · 408 阅读 · 0 评论 -
Codeforces 602B Approximating a Constant Range 【dp + 二分】
B. Approximating a Constant Rangetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWhen Xellos was doing a p原创 2015-12-03 16:36:58 · 936 阅读 · 0 评论 -
Codeforces 617B Chocolate 【dp】
B. Chocolatetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBob loves everything sweet. His favorite chocol原创 2016-01-24 16:24:08 · 884 阅读 · 0 评论 -
zoj 3349 Special Subsequence 【离散化二分 + 线段树优化dp】
Special SubsequenceTime Limit: 5 Seconds Memory Limit: 32768 KBThere a sequence S with n integers , and A is a special subsequence that satisfies |Ai-Ai-1| d ( 0 Now your task is to f原创 2015-12-05 21:53:44 · 530 阅读 · 0 评论 -
nyoj 10 skiing 【记忆化】
skiing时间限制:3000 ms | 内存限制:65535 KB难度:5描述Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3原创 2016-01-09 02:50:51 · 374 阅读 · 0 评论 -
Codeforces 615B Longtail Hedgehog 【dp】
B. Longtail Hedgehogtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThis Christmas Santa gave Masha a magi原创 2016-01-09 02:54:12 · 969 阅读 · 0 评论 -
zzulioj 1818: squee_spoon and his Cube VI 【dp】
1818: squee_spoon and his Cube VITime Limit: 1 Sec Memory Limit: 128 MBSubmit: 58 Solved: 14SubmitStatusWeb BoardDescription市面上最常见的魔方,是三阶魔方,英文名为Rubik's Cube,以魔方的发明者鲁比克教授的名字命名。另外,二阶魔方原创 2015-12-09 17:06:02 · 537 阅读 · 0 评论 -
hdoj 5623 KK's Number 【dp】
KK's NumberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 146 Accepted Submission(s): 88Problem DescriptionOur lovely KK has原创 2016-02-10 18:57:07 · 439 阅读 · 0 评论 -
zzuoj 10403: D.山区修路 【线段树优化dp】
10403: D.山区修路Time Limit: 2 Sec Memory Limit: 128 MBSubmit: 76 Solved: 24[Submit][Status][Web Board]Description某山区的孩子们上学必须经过一条凹凸不平的土路,每当下雨天,孩子们非常艰难。现在村里走出来的Dr. Kong决定募捐资金重新修建着条路。由于资金有限,原创 2016-03-04 17:22:41 · 942 阅读 · 1 评论 -
Codeforces 645D Robot Rapping Results Report 【dp】
题目链接:Codeforces 655D Robot Rapping Results Report原创 2016-03-19 12:28:02 · 628 阅读 · 0 评论 -
zzuoj 10452: "分"数 【dp】
题目链接:zzuoj 10452: “分”数10452: “分”数 Time Limit: 1 Sec Memory Limit: 128 MB Submit: 111 Solved: 20 [Submit][Status][Web Board] Description 有一个由偶数个正整数组成的无序数组,现在小D想:怎样把这个含有偶数(2*n)个数的数组分为两个元素个数相等的数原创 2016-04-10 11:33:41 · 381 阅读 · 0 评论 -
Codeforces 652C Foe Pairs 【dp】
题目链接:Codeforces 652C Foe PairsC. Foe Pairs time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given a permutation p of length n. Al原创 2016-03-29 12:10:22 · 671 阅读 · 0 评论 -
Codeforces 165E Compatible Numbers 【dp】
题目链接:Codeforces 165E Compatible NumbersE. Compatible Numbers time limit per test4 seconds memory limit per test256 megabytes inputstandard input outputstandard output Two integers x and y are c原创 2016-05-07 14:56:21 · 1203 阅读 · 0 评论 -
hdoj 1078 FatMouse and Cheese 【dp】
题目链接:hdoj 1078 FatMouse and CheeseFatMouse and CheeseTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7781 Accepted Submission(s): 3223原创 2016-05-01 12:18:40 · 472 阅读 · 0 评论 -
hdoj 1505 City Game 【dp or 单调栈】
题目链接:hdoj 1505 City GameCity GameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6223 Accepted Submission(s): 2657Problem Description原创 2016-05-02 21:52:03 · 503 阅读 · 0 评论 -
Codeforces 667C Reberland Linguistics 【dp】
题目链接:Codeforces 667C Reberland LinguisticsC. Reberland Linguistics time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output First-rate specialist原创 2016-05-14 16:45:42 · 927 阅读 · 0 评论 -
uva 4260 - Fortune Card Game 【dp】
题目链接:uva 4260 - Fortune Card GameA popular card game called fortune" is getting popular in country X. Fig. 1 shows one of the cards. In each card, a positive integer number (20 in the figure) is lis原创 2016-05-14 16:46:23 · 405 阅读 · 0 评论 -
Codeforces 554C Kyoya and Colored Balls 【dp + 组合数学】
题目链接:Codeforces 554C Kyoya and Colored BallsC. Kyoya and Colored Balls time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Kyoya Ootori has a原创 2016-04-21 18:28:26 · 744 阅读 · 0 评论 -
Codeforces 671A Recycling Bottles 【dp】
题目链接:Codeforces 672C Recycling BottlesC. Recycling Bottles time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output It was recycling day in Keko原创 2016-06-16 22:35:16 · 477 阅读 · 0 评论 -
lightoj 1017 - Brush (III) 【离散化 + dp】
题目链接:lightoj 1017 1017 - Brush (III)1017 - Brush (III) PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB Samir returned home from the contest and got angry after原创 2016-04-13 22:16:37 · 645 阅读 · 0 评论 -
lightoj 1004 - Monkey Banana Problem 【dp】
题目链接:lightoj 1004 - Monkey Banana Problem1004 - Monkey Banana Problem PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB You are in the world of mathematics to sol原创 2016-04-07 17:53:26 · 663 阅读 · 0 评论 -
Codeforces 588D Duff in Beach 【离散化 + dp】
题目链接:Codeforces 588D Duff in BeachD. Duff in Beach time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output While Duff was resting in the beach,原创 2016-04-07 17:20:16 · 623 阅读 · 0 评论 -
蓝桥杯 地宫寻宝 【dp】
问题描述 X 国王有一个地宫宝库。是 n x m 个格子的矩阵。每个格子放一件宝贝。每个宝贝贴着价值标签。 地宫的入口在左上角,出口在右下角。 小明被带到地宫的入口,国王要求他只能向右或向下行走。 走过某个格子时,如果那个格子中的宝贝价值比小明手中任意宝贝价值都大,小明就可以拿起它(当然,也可以不拿)。 当小明走到出口时,如果他手中的宝贝恰好是k件,则这些宝贝就可以送原创 2016-03-19 21:40:46 · 1118 阅读 · 6 评论 -
hdoj 1428 漫步校园 【dp + 最短路】
题目链接:hdoj 1428 漫步校园漫步校园Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3754 Accepted Submission(s): 1140Problem Description LL最近沉迷于A原创 2016-04-04 16:29:28 · 603 阅读 · 0 评论 -
hdoj 5656 CA Loves GCD 【dp】
题目链接:hdoj 5656 CA Loves GCD问题描述 CA喜欢是一个热爱党和人民的优秀同♂志,所以他也非常喜欢GCD(请在输入法中输入GCD得到CA喜欢GCD的原因)。 现在他有N个不同的数,每次他会从中选出若干个(至少一个数),求出所有数的GCD然后放回去。 为了使自己不会无聊,CA会把每种不同的选法都选一遍,CA想知道他得到的所有GCD的和是多少。 我们认为两种选法不同,原创 2016-04-04 16:30:28 · 391 阅读 · 0 评论 -
hihoCoder #1270 : 建造基地 【dp】
题目链接:hihoCoder #1270 : 建造基地原创 2016-03-12 19:01:30 · 405 阅读 · 0 评论