写的贪心过不了第二个点,求证明贪心错误性

P1616 疯狂的采药

贪心对了还要背包这东西何用......
by King_of_gamers @ 2018-10-30 20:18:25


@[ZORO](/space/show?uid=127018) ``` in: 121 3 100 200 30 49 61 110 out: 208 ``` 没问题的话你会输出200而不是208
by Kirisame_Marisa_ @ 2018-10-30 20:34:00


谢谢 @[Kirisame_Marisa_](/space/show?uid=44534)
by 雄鹰展翅 @ 2018-11-09 21:27:26


@[Kirisame_Marisa_](/user/44534) 是因为装不到最满吗?我也想用贪心算法来着
by 给我一个笑容 @ 2020-06-16 12:36:53


|