Srivatsh Agarwal's submission of ATM | CodeChef