Problems from Waterloo Programming Contest 1997-10-18