apple pie's submission of Remove and Add | CodeChef