上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 83 下一页
摘要: 题目链接 "luogu P3950 部落冲突" 题解 树剖线段树可以 lct还行 代码 c++ include include inline int read() { int x = 0,f = 1; char c = getchar(); while(c '9')c = getchar(); wh 阅读全文
posted @ 2018-08-12 22:00 zzzzx 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 题目链接 "luogu P2757 [国家集训队]等差子序列" 题解 线段树好题 我选择暴力 代码 c++ // luogu judger enable o2 include inline int read() { int x = 0,f = 1; char c = getchar(); while 阅读全文
posted @ 2018-08-12 21:59 zzzzx 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 题目链接 " P1502 窗口的星星" 题解 扫描线+线段树 线段树的每一个节点处理的是左边框放在当前x 1位置时的框内星星的亮度大小 按照x坐标进行离散化,得到离散化后每一个坐标x的可影响的范围 维护扫描线,扫到可以加某颗星星就把星星加进去,扫到该出来的时候就把星星搞出来,线段树维护一下 代码 c 阅读全文
posted @ 2018-08-12 07:31 zzzzx 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 题目链接 "bzoj3534: [Sdoi2014]重建" 题解 答案为所有合法生成树的概率之和 一个合法的生成树出现概率为选取边的概率积乘未选取边不出现概率 那么答案就是 $\prod_e (1 p_e)\sum_T \prod_{e\in T} {p_e \over (1 p_e) }$ 计算的 阅读全文
posted @ 2018-08-12 07:26 zzzzx 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 题目链接 "bzoj5068: 友好的生物" 题解 最大化这个东西$\sum_{i=1}^{k 1} | a_{x,i} a_{y,i} | | a_{x,k} a_{y,k} |$ 去掉绝对值号,也就是就是求这个式子 $\sum_{i=1}^{k 1}±(a_{x,i} a_{y,i}) | a_ 阅读全文
posted @ 2018-08-11 21:57 zzzzx 阅读(176) 评论(2) 推荐(0) 编辑
摘要: 题目链接 "bzoj2875: [Noi2012]随机数生成器" 题解 递推式有了,那就愉快的矩阵快速幂 代码 阅读全文
posted @ 2018-08-11 21:55 zzzzx 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 题目链接 "bzoj1297: [SCOI2009]迷路" 题解 若边权为1就是个矩阵快速幂裸题 因为权值 include include inline int read() { int x = 0,f = 1; char c = getchar(); while(c '9')c = getchar 阅读全文
posted @ 2018-08-10 21:14 zzzzx 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 题目链接 "bzoj3123: [Sdoi2013]森林" 题解 树上差分+主席树启发式合并 代码 c++ include include include inline int read() { int x = 0,f = 1; char c = getchar(); while(c '9') c 阅读全文
posted @ 2018-08-10 07:16 zzzzx 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 题目链接 "luogu P1663 山" 题解 只需要求出下凸包的最低点就好了 显然是由两个斜率相反的直线相交来的 盼下最低点为直线的情况 代码 c++ include include include inline int read() { int x = 0,f = 1; char c = get 阅读全文
posted @ 2018-08-10 07:11 zzzzx 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 题目链接 "luogu P1401 城市" 题解 二分最小边权,dinic检验 代码 阅读全文
posted @ 2018-08-09 22:02 zzzzx 阅读(109) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 83 下一页