随笔分类 -  学习笔记

摘要:快速幂模板 #include<iostream> #include<csitdio> #include<algorithm> #define ll long long using namespace std; ll m=100007; ll quick_pow(ll a,ll b) { ll ans 阅读全文
posted @ 2021-08-18 22:00 基德不基 阅读(39) 评论(1) 推荐(1)
摘要:快读模板 因为输入字符的速度比数字快,所以快读采用的字符方式输入数字,再转换回来。 int read() { int m=0,n=1; char ch; ch=getchar(); while(ch<'0'||ch>'9') { if(ch=='-') n=-1; ch=getchar(); } w 阅读全文
posted @ 2021-08-18 22:00 基德不基 阅读(317) 评论(1) 推荐(1)
摘要:浅谈质数与同余 一、质数 定义:除了1和本身两个数都不能被整除的自然数叫做质数,否则为合数。 0和1既不是质数也不是合数,最小的合数是4, 最小的质数是2,是唯一的偶质数,质数有无穷多个 质数分布定理: 对正实数x,定义P(x)为不大于x的质数个数,则有P(x)=O(x/lnx) 由质数定理可以给出 阅读全文
posted @ 2021-07-18 20:10 基德不基 阅读(694) 评论(0) 推荐(0)