摘要: 1.压位(比较简单) const int up = 10; const int M = 1000; struct High { int c[up + 5]; void out () { int poi = up; while (poi >= 1 && c[poi] == 0) poi--; writ 阅读全文
posted @ 2020-12-08 20:58 C2022lihan 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 1.普通 template T Max (T x, T y) { return x > y ? x : y; }template ... 阅读全文
posted @ 2020-12-08 20:58 C2022lihan 阅读(67) 评论(0) 推荐(0) 编辑
摘要: 1.树上倍增 #include <queue> #include <cstdio> using namespace std; const int MAXN = 1e5 + 5; const int MAXTEP = 45; int n, m; int depth[MAXN], f[MAXN][MAX 阅读全文
posted @ 2020-12-04 12:40 C2022lihan 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 1.树上倍增 #include #include using namespace std;const int MAXN = 1e5 ... 阅读全文
posted @ 2020-12-04 12:40 C2022lihan 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 区间最大值 struct Segment_Tree { int l, r; int Max_Date;}Seg_Tr[MAXN * ... 阅读全文
posted @ 2020-11-21 09:14 C2022lihan 阅读(25) 评论(0) 推荐(0) 编辑
摘要: void Make_Next (char *str) { int len = strlen (str + 1); for (int... 阅读全文
posted @ 2020-11-14 11:52 C2022lihan 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 2.next数组求法 操作见课件,这里不赘述 1. s ... 阅读全文
posted @ 2020-11-14 09:52 C2022lihan 阅读(26) 评论(0) 推荐(0) 编辑
摘要: v i ... 阅读全文
posted @ 2020-11-14 08:31 C2022lihan 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 1.前言 最开始我看blog,化简式子时化简错了,理解了好久 2.算法分析 attention: 1.dp[i]表示以i为中心的回文... 阅读全文
posted @ 2020-11-13 20:27 C2022lihan 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 1.题目 2.分析 ①操作一应该做的操作 我们可以知道,树上两点的路径 ... 阅读全文
posted @ 2020-11-05 22:53 C2022lihan 阅读(37) 评论(0) 推荐(0) 编辑