apple pie's submission of Diagonal movement | CodeChef