[LintCode] Segment Tree Query