会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
我自问酒不问仙,半世逍遥半世癫,我自问心不问佛,半世情愁半世痴。
汉孤臣のlibrary
博客园
首页
新随笔
联系
订阅
管理
2021年3月9日
汉孤臣の线性筛求欧拉函数之和
摘要: #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #include <vector> #include <queue> #include <map> using
阅读全文
posted @ 2021-03-09 21:38 汉孤臣
阅读(46)
评论(0)
推荐(0)
2021年3月7日
汉孤臣のKMP模板(找所有的出现过模式串的下标)
摘要: 模板题 http://private.vjudge.net/problem/EOlymp-1498 #include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> #incl
阅读全文
posted @ 2021-03-07 20:19 汉孤臣
阅读(57)
评论(0)
推荐(0)
2021年1月18日
dinicの模板
摘要: #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #include <vector> #include <queue> using namespace std;
阅读全文
posted @ 2021-01-18 22:53 汉孤臣
阅读(43)
评论(0)
推荐(0)
2020年11月24日
GCD基础の讲解
摘要: (ps:此为基础GCD算法的讲解,不包含EXGCD的内容) 先上代码: 递归 : long long gcd(long long x,long long y) { if (x==0) return y; return gcd(y%x,x); } 非递归: long long gcd(long lon
阅读全文
posted @ 2020-11-24 21:57 汉孤臣
阅读(171)
评论(0)
推荐(0)
2020年11月5日
汉孤臣の树链剖分模板
摘要: 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <algorithm> 5 #include <cmath> 6 #include <vector> 7 #include <queue> 8 #inc
阅读全文
posted @ 2020-11-05 16:57 汉孤臣
阅读(86)
评论(0)
推荐(0)
2020年10月22日
(数论基础)线性筛の小小讲解
摘要: 思想: 众所周知,唯一分解定理:N= p1^c1*p2^c2*p3^c3*...*pm^cm。 于是每个合数都能用若干个素数相乘表示。而素数只有一个素数因数。只要一个数存在不等于自身的素数因数,就必定是合数,反之,为素数。 代码思路: 我们可以将每个数(包括素数合数)向外扩展一次(用一个素数×该数)
阅读全文
posted @ 2020-10-22 17:11 汉孤臣
阅读(170)
评论(0)
推荐(0)
2020年10月21日
汉孤臣の倍增LCA模板
摘要: 例题 (模板题):https://vjudge.net/problem/51Nod-2599 代码: #include <iostream> #include <cstdio> #include <algorithm> #include <cmath> #include <cstring> #inc
阅读全文
posted @ 2020-10-21 21:27 汉孤臣
阅读(85)
评论(0)
推荐(0)
汉孤臣の小小目录
摘要: (未完待续......) 一.我の模板链接: 1.LCA倍增模板 www.cnblogs.com/HGC-LIBRARYS/p/13854861.html 2.树链剖分模板 www.cnblogs.com/HGC-LIBRARYS/p/13932666.html 3.KMP模板 https://ww
阅读全文
posted @ 2020-10-21 19:12 汉孤臣
阅读(68)
评论(0)
推荐(0)
公告
Live2D