aman agarwal's submission of Double Distance Query | CodeChef