可持续化线段树(例题Sign on Fence[Codeforces 484E])
刚刚学习的想记录一下: 第一次接触可持续化线段树,很懵。。。 题目: 题目描述 izon the Champion has recently finished painting his wood fence. The fence consists of a sequence of n panels of 1 meter width and of arbitrary height. The i -th panel's height is h i meters. The adjacent planks follow without a gap between them. After Bizon painted the fence he decided to put a "for sale" sign on it.The sign will be drawn on a rectangular piece of paper and placed on the fence so that the sides of the sign are parallel to the fence panels and are also aligned with the edges of some panels. Bizon the Champion introduced the following