import sys sys.setrecursionlimit(1000000000) # # Solution Template for Conformity # # Australian Informatics Olympiad 2026 Invitationals # # This file is provided to assist with reading of input and writing of output # for the problem. You may modify this file however you wish, or # you may choose not to use this file at all. # # N is the number of pillars and Q is the number of questions. N = 0 Q = 0 # H contains the pillar heights. The list starts from 0. H = [] # L and R contain the inclusive, 1-based question endpoints. L = [] R = [] # Read the pillars and questions. N, Q = map(int, input().strip().split()) H = list(map(int, input().strip().split())) for i in range(0, Q): input_vars = list(map(int, input().strip().split())) L.append(input_vars[0]) R.append(input_vars[1]) # TODO: Answer every question independently. An answer may exceed 32-bit # integer range. answer = 0 for i in range(0, Q): print(answer)