上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 19 下一页
摘要: 第二道线段树分治。 首先设当前向量是(x,y),剩余有两个不同的向量(u1,v1)(u2,v2),假设u1>u2,则移项可得,若(u1,v1)优于(u2,v2),则-x/y>(v1-v2)/(u1-u2),然后维护上凸壳后进行三分即可,复杂度O(nlog2n),如果将询问排序扫一遍,可以优化到O(n 阅读全文
posted @ 2019-06-18 11:35 hfctf0210 阅读(253) 评论(0) 推荐(0)
摘要: 重新写一年前抄题解的那题,当时我啥都不会只是Ctrl+C,Ctrl+V写过的题,今天重新写一遍。 题解: 不会线段树分治,还是学一下这东西吧,这是我的第一道线段树分治。 首先对于特殊商品,可以直接可持久化Trie记录答案。首先考虑对每个线段树开一个vector,把询问的时间区间看成一段一段的塞到线段 阅读全文
posted @ 2019-06-17 23:03 hfctf0210 阅读(155) 评论(0) 推荐(0)
摘要: 怕不是最后一篇(雾),过滤最基础的背包DP、状压DP、递推等 树上换根DP:https://www.luogu.org/problemnew/show/P4284 数位DP:http://www.51nod.com/Challenge/Problem.html#!#problemId=1245 斜率 阅读全文
posted @ 2019-06-17 14:18 hfctf0210 阅读(153) 评论(0) 推荐(0)
摘要: 最裸的莫队:https://www.luogu.org/problemnew/show/P1494 树上莫队:https://www.luogu.org/problemnew/show/P4074 带修莫队:https://www.lydsy.com/JudgeOnline/problem.php? 阅读全文
posted @ 2019-06-17 14:02 hfctf0210 阅读(145) 评论(0) 推荐(0)
摘要: 此处过滤最水的匈牙利算法。 最大流&最小割:https://www.lydsy.com/JudgeOnline/problem.php?id=2127 费用流:https://www.luogu.org/problemnew/show/P3705 KM:https://www.luogu.org/p 阅读全文
posted @ 2019-06-17 13:45 hfctf0210 阅读(125) 评论(0) 推荐(0)
摘要: 一些不知怎么分类的算法。 huffman树:https://www.luogu.org/problemnew/show/P2168 矩阵树定理:https://www.luogu.org/problemnew/show/P4111 分数规划:https://www.luogu.org/problem 阅读全文
posted @ 2019-06-17 13:28 hfctf0210 阅读(129) 评论(0) 推荐(0)
摘要: meet in the middle:https://www.lydsy.com/JudgeOnline/problem.php?id=4800 CDQ分治:https://www.luogu.org/problemnew/show/P3810 点分治:https://www.lydsy.com/J 阅读全文
posted @ 2019-06-17 13:25 hfctf0210 阅读(188) 评论(0) 推荐(0)
摘要: 去除过水的模板,包括但不限于dijkstra(甚至堆优化都被过滤了)、SPFA、kruskal、拓扑排序等。 欧拉回路:http://uoj.ac/problem/117 混合图的欧拉路:https://www.lydsy.com/JudgeOnline/problem.php?id=2095 强连 阅读全文
posted @ 2019-06-17 11:08 hfctf0210 阅读(240) 评论(0) 推荐(0)
摘要: 过滤一些较简单的如线段树、树状数组等,甚至树链剖分都被过滤了。 左偏树:https://www.luogu.org/problemnew/show/P3377 主席树:https://www.luogu.org/problemnew/show/P3834 可持久化并查集:https://www.lu 阅读全文
posted @ 2019-06-17 11:07 hfctf0210 阅读(237) 评论(0) 推荐(0)
摘要: 可能是血(水)考前最后一篇题解了,不过还是写写题解吧。 大部分来源51nod 51nod1253 Kundu and Tree 挺思博的一道题。首先黑色边没用,所以可以把其视为连通块,然后走出该连通块必然要经过至少一条红色边,于是就是总方案数减3个全在一个黑连通块再减去2个在一个黑连通块。 #inc 阅读全文
posted @ 2019-06-16 23:19 hfctf0210 阅读(196) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 19 下一页