_Sam's submission of A humongous Query | CodeChef