Sync solutions from hanyixuanten/luogu@e8764c0

gitea-actions[bot] committed 2026-10-28 08:20:56 +00:00
1 parent cf12794b46
commit 404b43ae09
2 files changed
+8

No files matched your search

+7
@@ -0,0 +1,7 @@
# P7707 「Wdsr-2.7」百花齐放的太阳花田 题解
题意:给定 $n$ 个项,每个项有一个高度 $h$ 和种类 $k$,随后有 $m$ 次操作,每次添加一个项或求 $[l, r]$ 中高度大于 $h$ 的项目拼接在一起后连续的种类相同的块的数量。强制在线。
考虑开一个区间为 $[1, n + m]$ 的线段树,其中每个节点保存一个 `vector`,保存范围内每个相邻的 $h$ 区间内的结果。对于还没有数据的点,在查询时一定会递归到下方的节点。
[code](../P7707.cpp)
+1
@@ -22,3 +22,4 @@
- [[P3572|P3572]]
- [[P4342|P4342]]
- [[P6650|P6650]]
- [[P7707|P7707]]