import sequtils, strutils var n, q, r, l: int (n, q) = map(readLine(stdin).split(), parseInt) var ans: int = 0 var a = newSeq[int](n) for _ in 0..