
普通dp
zzcblogs
这个作者很懒,什么都没留下…
展开
-
The Debut Album (dp + 滚动数组)
G - The Debut Album URAL - 2018 #include #include #include #include #include #include using namespace std;const int mod = 1000000007;int dp[2][2][505];int main() { int n, a, b;原创 2017-05-02 08:55:33 · 308 阅读 · 0 评论 -
BZOJ 1003 物流运输(SPFA+dp)
1003: [ZJOI2006]物流运输Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 8777 Solved: 3732[Submit][Status][Discuss]Description 物流公司要把一批货物从码头A运到码头B。由于货物量比较大,需要n天才能运完。货物运输过程中一般要转停好几个码头。物流公司通常原创 2017-11-27 17:10:29 · 315 阅读 · 0 评论 -
HOJ 2577 How to Type(dp)
How to TypeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7314 Accepted Submission(s): 3321Problem DescriptionPirates have f原创 2017-12-02 11:04:10 · 297 阅读 · 0 评论 -
HOJ 5199 Happy Matt Friends (暴力dp)
Happy Matt FriendsTime Limit: 6000/6000 MS (Java/Others) Memory Limit: 510000/510000 K (Java/Others)Total Submission(s): 4863 Accepted Submission(s): 1841Problem DescriptionMatt原创 2017-12-02 10:00:07 · 267 阅读 · 0 评论 -
HUD 1300 Pearls (水 dp)
PearlsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2908 Accepted Submission(s): 1457Problem DescriptionIn Pearlania everyb原创 2017-12-10 21:05:11 · 325 阅读 · 0 评论 -
nlogn求最长上升子序列长度(二分 找序列)
最长上升子序列O(nlogn)解法 在一列数中寻找一些数,这些数满足:任意两个数a[i]和a[j],若i设dp[i]表示以i为结尾的最长递增子序列的长度,则状态转移方程为:dp[i] = max{dp[j]+1}, 1考虑两个数a[x]和a[y],x按dp[t]=k来分类,只需保留dp[t]=k的所有a[t]中的最小值,设g[k]记录这个值,g[转载 2017-09-12 15:06:10 · 355 阅读 · 0 评论 -
hdu-6170. Two strings (2017多校联赛 dp)
Two stringsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1615 Accepted Submission(s): 639Problem DescriptionGiving two stri原创 2017-08-30 10:58:35 · 292 阅读 · 0 评论 -
10. Regular Expression Matching (dp)
Implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The matching should cover the entire input st原创 2017-08-30 10:12:10 · 297 阅读 · 0 评论 -
Codeforces 834D The Bakery【dp+线段树】
B. The Bakerytime limit per test 2.5secondsmemory limit per test 256megabytes Some time ago Slastyona the Sweetmaid decided to open her ownbakery! She bought required ingredi原创 2017-08-16 19:08:56 · 323 阅读 · 0 评论 -
WuKong (Floyd + dp)
WuKongTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 223 Accepted Submission(s): 95 Problem DescriptionLiyua原创 2017-07-03 10:50:41 · 389 阅读 · 0 评论 -
数塔 (简单dp
数塔Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 854 Accepted Submission(s): 671Problem Description在讲述DP算法原创 2017-04-16 19:35:09 · 575 阅读 · 0 评论 -
HDU 1176 免费馅饼(普通dp
免费馅饼Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9485 Accepted Submission(s): 3074Problem Description都说天上不会掉馅饼,但有一天gam转载 2017-04-16 19:42:56 · 288 阅读 · 0 评论 -
背包模板
#include #include #include #include #include #include #include #include #include typedef long long ll;using namespace std;const int MAX = 100000000;int a[MAX], dp[MAX];void Zero_packpage(原创 2017-04-17 20:19:17 · 263 阅读 · 0 评论 -
Humble Numbers 丑数 简单dp(思路
Humble NumbersTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1198 Accepted Submission(s): 645 Problem Descriptio原创 2017-04-16 17:18:56 · 407 阅读 · 0 评论 -
Super Jumping! Jumping! Jumping! (经典dp最大升序字段和)
Super Jumping! Jumping! Jumping!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1268 Accepted Submission(s): 690原创 2017-04-16 16:43:52 · 524 阅读 · 0 评论 -
Max Sum 初等dp
Max SumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1992 Accepted Submission(s): 758Problem DescriptionG原创 2017-04-16 16:18:01 · 377 阅读 · 0 评论 -
cf F1. Stock Trading (dp)
F1. Stock Tradingtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThis problem consists of three subproblems: for solving subproblem F1 you will re...原创 2018-04-21 23:20:15 · 527 阅读 · 0 评论