結果 : greedy algorithm vs dynamic programming