摘要: 代码模板 数论 快速幂 int qmi(int a, int b, int p) { int res = 1; while (b) { if (b & 1) res = res * a % p; a = a * a % p; b >>= 1; } return res; } 线性筛法(素数+欧拉函数 阅读全文
posted @ 2024-01-25 11:41 Mingrui_Yang 阅读(12) 评论(0) 推荐(1) 编辑
摘要: [lower_bound, upper_bound, greater, less 用法](https://blog.csdn.net/liukairui/article/details/104602907 "lower_bound, upper_bound, greater, less 用法") 阅读全文
posted @ 2023-07-27 22:39 Mingrui_Yang 阅读(8) 评论(0) 推荐(1) 编辑
摘要: 背包问题总结 [toc] # 01背包问题 [AcWing 2.01背包问题](https://www.acwing.com/problem/content/2/) [AcWing 打卡](https://www.acwing.com/activity/content/code/content/51 阅读全文
posted @ 2023-07-23 22:09 Mingrui_Yang 阅读(10) 评论(0) 推荐(1) 编辑
摘要: DFS 与 BFS 的区别 ![img](https://img2023.cnblogs.com/blog/3060040/202307/3060040-20230720141009824-777328618.jpg) 阅读全文
posted @ 2023-07-20 14:10 Mingrui_Yang 阅读(2) 评论(0) 推荐(1) 编辑
摘要: # 网站美化 [详细文章](https://www.luogu.com.cn/blog/fsy2017/material-luogu-material) 网站链接 → [ http://userstyles.org]( http://userstyles.org) 阅读全文
posted @ 2023-07-14 15:17 Mingrui_Yang 阅读(7) 评论(0) 推荐(1) 编辑
摘要: ST 表学习笔记与总结 [toc] # ST 表 ## 定义/作用 ![img](https://img2023.cnblogs.com/blog/3060040/202307/3060040-20230712220639444-802511892.png) ## 什么是 可重复贡献问题 ![img 阅读全文
posted @ 2023-07-12 22:15 Mingrui_Yang 阅读(13) 评论(0) 推荐(1) 编辑
摘要: 快读/快写 模板 [toc] # 快读/快写 模板 [参考文章 入口](https://blog.csdn.net/qq_60404548/article/details/125676237) ## 快读模板 ```cpp inline int read() { int x = 0,f = 1; c 阅读全文
posted @ 2023-07-12 19:12 Mingrui_Yang 阅读(13) 评论(0) 推荐(1) 编辑
摘要: 树状数组学习笔记与总结 [toc] # 树状数组 ## OI Wiki [OI Wiki - 树状数组](https://oi-wiki.org/ds/fenwick/) ## 信息学奥赛一本通 ![img](https://img2023.cnblogs.com/blog/3060040/2023 阅读全文
posted @ 2023-07-12 13:41 Mingrui_Yang 阅读(7) 评论(0) 推荐(0) 编辑
摘要: KMP 学习笔记与总结 [toc] # KMP ## 信息学奥赛一本通 ![img](https://img2023.cnblogs.com/blog/3060040/202307/3060040-20230711112003710-2126419638.jpg) ![img](https://im 阅读全文
posted @ 2023-07-11 12:01 Mingrui_Yang 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 线段树学习笔记与总结 [toc] # 线段树 ## 引入 我们经常会遇到需要维护一个序列的问题,例如给定一个整数序列,每次操作会修改序列某个位置上的数,或是海间你序列巾某个区问内所有数的和,用“暴力"算法,单点修改的复杂度为 $O(1)$,询问区间和的单次复杂度为 $O(N)$。用前缀和算法,询问区 阅读全文
posted @ 2023-07-10 09:54 Mingrui_Yang 阅读(7) 评论(0) 推荐(0) 编辑