上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 25 下一页
摘要: $dis[u] \bigoplus dis[v] = dis[u] \bigoplus dis[v] \bigoplus dis[lca\{x,y\}] \bigoplus dis[lca\{x,y\}]$ 阅读全文
posted @ 2019-07-27 18:48 邱涵的秘密基地 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 贪心优先子树较多者。 阅读全文
posted @ 2019-07-27 17:06 邱涵的秘密基地 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 分块易想难调。 大BUG: . 块数可能为$blockSize + 1$ . 边界为$\max\{n, block[x] blockSize\}$ . 有时块内不行了,就不能去块外,要灵活应对,因题而定 ~~话说这是道平衡树模板题来着~~ 阅读全文
posted @ 2019-07-27 16:17 邱涵的秘密基地 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 阅读理解两小时,手敲暴力思考5分钟。~~然后$n^3$就A了~~ 暴力代码 cpp include include include include include define R(a,b,c) for(register int a = (b); a = (c); a) define Max(a,b 阅读全文
posted @ 2019-07-27 11:35 邱涵的秘密基地 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 单调性显然,双端队列队列维护严格单调递减~~手写双端队列真的可恶~~。 cpp include include include include include define R(a,b,c) for(register int a = (b); a = (c); a) define Max(a,b) 阅读全文
posted @ 2019-07-27 10:08 邱涵的秘密基地 阅读(119) 评论(0) 推荐(0) 编辑
摘要: $10^18$是要long long的。 $nlogn$单调队列上维护$logn$线段树。 阅读全文
posted @ 2019-07-27 08:54 邱涵的秘密基地 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 数组越界那个RE+WA的姹紫嫣红的。。。 乘法原理求种类数,类似于没有上司的舞会。 阅读全文
posted @ 2019-07-26 20:52 邱涵的秘密基地 阅读(133) 评论(0) 推荐(0) 编辑
摘要: $$f[u][step] = \begin{cases} C[u] & step = 0 \\ (\sum{f[v][step 1]}) f[u][step 2] \cdot (deg[u] 1) & 1 \leq step include include include include defin 阅读全文
posted @ 2019-07-26 20:10 邱涵的秘密基地 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 有点权的重心,拆掉点dfs不就是了吗 cpp // include include include // include // include define R(a,b,c) for(register int a = (b); a = (c); a) define Max(a,b) ((a) (b) 阅读全文
posted @ 2019-07-26 19:19 邱涵的秘密基地 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 贪心就离根最大距离 阅读全文
posted @ 2019-07-26 18:25 邱涵的秘密基地 阅读(82) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 25 下一页