結果 : dynamic programming and greedy method difference