摘要: 题目链接 "luogu [TJOI2007]线段" 题解 dp[i][0/1]第i行在左/右端点的最短路 瞎转移 代码 c++ include using namespace std; inline int read() { int x= 0 ,f = 1; char c = getchar(); 阅读全文
posted @ 2018-07-23 21:33 zzzzx 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 题目链接 "luogu P2770 航空路线问题" 题解 求两条点数最多的互不相交路径 拆点限流,连流量1费用2的边,起.终点流量为2的边 代码 c++ include using namespace std; inline int read() { int x = 0,f = 1; char c 阅读全文
posted @ 2018-07-23 21:26 zzzzx 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 题目链接 "bzoj2302: [HAOI2011]Problem c" 题解 s[i]表示m个人中编号 i的人数 设dp[i][j] 表示在剩余人中编号大于i的有j的方案数 $dp[i][j] = \sum_{k = 0}^j dp[i + 1][k] C_j^{j k};$ 代码 c++ inc 阅读全文
posted @ 2018-07-23 19:25 zzzzx 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 题目链接 "bzoj3545: [ONTAK2010]Peaks" 题解 对于 using namespace std; inline int read() { int x = 0,f = 1; char c = getchar(); while(c '9') {if(c == ' ')f = 1; 阅读全文
posted @ 2018-07-23 15:33 zzzzx 阅读(165) 评论(0) 推荐(0) 编辑