摘要: 不知道起什么标题了组合数的计算更新:不行,精度损失太大!#include#include#define LL long long#define MAXN 2000using namespace std;int cnt;int f[MAXN][MAXN];LL c(LL... 阅读全文
posted @ 2018-01-04 18:21 GhostCai 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 二进制处理int poww(int a,int b){ int ans=1,base=a; while(b!=0){ if(b&1!=0) ans*=base; base*=base; b>>=1... 阅读全文
posted @ 2018-01-04 01:28 GhostCai 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 欧拉筛,O(线性) 考虑三个地方,即可筛出积性函数f(x): 1.x为素数 2.p不整除于x 3.p整除于x(break) [x] 唯一分解定理 有素数表复杂度在lnn,没有则sqrt(n) [x] 威尔逊定理 [x] 费马小定理 设p为素数,a为正整数,若GCD(p,a)==1,则a^(p-1)≡ 阅读全文
posted @ 2018-01-04 01:16 GhostCai 阅读(126) 评论(3) 推荐(0) 编辑