I am getting wrong answer for https://mirror.codeforces.com/contest/1520/problem/F1. Can someone please look at my submission and help whats wrong here? I tried many samples but couldn't find the bug.
https://mirror.codeforces.com/contest/1520/submission/115514700
updated link with l = 1 — https://mirror.codeforces.com/contest/1520/submission/115621830
TIA
You are asking the queries in zero-based indexing. For your first query , l=0 .