srm 590 initial.
DP solution for 1000pt