随笔分类 -  模板

作者在收集各种各样的模板,有兴趣的小伙伴来看一看了!
该文被密码保护。
posted @ 2020-04-14 22:50 ch_hui
摘要:while(l+1<r) { int lm=(l+r)>>1,rm=(lm+r)>>1; if(judge(lm)>judge(rm)) r=rm; else l=lm; } 下面是浮点 while(l+eps<r) { double lm=(l+r)/2,rm=(lm+r)/2; if(judge 阅读全文
posted @ 2020-04-07 17:23 ch_hui 阅读(144) 评论(0) 推荐(0)
摘要:在数论中,对正整数n,欧拉函数是小于或等于n的正整数中与n互质的数的数目。此函数以其首名研究者欧拉命名,它又称为φ函数(由高斯所命名)。 例如,因为1,3,5,7均和8互质。 欧拉函数实际上是模n的同余类所构成的乘法群(即环的所有单位元组成的乘法群)的阶。这个性质与拉格朗日中值一起构成了欧拉定理的证 阅读全文
posted @ 2020-04-05 23:32 ch_hui 阅读(262) 评论(0) 推荐(0)
摘要:我在算法竞赛从入门到进阶那里看的,通过做题还加了一些函数,觉得不错来看看吧!(有新的函数算法我会持续更新放入,记得来看!) #include <iostream>#include <algorithm>using namespace std;#define ll long long#define N 阅读全文
posted @ 2020-04-04 12:08 ch_hui 阅读(144) 评论(0) 推荐(0)
摘要:拓扑排序的做法因题而异,这里只有一个大概的思路及做法的模板(模板是死的,思维是活的) #include <iostream> #include <string.h> #include <string> #include <math.h> #include <stdlib.h> #include <v 阅读全文
posted @ 2020-04-03 20:10 ch_hui 阅读(205) 评论(0) 推荐(1)
摘要:#include<iostream> #include<algorithm> #define fori for(i=0;i<n;i++) #define fori1 for(i=1;i<=n;i++) #define ll long long const ll mod = 1e9 + 7; cons 阅读全文
posted @ 2020-04-03 17:34 ch_hui 阅读(112) 评论(0) 推荐(0)
摘要:#include <iostream> #include <string.h> #include <string> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include < 阅读全文
posted @ 2020-04-02 14:30 ch_hui 阅读(153) 评论(0) 推荐(0)
摘要:这是算区间和的线段树的模板 #include<iostream> #include<algorithm> #include<cstdio> #include<cmath> #define ll long long #define fori for(i=0;i<n;i++) #define fori1 阅读全文
posted @ 2020-04-02 14:30 ch_hui 阅读(165) 评论(0) 推荐(0)
摘要:尺取法裸题 676c Vasya and String 树状数组裸题 121E - Lucky Array 2-sat裸题 875C. National Property 二分裸题 706B Interesting drink 强连通裸题 475B Strongly Connected City 矩 阅读全文
posted @ 2020-03-30 22:30 ch_hui 阅读(98) 评论(0) 推荐(0)
摘要:这是算区间乘积的算法 #include<iostream> #include<algorithm> #include<cstdio> #include<cmath> #define ll long long #define fori for(i=0;i<n;i++) #define fori1 fo 阅读全文
posted @ 2020-03-22 21:27 ch_hui 阅读(537) 评论(0) 推荐(0)