apple pie's submission of Hardest Problem Bet | CodeChef