文章分类 -  training

摘要:## 0x01 [Pashmak and Parmida's problem](https://codeforces.com/problemset/problem/459/D) 预处理 $f$,统计各取值个数,维护前缀和. ## 0x02 [Closest Equals](https://codef 阅读全文
posted @ 2023-08-22 12:54 johnsmith0x3f 阅读(10) 评论(0) 推荐(0)
摘要:## 0x01 [Bear and Prime Numbers](https://codeforces.com/problemset/problem/385/C) 注意到 $a_i \leqslant 10^7$,故只需求 $10^7$ 以内的素数。 不难想到记录每个数出现的次数,再对每个素数分别枚 阅读全文
posted @ 2022-04-09 21:42 johnsmith0x3f 阅读(14) 评论(0) 推荐(0)
摘要:## 0x01 [Distance in Tree](https://codeforces.com/problemset/problem/161/D) 设 $f(i, j)$ 表示到 $i$ 距离为 $j$ 的节点个数。 先正着做一遍,得到 $i$ 子树中的答案;再倒着做一遍,注意去重。 ## 0x 阅读全文
posted @ 2022-04-09 21:40 johnsmith0x3f 阅读(10) 评论(0) 推荐(0)
摘要:## 0x01 [Wooden Fence](https://codeforces.com/problemset/problem/182/E) 每种木板可以拆成两种木板,分别对应转不转 $90^\circ$。 设 $f(i, j)$ 表示已经搭了长度为 $i$ 的栅栏,用的最后一块木板的种类为 $j 阅读全文
posted @ 2022-04-07 13:24 johnsmith0x3f 阅读(12) 评论(0) 推荐(0)
摘要:## 0x01 [Devu and his Brother](https://codeforces.com/problemset/problem/439/D) 考虑将 $\{ a_n \}$ 升序排序,$\{ b_n \}$ 降序排序,令 $a_{n+1} = 10^9$,$b_{n+1} = -1 阅读全文
posted @ 2022-04-07 13:13 johnsmith0x3f 阅读(19) 评论(0) 推荐(0)