Maximum Sum Segment

You are given an array a of n positive integers. You Have to perform Q query on it. In each query, y...