IOI09D - Editorial

PROBLEM LINKS:

Practice
Contest

DIFFICULTY:

Easy-Medium

PREREQUISITES:

Dynamic Programming

SOLUTION:`

http://www.ioi2009.org/GetResource?id=1969 Page 48

SOURCE:

Can be found here.