內排序- 當有兩種以上變元的時候的貪心算法

POJRainbow的商店 這道題就是利用貪心的思路,把物品按照從利潤高到低排序,沒見物品都考慮在它能夠被賣出去的最後一天賣出,若是不行就不賣。ios #include <iostream> #include <algorithm> using namespace std; const int MaxN = 1e4 + 8; struct goods { int pro; int
相關文章
相關標籤/搜索