蒟蒻求助

SP1043 GSS1 - Can you answer these queries I

# Orz
by noall @ 2019-05-05 23:15:43


@[Refined_heart](/space/show?uid=128591) 建议初始化所有的node,不然容易出锅
by wxwoo @ 2019-05-05 23:26:03


@[wxwoo](/space/show?uid=116659) 您能具体说下咋改吗?我用这个过了最大子段和的模板,但是这里WA了……(实际上是我太菜了……
by Refined_heart @ 2019-05-06 20:28:30


@[Langlangago](/space/show?uid=70178) $FAKE!$
by Refined_heart @ 2019-05-06 20:37:32


在node结构体内加上这么一个函数 ```cpp node() { s=ls=rs=ms=l=r=0; } ```
by wxwoo @ 2019-05-06 21:12:22


@[Refined_heart](/space/show?uid=128591)
by wxwoo @ 2019-05-06 21:12:30


@[wxwoo](/space/show?uid=116659) 加了,依旧错,您能看下还有哪里错了吗?
by Refined_heart @ 2019-05-06 21:19:06


@[Refined_heart](/space/show?uid=128591) 您的 `Query` 函数错误了。 当 `mid >= r` 时,才应当只返回左区间 当 `mid < l` 时,才应当只返回右区间 跟初始化无关。
by Wen_kr @ 2019-05-06 21:58:13


@[Wen_kr](/space/show?uid=25308) 明白了,多谢指教
by Refined_heart @ 2019-05-06 22:00:41


|