/* * 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. */ #include /* N is the number of pillars and Q is the number of questions. */ int N; int Q; /* H contains the pillar heights. The array starts from 0. */ int H[200005]; /* L and R contain the inclusive, 1-based question endpoints. */ int L[200005]; int R[200005]; long long answer; int main(void) { int i; /* Read the pillars and questions. */ scanf("%d%d", &N, &Q); for (i = 0; i < N; i++) { scanf("%d", &H[i]); } for (i = 0; i < Q; i++) { scanf("%d", &L[i]); scanf("%d", &R[i]); } /* * TODO: Answer every question independently. An answer may exceed 32-bit * integer range. */ for (i = 0; i < Q; i++) { printf("%lld\n", answer); } return 0; }