![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
动态规划
文章平均质量分 71
Lethelody
这个作者很懒,什么都没留下…
展开
-
BZOJ1827【Tree DP】
/* I will wait for you */#include#include#include#include#include#include#include#include#include#include#include#include#include#include#define make make_pair#define fi first#define原创 2015-04-02 18:17:42 · 370 阅读 · 0 评论 -
BZOJ2369【Tree DP】
/* I will wait for you */#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define make make_pair#define fi原创 2015-04-14 22:22:00 · 453 阅读 · 0 评论 -
BZOJ1231【状压DP】
/* I will wait for you*/#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define make make_pair#define fi原创 2015-04-16 16:11:40 · 447 阅读 · 0 评论 -
BZOJ1725【状压DP】
/* I will wait for you */#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define make make_pair#define fi原创 2015-04-17 12:16:25 · 623 阅读 · 0 评论 -
BZOJ2060【Tree DP】
/* I will wait for you */ #include #include #include #include #include #include #include #include #include #include #include #include原创 2015-04-17 12:19:55 · 399 阅读 · 0 评论 -
BZOJ4006【斯坦纳树】
/* I will wait for you */#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define make(a,b) make_pair(a,b)原创 2015-05-04 02:12:15 · 1076 阅读 · 0 评论 -
BZOJ2431【一般DP】
用前缀和优化一下就好了.然而暴力是可以过得./* I will wait for you*/ #include #include #include #include #include #include #include #include #include #include #include #include #i原创 2015-05-13 11:23:24 · 457 阅读 · 0 评论 -
BZOJ1415【概率DP】
/* I will wait for you */#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define make make_pair#define fi原创 2015-05-20 16:33:20 · 418 阅读 · 0 评论 -
BZOJ3590【状压DP】
/* I will wait for you*/#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define make make_pair#define fi原创 2015-04-20 10:28:16 · 1467 阅读 · 2 评论 -
BZOJ2435【TreeDP】
/* I will wait for you*/#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define make make_pair#define fi原创 2015-05-14 19:09:25 · 426 阅读 · 0 评论 -
BZOJ3743【Tree DP】
/* I will wait for you*/#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define make make_pair#define fi原创 2015-05-27 15:49:31 · 768 阅读 · 0 评论 -
BZOJ1925【动态规划】【组合数学】
用奇怪的姿势做出来了./* I will wait for you */ #include #include #include #include #include #include #include #include #include #include #include #include #include原创 2015-04-15 09:37:21 · 554 阅读 · 0 评论 -
BZOJ1097【状压DP】
/* I will wait for you */#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define make make_pair#define fi原创 2015-04-14 01:32:51 · 494 阅读 · 0 评论 -
BZOJ3675【斜率优化】
注意到判断斜率的时候.相等也要删除./* I will wait for you */ #include#include#include#include#include#include#include#include#include#include#include#include#include#include typedef long long LL;type原创 2015-03-31 17:02:19 · 567 阅读 · 0 评论 -
BZOJ1596【Tree DP】
#include#include#include#include#include#include#include#includeusing namespace std;const int maxn=100010;const int INF=1<<29;typedef long long LL;struct edge{ int v,next; }e[maxn];int原创 2015-04-02 18:19:02 · 465 阅读 · 0 评论 -
HDU4085【斯坦纳树】
用f[i][j]表示包含节点i.且关键点连通性为j的状态.不同子树形态:f[i][j]=min(f[i][u]+f[i][v]).直接枚举子集转移.边的松弛:f[i][j]=min(f[k][j]+w[i][k]).用SPFA进行转移.考虑到该题的最优解可能是生成森林.求出斯坦纳树以后还要DP./* I will wait for you */#include#include原创 2015-04-01 16:07:18 · 907 阅读 · 0 评论 -
BZOJ1131【Tree DP】
ans数组要用long long./* I will wait for you */#include#include#include#include#include#include#include#include#include#include#include#include#include#include#define make make_pair#defi原创 2015-04-01 23:44:48 · 333 阅读 · 0 评论 -
BZOJ1864【Tree DP】
读入是唯一的难点./* I will wait for you */#include#include#include#include#include#include#include#include#include#include#include#include#include#include#define make make_pair#define fi fi原创 2015-04-02 00:53:03 · 362 阅读 · 0 评论 -
BZOJ1912【Tree DP】
/* I will wait for you */#include#include#include#include#include#include#include#include#include#include#include#include#include#include#define make make_pair#define fi first#define原创 2015-04-04 02:20:45 · 413 阅读 · 0 评论 -
BZOJ1911【斜率优化】
/* I will wait for you */ #include#include#include#include#include#include#include#include#include#include#include#include#include#include#define make(a,b) make_pair(a,b)#define fi fi原创 2015-04-10 15:26:09 · 374 阅读 · 0 评论 -
BZOJ1296【动态规划】
/* I will wait for you */#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define make(a,b) make_pair(a,b)原创 2015-04-23 14:30:44 · 498 阅读 · 0 评论 -
BZOJ2216【决策单调性】
通过这题学习了决策单调性.顺便学习了wmg_1001【科学】的代码风格./* I will wait for you */ #include #include #include #include #include #include #include #include #include #include #include原创 2015-04-13 15:59:34 · 541 阅读 · 0 评论 -
BZOJ1087【状压DP】
又一发【科学】的代码风格./* I will wait for you */#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define make make_原创 2015-04-13 23:37:23 · 390 阅读 · 0 评论 -
HDOJ【5575】【单调栈】【可并堆】
好久木有做题啦!/* I will wait for you */#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define fi fi原创 2015-12-03 21:54:08 · 652 阅读 · 0 评论