Anshuman Chakravarty's submission of ATM | CodeChef