专题
文章平均质量分 59
qianyri
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
容斥原理/莫比乌斯反演/欧拉函数/线性筛专题
欧拉函数 线性筛 杜教筛 莫比乌斯反演 容斥原理 HDU2588 GCD 欧拉函数 给定N,M,求1<=X<=N 且gcd(X,N)>=M条件下X的个数 #include<bits/stdc++.h> using namespace std; int euler(int n) { int ans=n; for(int i=2;i*i&...原创 2018-08-08 10:25:16 · 1336 阅读 · 0 评论 -
树状数组专题
单点更新 区间查询 void add(int x,int v) { while(x<=n) c[x]+=v,x+=x&(-x); } int get(int r) { int sum=0; while(r) sum+=c[r],r-=r&(-r); return sum; } int get(int l, int r) { r...原创 2018-08-07 16:45:37 · 1016 阅读 · 0 评论 -
二维几何⚪专题
HDU6354 Everything Has Changed 求圆弧的周长 #include<bits/stdc++.h> using namespace std; const int MAX=1e2+5; const double PI=3.14159265358979323846; const double eps=1e-8; struct point { doubl...原创 2018-08-06 21:01:47 · 358 阅读 · 0 评论 -
博弈论专题
转载 一. 巴什博奕(Bash Game): A和B一块报数,每人每次报最少1个,最多报4个,看谁先报到30。这应该是最古老的关于巴什博奕的游戏了吧。 其实如果知道原理,这游戏一点运气成分都没有,只和先手后手有关,比如第一次报数,A报k个数,那么B报5-k个数,那么B报数之后问题就变为,A和B一块报数,看谁先报到25了,进而变为20,15,10,5,当到5的时候,不管A怎么报数,最后一...原创 2018-08-05 16:44:45 · 293 阅读 · 0 评论 -
二分图/一般图匹配专题
洛谷P1129 匈牙利算法 求二分图最大匹配 #include <bits/stdc++.h> using namespace std; const int MAX1=5*1e3+1; const int MAX2=5*1e4+1; struct Edge { int to,next; }edge[MAX2]; int head[MAX1],tot; int linker...原创 2018-07-30 20:54:02 · 392 阅读 · 0 评论 -
凸包+旋转卡壳专题
洛谷P2742 求凸包周长 #include<bits/stdc++.h> using namespace std; const int MAX=1e4+1; const double eps=1e-8; struct point { double x,y; point(){} point(double a,double b) { ...原创 2018-07-28 13:54:43 · 1250 阅读 · 0 评论 -
分块+二分专题
洛谷P2801 教主的魔法 区间修改\区间查询大于C的个数 #include<bits/stdc++.h> using namespace std; const int MAX=2*1e6; const int eps=1e-8; int a[MAX],aa[MAX],b[MAX],c[MAX],cc[MAX][2],block,cnt; inline void read(int...原创 2018-07-24 19:27:43 · 326 阅读 · 0 评论
分享