摘要: 还在持续更新, 模板还没发齐。最后更新时间:2019年12月6日由于Github不太友好,蒟蒻就把PDF放到了百度云里链接:https://pan.baidu.com/s/1yuII_btZspV5GVhAtlc... 阅读全文
posted @ 2019-10-23 15:43 风骨散人 阅读(140) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;#define INF 0x3f3f3f3f#define maxn 1005int D[maxn][maxn];int P[maxn][maxn];int... 阅读全文
posted @ 2019-10-23 15:41 风骨散人 阅读(123) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include using namespace std;const int INF = 0x3f3f3... 阅读全文
posted @ 2019-10-23 15:35 风骨散人 阅读(106) 评论(0) 推荐(0) 编辑
摘要: * * 给出一颗有向树,Q个查询 * 输出查询结果中每个点出现次数 * 复杂度O(n + Q); */const int MAXN = 1010;const int MAXQ = 500010; //... 阅读全文
posted @ 2019-10-23 15:32 风骨散人 阅读(109) 评论(0) 推荐(0) 编辑
摘要: /* * LCA在线算法(倍增法) */const int MAXN = 10010;const int DEG = 20; struct Edge{ int to, next;} edge[MAXN *... 阅读全文
posted @ 2019-10-23 15:28 风骨散人 阅读(126) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include using namespace std;const int N=100010;int ... 阅读全文
posted @ 2019-10-23 15:25 风骨散人 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 本博客参考了李煜东的《算法竞赛进阶指南》,大家要是觉得这篇文章写的不错请大家支持正版。豆瓣图书我在之前的博客中讲解了搜索序时间戳,这次我们讲讲追溯值的概念。追溯值: 设subtree(x)表示搜索树中,以X... 阅读全文
posted @ 2019-10-23 15:22 风骨散人 阅读(162) 评论(0) 推荐(0) 编辑