11 2018 档案

摘要:$\frac{\sum_{i=1}^N a_ix_i}{\sum_{i=1}^Nb_ix_i}=ans$ $\sum_{i=1}^N a_ix_i ans\sum_{i=1}^N b_ix_i=0$ 二分答案ans即可 阅读全文
posted @ 2018-11-30 15:02 A·H 阅读(135) 评论(0) 推荐(0)
摘要:长函数大括号换行 短函数左右括号在一行 长循环大括号不换行 短循环不用加括号时能用','就不用';',否则使用';'且左右括号在一行 Tab缩进4格 能用const不用define 阅读全文
posted @ 2018-11-29 13:42 A·H 阅读(172) 评论(0) 推荐(0)
摘要:分块+线性DP 维护从某个点出发跳出这个块会跳到哪,需要几步即可 阅读全文
posted @ 2018-11-28 20:26 A·H 阅读(115) 评论(0) 推荐(0)
摘要:T1 $\sum_{i=1}^N \sum_{j=1}^M [(i,j)=1]$ $f(d)=\sum_{i=1}^N \sum_{j=1}^M [(i,j)=d]$ $g(d)=\sum_{i=1}^N \sum_{i=1}^M [d|(i,j)]=\lfloor \frac{N}{d} \rfl 阅读全文
posted @ 2018-11-27 21:15 A·H 阅读(642) 评论(0) 推荐(1)
摘要:线性筛 线段树 矩阵快速幂 Gauss cpp include"cstdio" include"cstring" include"iostream" include"algorithm" using namespace std; const int MAXN=105; const double ep 阅读全文
posted @ 2018-11-27 17:26 A·H 阅读(225) 评论(0) 推荐(2)
摘要:题目大意:给定一个字符串长度与一个字符串集,求存在该集合中元素作为子串的该长度字串数量 思路:AC自动机+DP+容斥(全集 不合法的) cpp include"cstdio" include"cstring" include"iostream" include"algorithm" using na 阅读全文
posted @ 2018-11-26 15:57 A·H 阅读(99) 评论(0) 推荐(0)
摘要:我是谁 来自SD的萌新OIer,经常在校内模拟赛被Aufun吊锤 其实是Aufun吊锤STD,然后吊锤我们 这个ID是什么意思 A·H_~~(安徽)~~啊,某位奥地利小画家 我的经历 2014PJ:50,连个奖都没有 2014期中:Rnk44,根本进不了一中啊 2015PJ:200,省二GG 201 阅读全文
posted @ 2018-11-26 13:18 A·H 阅读(388) 评论(3) 推荐(1)
摘要:题目大意:给定一个字符串集,求一个最短字串,使得该集合内的串都是该串的一个子串 算法:AC自动机+最短路+状压DP 注意空间限制 cpp include"cstdio" include"cstring" include"iostream" include"algorithm" include"bit 阅读全文
posted @ 2018-11-26 12:42 A·H 阅读(288) 评论(0) 推荐(0)
摘要:离散化+倍增优化Floyed cpp include"cstdio" include"cstring" include"iostream" include"algorithm" using namespace std; const int MAXN=205; const int MAXM=1005; 阅读全文
posted @ 2018-11-21 19:29 A·H 阅读(132) 评论(0) 推荐(0)
摘要:题意 有$n \leq 40$个节点,每个节点有权值$H \leq 1e9$和贡献$v \leq 1e9$,从任意一个点可以向右跳到一个权值不小于它的节点,并获得该点贡献 可以从任意一个点开始,任意一个点结束 看数据范围可知此题是典型的折半搜索 方法:离散化高度后将数据分为左右两部分,分别DFS出两 阅读全文
posted @ 2018-11-06 20:20 A·H 阅读(218) 评论(0) 推荐(0)
摘要:先筛质数 开 存满足某种状态且各数位和合法的质数 然后先填第一行、第一列、第一对角线 继续填,先填约束多的,再填约束少的 复杂度非常可观~就是代码有点长~ cpp include"cstdio" include"cstring" include"iostream" include"algorithm 阅读全文
posted @ 2018-11-05 18:27 A·H 阅读(478) 评论(0) 推荐(0)