apple pie's submission of Yet Another Constructive Problem | CodeChef