
ACM->dp
文章平均质量分 54
Hehe_sunxin
这个作者很懒,什么都没留下…
展开
-
POJ - 1276 Cash Machine(多重背包)
#include #include #include #include #include #include #include #include #include #include #include #include using namespace std;typedef long long LL;typedef unsigned long long LLU;cons原创 2014-10-21 21:55:30 · 458 阅读 · 0 评论 -
HDU - 4405 Aeroplane chess(概率dp)
#include #include #include #include #include using namespace std;double d[110000];int n, m, line[110000];void dp(){ for(int i=n-1; i>=0; i--) { d[i]=0; if(line[i]!=-原创 2014-11-01 12:08:51 · 496 阅读 · 0 评论 -
CodeForces - 148D Bag of mice(概率dp)
用d[i][j]表示原创 2014-11-05 12:33:35 · 624 阅读 · 0 评论 -
HDU - 4336 Card Collector(概率dp)
#include #include #include #include #include using namespace std;double d[(1<<21)+100], p[22];int n;void dp(){ d[(1<<n)-1]=0; for(int i=(1=0; i--) { d[i]=0; doub原创 2014-11-01 15:03:43 · 614 阅读 · 0 评论 -
POJ - 2096 Collecting Bugs(概率dp)
d[ i ][ ]原创 2014-10-31 16:28:27 · 502 阅读 · 0 评论 -
HDU - 5001 Walk(概率dp)
依次枚举每一个点,计算每一个点不可能到达的概率。原创 2014-11-04 20:06:33 · 510 阅读 · 0 评论 -
CF - 100513F Ilya Muromets(dp)
这是NEERC比赛重现的原创 2014-11-03 16:31:21 · 731 阅读 · 0 评论 -
HDU - 5087 Revenge of LIS II
用一个mark原创 2014-11-02 09:56:14 · 536 阅读 · 0 评论 -
ZOJ - 3329 One Person Game(概率dp)
用d[ i ]表示点数为i时还需要掷原创 2014-11-01 18:35:51 · 465 阅读 · 0 评论 -
ZOJ - 3822 Domination(概率dp)
开始原创 2014-10-30 20:46:28 · 523 阅读 · 0 评论 -
UVa 10118 - Free Candies(dp)
其实只要想明白了原创 2014-10-15 16:42:12 · 535 阅读 · 0 评论 -
HDU 4035 Maze(概率dp)
这个原创 2014-11-09 17:32:17 · 554 阅读 · 0 评论 -
UVA - 437 The Tower of Babylon
把每个立方体分成是3个,前两个参数表示原创 2014-10-24 12:25:48 · 494 阅读 · 0 评论 -
UVA 242 - Stamps and Envelope Size
WA了一晚上原创 2014-10-25 11:10:15 · 807 阅读 · 0 评论 -
UVA - 10163 - Storage Keepers(两次dp)
要进行两次dp:第一次,d[]]原创 2014-10-27 19:26:09 · 558 阅读 · 0 评论 -
HDU - 4800 Josephina and RPG(dp)
d[ i ][ j ]表示打完第i个电脑队伍,选择的原创 2014-10-09 19:06:43 · 669 阅读 · 0 评论 -
POJ - 3974 Palindrome(Manacher算法模板题)
我就是来存个模板原创 2014-11-14 10:48:59 · 726 阅读 · 0 评论 -
hdu4991 - Ordered Subsequence (树状数组优化)
这个题是bestcoder #8 的第三个。 比赛时用O(n*n)的dp做超时。 赛后看了hdu官网的题解, 用树状数组优化O(n*n*m)的dp。弱渣开眼了。。。首先数字有1万个,先离散化一下,把所有数字对应到1到n之间。这样对结果不影响。dp[i][j]代表以第i个数字结尾上升子序列长度为j的种数。if(a[i]>a[k] && i>k) dp[i][j]=su原创 2014-09-08 22:29:09 · 545 阅读 · 0 评论 -
HDU - 4276 The Ghost Blows Light(spfa + 树上dp)
2012年长春网络赛的题目。原创 2014-09-27 21:57:42 · 522 阅读 · 0 评论 -
ZOJ - 3640 Help Me Escape(概率dp)
这题卡时间卡得很紧。原创 2014-11-03 11:35:30 · 613 阅读 · 0 评论