D. Strange Queries
time limit per test
3 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
You are given an array with n integers a1, a2, ..., an, and q queries to answer.
Each query consists of four integers l1, r1,