版本比较
千题鉴赏
正文
增加 8 行删除 6 行
1234356787910111213141516171817192021222324232526272829302931323334357 行未改动43444546454748495051159 行未改动全部展开# 千题鉴赏
## 较简单
[CF1365F Swaps Again](https://www.luogu.com.cn/problem/CF1365F)### [CF1365F Swaps Again](https://www.luogu.com.cn/problem/CF1365F)
简单构造,猜性质,直接秒。
[CF602B Approximating a Constant Range](https://www.luogu.com.cn/problem/CF602B)### [CF602B Approximating a Constant Range](https://www.luogu.com.cn/problem/CF602B)
取得的序列中只有两个数,可以写 DP 或者贪心,比较简单。
::::info[具体的DP]设 $dp[i][0/1]$ 表示到 $i$,序列中的数为 $a[i]-1,a[i]$ 或 $a[i],a[i]+1$。 ::::
## 中等
[CF549B Looksery Party](https://www.luogu.com.cn/problem/CF549B)### [CF549B Looksery Party](https://www.luogu.com.cn/problem/CF549B)
好天才的题目。
看看特殊的 **0**,找为0的 $a_i$,让他去聚会,一直这样,不会存在 $-1$ 的情况。
[CF1027E Inverse Coloring](https://www.luogu.com.cn/problem/CF1027E)### [CF1027E Inverse Coloring](https://www.luogu.com.cn/problem/CF1027E)
可以发现一行一列可以确定整个正方形,那么只要求 $n$ 个格子中最长连续颜色段不超过 $i$ 的填色方案数即可。
对于每个 $i \times j$ 不超过 $k$ 的,加上 $dp[n][i] \times dp[n][j]$ 即可。
[CF1474D Cleaning](https://www.luogu.com.cn/problem/CF1474D)### [CF1474D Cleaning](https://www.luogu.com.cn/problem/CF1474D)
::::info[分析性质]一开始的性质和均分纸牌很像。::::7 行未改动::::
## 强化
[P17723 [SCP-S 2026] 函数 / func](https://www.luogu.com.cn/problem/P17723) ### [P17723 [SCP-S 2026] 函数 / func](https://www.luogu.com.cn/problem/P17723)
F**k!想了2个小时。
::::info[启发思路(不想看可以跳过)]159 行未改动全部展开