题解
线段树板子。每个节点维护一个 tag 表示这段区间被进行的最大的一次 222 操作是多少即可。然后 111 操作的时候先 pushdown,再清空一下叶子节点的 tag 就好啦。
tag
pushdown
具体看 代码。