apple pie's submission of Control the Pollution | CodeChef