Erfan Alimohammadi's submission of ATM | CodeChef