結果 : greedy method vs dynamic programming