Vivek Puri's submission of ATM | CodeChef