apple pie's submission of Team Formation | CodeChef