Code for example problem from http://download.aupeo.com/problem.html.