文章分类 - training
摘要:## 0x01 [Pashmak and Parmida's problem](https://codeforces.com/problemset/problem/459/D) 预处理 $f$,统计各取值个数,维护前缀和. ## 0x02 [Closest Equals](https://codef
阅读全文
摘要:## 0x01 [Bear and Prime Numbers](https://codeforces.com/problemset/problem/385/C) 注意到 $a_i \leqslant 10^7$,故只需求 $10^7$ 以内的素数。 不难想到记录每个数出现的次数,再对每个素数分别枚
阅读全文
摘要:## 0x01 [Distance in Tree](https://codeforces.com/problemset/problem/161/D) 设 $f(i, j)$ 表示到 $i$ 距离为 $j$ 的节点个数。 先正着做一遍,得到 $i$ 子树中的答案;再倒着做一遍,注意去重。 ## 0x
阅读全文
摘要:## 0x01 [Wooden Fence](https://codeforces.com/problemset/problem/182/E) 每种木板可以拆成两种木板,分别对应转不转 $90^\circ$。 设 $f(i, j)$ 表示已经搭了长度为 $i$ 的栅栏,用的最后一块木板的种类为 $j
阅读全文
摘要:## 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
阅读全文

浙公网安备 33010602011771号