蒟蒻刚学线段树,求教

P5057 [CQOI2006] 简单题

orz橙名蒟蒻
by disangan233 @ 2018-12-17 18:54:15


请问您知道我哪里错了吗?@[disangan233](/space/show?uid=72679)
by Refined_heart @ 2018-12-17 18:58:49


@[Refined_heart](/space/show?uid=128591) 首先这个题不用这么做。。 **反转直接全部tag++然后tag&=1**
by disangan233 @ 2018-12-17 19:00:26


@[disangan233](/space/show?uid=72679) 您能说下我的代码哪里错了吗?您说的我听不懂啊……谢谢
by Refined_heart @ 2018-12-17 19:03:17


@[Refined_heart](/space/show?uid=128591) sgt只用维护加的`lazy tag`,每次区间+1,最后直接输出`query(xxx)&1`
by disangan233 @ 2018-12-17 19:20:45


@[disangan233](/space/show?uid=72679) 感谢
by Refined_heart @ 2018-12-17 19:33:49


|