dynamic programming(not easy)
dynamic programming