- 博客(4)
- 收藏
- 关注
原创 排序算法模板
#include<cstdio> #include<ctime> #include<windows.h> #include<cstring> #include<algorithm> #include<queue> #define print(ovo, a, b) for(int qwq = (a); qwq <= (b)...
2018-10-17 09:05:08 135
原创 gcd&&扩展欧几里得
#include<cstdio> #define abs(x) (x) > 0 ? (x) : -(x) #define min(a, b) (a) < (b) ? (a) : (b) //O(log(a+b)) int gcd(int a, int b) {return !b ? a : gcd(b, a % b);} int qgcd(int a, int b) ...
2018-10-17 08:55:35 140
原创 读入优化&&输出优化
#include<cstdio> int isdigit[300]; void read(int &x) { int f = 1; x = 0; char s = getchar(); while(!isdigit[s]) {if(x == '-') f = -1; s = getchar();} while(isdigit[s]) {x = x*10 + s-'0';...
2018-10-17 08:52:24 166
原创 树状数组模板
#include<cstdio> #define lowbit(x) (x) & -(x) const int maxn = 7000; int tree_array[maxn], tree_2array[maxn][maxn]; //点修改O(log n) 区间查询O(log n) //下标不能为零 //------------------------------------...
2018-10-17 08:46:38 161
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人