Loading

08 2023 档案

摘要:[题目传送门](https://www.luogu.com.cn/problem/CF54C) # $Solution$: 一个比较简单的数位 dp处理技巧加上一个暴力的 dp。 设 $p_i$ 为区间 $[l_i, r_i]$ 中出现 $1$ 开头的数的概率。 考虑 $solve(x)$ 函数为求 阅读全文
posted @ 2023-08-24 15:04 Svemit 阅读(53) 评论(0) 推荐(0)
摘要:#### 8.18 1. [CF1162A](https://www.luogu.com.cn/problem/CF1162A) ```cpp #include using namespace std; typedef long long LL; const int N = 1e5 + 5, INF 阅读全文
posted @ 2023-08-21 08:02 Svemit 阅读(95) 评论(0) 推荐(0)
摘要:~~这能评黄?~~ [原题链接](https://www.luogu.com.cn/problem/P9573) #### 题意: 题面就挺简要的。 #### Solution: 注意到最大的两个数加起来是 $n + n - 1 = 2n - 1$,如果 $p$ 大于这个数时直接乱输出即可。 构造一 阅读全文
posted @ 2023-08-21 08:01 Svemit 阅读(57) 评论(0) 推荐(0)
摘要:赛时一眼换根 dp,然后调调调了大概 1h+。 [题目传送门](https://www.luogu.com.cn/problem/P9437) ### 什么是换根 dp 在大多数树形 dp 中,我们只考虑对根的贡献,而一部分题目需要算出对所有点的贡献,一个比较显然的做法是对每个点都跑一次树形 dp, 阅读全文
posted @ 2023-08-04 23:10 Svemit 阅读(67) 评论(0) 推荐(0)