[LintCode] Segment Tree Query II