摘要:
#include<algorithm> #include<string.h> #include<iostream> #include<stdio.h> #include<string.h> using namespace std; struct TvShow { int Ti_s; int Ti_e 阅读全文
摘要:
题目大意为:一共m元钱,有n种物品,每种物品重量为j,价值为f,性价比为s。可以整个买,也可以切割开来买。即可以使用0到f的任意价格购买相应磅的物品:使用0.3f,购买0.3j磅的物品。 很明显,这是一道贪心的算法题。每次我们只需要取性价比最高的物品即可。1、排序 2、取物 #include<alg 阅读全文