摘要: spfa判断负环 阅读全文
posted @ 2021-09-23 17:12 zyy2001 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 树状数组、线段树 阅读全文
posted @ 2021-09-22 18:28 zyy2001 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 单调栈 阅读全文
posted @ 2021-09-22 15:18 zyy2001 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 求单源最短路,dijkstra,spfa(SLF、LLL、SLF+LLL、dfs处理负环) 阅读全文
posted @ 2021-09-22 11:19 zyy2001 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 滑动窗口 阅读全文
posted @ 2021-09-21 22:41 zyy2001 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 线性筛法求素数 阅读全文
posted @ 2021-09-21 22:01 zyy2001 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 递推求乘法逆元,逆推求阶乘逆元 阅读全文
posted @ 2021-09-21 21:25 zyy2001 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 求出一组整数 $x_0,y_0$,满足 $a\times x_0 +m \times y_0 =gcd(a,m)$,则通解: $$x=x_0\times \frac{b}{gcd(a,m)}+k\times \frac{m}{gcd(a,m)}$$ 阅读全文
posted @ 2021-09-21 17:08 zyy2001 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 字符串哈希,p取131/13331 阅读全文
posted @ 2021-09-20 22:56 zyy2001 阅读(59) 评论(0) 推荐(0) 编辑
摘要: lca(最近公共祖先) 阅读全文
posted @ 2021-09-20 22:07 zyy2001 阅读(46) 评论(0) 推荐(0) 编辑