摘要:
分数 1.基本运算 (+, -, *, /) (重载运算符) LL Abs (LL x) { return x > 0 ? x : ... 阅读全文
摘要:
矩阵 1.乘法 struct Matrix { int n, m; LL c[Maxn + 5][Maxn + 5]; Matrix () { memset (c, 0, sizeof c); } void Init () { memset (c, 0, sizeof c); for (int i 阅读全文
摘要:
矩阵 1.基本运算(+, -, *) struct Matrix { int n, m; LL c[Maxn + 5][Maxn +... 阅读全文
摘要:
背包 01背包 #include using namespace std;const int MAXN = 1005;int n, ... 阅读全文
摘要:
最短路 floyd #include using namespace std;const int MAXN = 105;const ... 阅读全文
摘要:
最小生成树 prim 1.朴素 #include using namespace std;const int MAXN = 100... 阅读全文
摘要:
快速读入 template void read (T &x) { T f = 1; x = 0; char tem = getcha... 阅读全文
摘要:
堆 1.插入 void put(int x) { heap[++len] = x; int fa, now = len; while... 阅读全文
摘要:
树状数组 1.求lowbit int lowbit(int x) {return x & -x;} 2.更新(pudate) voi... 阅读全文
摘要:
求逆序对 1. void merge_sort(int l, int r) { if(l == r) return; int mid... 阅读全文