New solution for timus_1389

The previous solution of Jul 6 2011 failed after recent rejudge due to TLE.
It was a naive Kuhn-matching solution.

3 years after that I come back and solve it with a new DP solution and get my
ACC in 0.296s! Great job :)