版本比较
题解系列
正文
增加 18 行删除 5 行
12334567241 行未改动全部展开24925025125225325325425525625773 行未改动33133233333433533533633733833934034034134234334467 行未改动412413414415416417417418419420421422423424425426427428429430模拟赛难度非常主观.
# [$\textup{\textbf{\color{#77bbdd}2026/8/6 模拟赛1}} $](https://hydro.ac/d/ubcoj/contest/6a631cbb8d1452969e422a58)# [$\textup{\textbf{\color{#77BBDD}2026/8/6 模拟赛1}} $](https://hydro.ac/d/ubcoj/contest/6a631cbb8d1452969e422a58)
$score:$ $(8th/17)$ $20 = 10 + 10 + 0 + 0$
~赛时用 AI 的人能不能去死啊~241 行未改动全部展开```c++
```~貌似这道题可以反序后 KMP ,时间复杂度也没有很劣,也支持单点修改和单调性~# [$\textup{\textbf{\color{#77bbdd}2026/8/11 模拟赛2}} $](https://hydro.ac/d/ubcoj/contest/6a635a40fea7c01b3de25f67)# [$\textup{\textbf{\color{#77BBDD}2026/8/11 模拟赛2}} $](https://hydro.ac/d/ubcoj/contest/6a635a40fea7c01b3de25f67)$score$ : $55(9th/17)$ = $30+10+0+15$## $\color{#FFC116} T1 消消乐(xxl) $
~老师让我们拿前 45 分......~73 行未改动复杂度 $O(n \log n)$ 或 $O(n \log^2 n)$.
~人麻了 C艹 名不虚传~
# [$\textup{\textbf{\color{#77bbdd}2026/8/15 模拟赛3}} $](https://hydro.ac/d/ubcoj/contest/6a6359cc8d1452969e44b7f8)# [$\textup{\textbf{\color{#77BBDD}2026/8/15 模拟赛3}} $](https://hydro.ac/d/ubcoj/contest/6a6359cc8d1452969e44b7f8)$score$ : $100(3rd/17)$ = $100+0+0+0$
~最危险的一集,170挂70的来了~
## $\color{#FFC116} T1 神圣光树(blessing) $## $\color{#FFC116} T1 神圣光束(blessing) $
正解:
- `R`:不难发现是直接从前面继承67 行未改动则 $p(x=i)=p(p<=i)-p(x<=i-1)$
~额啊以下的听不明白了不写了~
# [$\textup{\textbf{\color{#77BBDD}2026/9/6 模拟赛5}} $](https://hydro.ac/d/ubcoj/contest/6a86b75302bc1178ac4465ad)
[你](https://www.luogu.com.cn/problem/P1251)[说](https://www.luogu.com.cn/problem/P2754)[的](https://www.luogu.com.cn/problem/P2756)[对](https://www.luogu.com.cn/problem/P2761)[但](https://www.luogu.com.cn/problem/P2762)[这](https://www.luogu.com.cn/problem/P2763)[是](https://www.luogu.com.cn/problem/P2764)[二](https://www.luogu.com.cn/problem/P2765)[十](https://www.luogu.com.cn/problem/P2766)[四](https://www.luogu.com.cn/problem/P2770)[道](https://www.luogu.com.cn/problem/P2774)[网](https://www.luogu.com.cn/problem/P3254)[络](https://www.luogu.com.cn/problem/P3355)[流](https://www.luogu.com.cn/problem/P3356)[无](https://www.luogu.com.cn/problem/P3357)[误](https://www.luogu.com.cn/problem/P3358)[经](https://www.luogu.com.cn/problem/P4009)[典](https://www.luogu.com.cn/problem/P4011)[题](https://www.luogu.com.cn/problem/P4012)[目](https://www.luogu.com.cn/problem/P4013)[的](https://www.luogu.com.cn/problem/P4014)[链](https://www.luogu.com.cn/problem/P4015)[接](https://www.luogu.com.cn/problem/P4016)$score$ : $140(2nd/14)$ = $65+75+0+0$
## $\color{#52C41A} T1兴趣小组(group) $
**四个**兴趣小组非常重要.
给出四位二进制掩码,表示是否参加四个小组.
互补编码归类成一个人自然是最优的选择.当然只要按位与为0的都可以进行合并.(意在没有参加相同的小组)
但如果从1开始贪心地合并,可能会出现无法占全位数的合并.我们先考虑可以占全的.
- 子任务 1:一个编号参加四个小组,多个编号