摘要:
# 数位DP总结 BY LZM > ### ~~当你学会了数位DP,那么你会发现,在考场上,你也写不出来。~~ 首先给出一道例题: >给出一个区间 $[l,r]$ ,求出区间内每个数字的数位和,答案 $\bmod \ 998244353$,$1\le l,r \le 10^{18}$。 ``` 样例 阅读全文
posted @ 2023-09-07 20:33
镜予歌
阅读(32)
评论(0)
推荐(0)
摘要:
# 线性筛合集 ### 1. 线性筛素数 ```cpp void init() { ispri[1]=true; for(int i=2;i<=n;i++) { if(!ispri[i])pri[++cnt]=i; for(int l=1;l<=cnt && i*pri[l]<=n;l++) { i 阅读全文
posted @ 2023-09-07 20:32
镜予歌
阅读(22)
评论(0)
推荐(0)
摘要:
## 前置知识: ### 1. [P3376 【模板】网络最大流](https://www.luogu.com.cn/problem/P3376) ### 2.[P4897 【模板】最小割树(Gomory-Hu Tree)](https://www.luogu.com.cn/problem/P489 阅读全文
posted @ 2023-09-07 20:31
镜予歌
阅读(77)
评论(0)
推荐(0)