hdu 1025. DP, TLE
hdu 1166, segment tree