Driver Code
if __name__ == " _ _ main _ _ " : NEW_LINE INDENT a = [ [ 5 , 6 ] , [ 1 , 3 ] , [ 8 , 10 ] ] NEW_LINE n = 3 NEW_LINE queries = [ 2 , 3 , 4 , 7 ] NEW_LINE q = len ( queries ) NEW_LINE DEDENT