apple pie's submission of Nearest Court | CodeChef