Fork me on 
Catalogue

我自问酒不问仙,半世逍遥半世癫,我自问心不问佛,半世情愁半世痴。 ​​​​
摘要: #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)
摘要: 模板题 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)
摘要: #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)
摘要: (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)
摘要: 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)
摘要: 思想: 众所周知,唯一分解定理:N= p1^c1*p2^c2*p3^c3*...*pm^cm。 于是每个合数都能用若干个素数相乘表示。而素数只有一个素数因数。只要一个数存在不等于自身的素数因数,就必定是合数,反之,为素数。 代码思路: 我们可以将每个数(包括素数合数)向外扩展一次(用一个素数×该数) 阅读全文
posted @ 2020-10-22 17:11 汉孤臣 阅读(170) 评论(0) 推荐(0)
摘要: 例题 (模板题):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