apple pie's submission of Determine the Winner | CodeChef