apple pie's submission of Two Rooks | CodeChef