5 3 1 2 3 4 5 2 1 3 1 2 10 2 1 3
6 14
4 2 1 1 1 1 2 1 4 2 2 3
4 2
3 4 5 -3 2 2 1 3 1 2 7 2 1 3 2 2 2
4 14 7
Given an array of nnn integers, process qqq queries:
For this input, the required output is 6 14.
For this input, the required output is 4 2.
For this input, the required output is 4 14 7.