Range of a query

Problem Name:
Range of a query
Site:HackerEarth
Links:
Tags:
Problem setters: