UVa 111 - History Grading

This is a DP Problem - a modified Longest Increasing Sequence.