Add Dynamic Programming solution: TCCC 2003 Semifinal 3