摘要:
分数 1.基本运算 (+, -, *, /) (重载运算符) LL Abs (LL x) { return x > 0 ? x : ... 阅读全文
posted @ 2020-10-07 19:40
C2022lihan
阅读(79)
评论(0)
推荐(0)
摘要:
矩阵 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 阅读全文
posted @ 2020-10-07 19:39
C2022lihan
阅读(26)
评论(0)
推荐(0)
摘要:
矩阵 1.基本运算(+, -, *) struct Matrix { int n, m; LL c[Maxn + 5][Maxn +... 阅读全文
posted @ 2020-10-07 19:39
C2022lihan
阅读(36)
评论(0)
推荐(0)
摘要:
背包 01背包 #include using namespace std;const int MAXN = 1005;int n, ... 阅读全文
posted @ 2020-10-07 19:38
C2022lihan
阅读(33)
评论(0)
推荐(0)
摘要:
最小生成树 prim 1.朴素 #include using namespace std;const int MAXN = 100... 阅读全文
posted @ 2020-10-07 19:37
C2022lihan
阅读(22)
评论(0)
推荐(0)
摘要:
最短路 floyd #include using namespace std;const int MAXN = 105;const ... 阅读全文
posted @ 2020-10-07 19:37
C2022lihan
阅读(44)
评论(0)
推荐(0)
摘要:
快速读入 template void read (T &x) { T f = 1; x = 0; char tem = getcha... 阅读全文
posted @ 2020-10-07 19:36
C2022lihan
阅读(50)
评论(0)
推荐(0)
摘要:
堆 1.插入 void put(int x) { heap[++len] = x; int fa, now = len; while... 阅读全文
posted @ 2020-10-07 19:35
C2022lihan
阅读(25)
评论(0)
推荐(0)
摘要:
树状数组 1.求lowbit int lowbit(int x) {return x & -x;} 2.更新(pudate) voi... 阅读全文
posted @ 2020-10-07 19:34
C2022lihan
阅读(22)
评论(0)
推荐(0)
摘要:
求逆序对 1. void merge_sort(int l, int r) { if(l == r) return; int mid... 阅读全文
posted @ 2020-10-07 19:33
C2022lihan
阅读(26)
评论(0)
推荐(0)
摘要:
离散化 1. #include #include using namespace std;const int MAXN = 1005... 阅读全文
posted @ 2020-10-07 19:32
C2022lihan
阅读(37)
评论(0)
推荐(0)
浙公网安备 33010602011771号