_Sam's submission of Querying on a Grid | CodeChef