s19-04 Dynamic programming 1