10 2022 档案

摘要:数论分块可以快速计算一些含有除法向下取整的和式(即形如i=1nf(i)g(ni) 的和式)。当可以在 O(1) 内计算 f(r)f(l)或已经预处理出f的前缀和时,数论分块就可以在 O(n)的时间内计算上述和式的值。 阅读全文
posted @ 2022-10-27 10:21 Bertidurlah 阅读(26) 评论(1) 推荐(0) 编辑
摘要:质数和约数der一些性质 阅读全文
posted @ 2022-10-27 10:14 Bertidurlah 阅读(30) 评论(0) 推荐(0) 编辑
摘要:寒塘渡鹤影,冷月葬花魂。 阅读全文
posted @ 2022-10-25 18:14 Bertidurlah 阅读(33) 评论(1) 推荐(1) 编辑
摘要:DP综述 最优子结构:把原问题化到规模更小的问题后,原问题的最优解一定能从规模更小问题的最优解推出。 无后效性:如果在某个阶段上过程的状态已知,则从此阶段以后过程的发展变化仅与此阶段的状态有关,而与过程在此阶段以前的阶段所经历过的状态无关。 状态:类似搜索中所说的状态,就是怎么描述求解过程中的一个阶 阅读全文
posted @ 2022-10-24 15:55 Bertidurlah 阅读(68) 评论(1) 推荐(0) 编辑
该文被密码保护。
posted @ 2022-10-24 15:34 Bertidurlah 阅读(22) 评论(0) 推荐(0) 编辑
摘要:判定 一张图是二分图,当且仅当图中不存在奇环。 如果两个集合中的点分别染成黑色和白色,可以发现二分图中的每一条边都一定是连接一个黑色点和一个白色点。 例题:关押罪犯 #include<queue> #include<cstdio> #include<iostream> #include<algori 阅读全文
posted @ 2022-10-22 21:27 Bertidurlah 阅读(19) 评论(1) 推荐(0) 编辑
该文被密码保护。
posted @ 2022-10-21 10:34 Bertidurlah 阅读(1) 评论(0) 推荐(0) 编辑
摘要:警钟高支火兰 阅读全文
posted @ 2022-10-19 21:51 Bertidurlah 阅读(2) 评论(0) 推荐(0) 编辑
摘要:模意义下乘法运算的逆元的求解方式 阅读全文
posted @ 2022-10-18 10:21 Bertidurlah 阅读(107) 评论(0) 推荐(0) 编辑
摘要:欧拉函数 O(n)求单个φ(x)的值 上公式: φ(n)=n×i=1spi1pi 引理:若p为质数,则φ(pk)=pkpk1 因为与pk不互质的只有$ 阅读全文
posted @ 2022-10-17 14:39 Bertidurlah 阅读(33) 评论(0) 推荐(0) 编辑
摘要:高精乘低精&高精除低精 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #define il inline #define ri register #define pc(i) putchar(i) u 阅读全文
posted @ 2022-10-15 19:18 Bertidurlah 阅读(22) 评论(1) 推荐(0) 编辑
摘要:朱刘 #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #define il inline #define ri register #define pc(i) putchar(i) using name 阅读全文
posted @ 2022-10-15 19:16 Bertidurlah 阅读(18) 评论(1) 推荐(0) 编辑
摘要:#include<queue> #include<cstdio> #include<iostream> #include<algorithm> #define il inline #define ri register #define pc(i) putchar(i) using namespace 阅读全文
posted @ 2022-10-15 19:15 Bertidurlah 阅读(16) 评论(1) 推荐(0) 编辑
摘要:#include<cstdio> #define il inline #define ri register int #define ru register unsigned int #define ptn putchar('\n') #define max(a,b) ((a)>(b)?(a):(b 阅读全文
posted @ 2022-10-15 19:05 Bertidurlah 阅读(12) 评论(1) 推荐(0) 编辑
摘要:#include<bits/stdc++.h> #define il inline #define ri register int #define int long long using namespace std; const int sz=1e6; int a[sz],c[sz],tot,n,t 阅读全文
posted @ 2022-10-15 19:04 Bertidurlah 阅读(18) 评论(1) 推荐(0) 编辑
摘要:#include<set> #include<cstdio> #include<iostream> #include<algorithm> #define il inline #define ri register #define pc(i) putchar(i) #define ls (rt<<1 阅读全文
posted @ 2022-10-15 18:59 Bertidurlah 阅读(22) 评论(1) 推荐(0) 编辑

点击右上角即可分享
微信分享提示