結果 : differentiate between greedy method and dynamic programming