Problems from Waterloo Programming Contest 2004-09-19