上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 18 下一页
摘要: 最裸的莫队: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 阅读(136) 评论(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 阅读(120) 评论(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 阅读(125) 评论(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 阅读(182) 评论(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 阅读(232) 评论(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 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 可能是血(水)考前最后一篇题解了,不过还是写写题解吧。 大部分来源51nod 51nod1253 Kundu and Tree 挺思博的一道题。首先黑色边没用,所以可以把其视为连通块,然后走出该连通块必然要经过至少一条红色边,于是就是总方案数减3个全在一个黑连通块再减去2个在一个黑连通块。 #inc 阅读全文
posted @ 2019-06-16 23:19 hfctf0210 阅读(192) 评论(0) 推荐(0) 编辑
摘要: A 签到(code不贴了) PS:以后cf div2A(有时还有B)和atcoder <=200分(有时<=300)的题目不再贴code,不过可能也没几次比赛记录了。 B 高精度,枚举位数最短的可能,然后计算两个即可。 #include<bits/stdc++.h> using namespace 阅读全文
posted @ 2019-06-16 22:34 hfctf0210 阅读(246) 评论(0) 推荐(0) 编辑
摘要: A 签到(a-b problem不用贴了吧,以后atcoder小于300分题均不贴代码) B 发现选择的p,q一定是其中两点间的距离,于是可以O(n2)枚举两点,再O(n2)判断,其实可以做到O(n3)不过O(n4)就够了。 #include<bits/stdc++.h> using namespa 阅读全文
posted @ 2019-06-16 08:53 hfctf0210 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 这题其实挺经典的,看到求异或最大,显然想到的是线性基,不过这怎么维护?当然区间有关的东西都可以上线段树,区间修改时记录每个点的修改量k,然后合并线性基时再加入线性基。因为线性基是求一组极大线性无关组,所以查询a[i]^k组成的线性基等价于查询k∪a[i]。 #include<bits/stdc++. 阅读全文
posted @ 2019-06-15 13:08 hfctf0210 阅读(224) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 18 下一页