Tran Xuan Bach's submission of ATM | CodeChef