package main import ( "fmt" ) func main() { var n, q, l, r int fmt.Scan(&n, &q) a := make([]int, n) ap := make([]int64, n + 1) ap[0] = 0 for i := 0; i < n; i++ { fmt.Scan(&a[i]) ap[i + 1] = ap[i] + int64(a[i]) } for j :=...