DP
文章平均质量分 59
BehappyXiang
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Codeforces 11D A Simple Task (状态压缩DP)
给你N个点和M条边,求当中包含的简单路径的个数。 网上看的题解,其实就是求哈密顿回路数,但是是无向图而且至少由三个点组成。 http://codeforces.com/blog/entry/337 #include #include #include #include using namespace std; typedef long long ll; const ll maxm=1原创 2013-02-01 14:54:45 · 1096 阅读 · 0 评论 -
POJ3211Washing Clothes
Washing Clothes Time Limit: 1000MS Memory Limit: 131072K Total Submissions: 7673 Accepted: 2333 Description Dearboy was so busy recently that now he has piles of clot原创 2013-02-02 17:44:46 · 615 阅读 · 0 评论 -
Codeforces 14E Camels (DP)
题意:给你一个数N,从1到N形成t个波峰和t-1个波谷,总共有多少种情况。 思路:将问题分解为求2*t-1个转折点,设dp[x][y][t]为当最后一点落在(x,y)上时,出现t个转折点的总数。那么对于当前点有两种情况,他的前一个点到当前点要么高度比他大,要么比他小。若当前点(x,y)之前出现了t个转折点,若t为偶数,也就是说只要前一个点落点在当前点的下方,当前状态要想保持任然只出现偶数t个转折原创 2013-01-18 10:24:21 · 938 阅读 · 0 评论 -
POJ 1179 Polygon (DP)
Polygon Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 4264 Accepted: 1765 Description Polygon is a game for one player that starts on a polygon with N ve原创 2013-02-05 12:00:31 · 525 阅读 · 0 评论 -
POJ 1949 Chores(树状DP)
Chores Time Limit: 3000MS Memory Limit: 30000K Total Submissions: 4516 Accepted: 2114 Description Farmer John's family pitches in with the chores during milking, doin原创 2013-03-02 18:26:55 · 677 阅读 · 0 评论
分享