贪心算法(C++描述)
#include <iostream>#include <algorithm>using namespace std;const int N = 1000005;double w[N];int main(){ double c; int n; cout << "请输入载重量c及古董个数n: " << endl; cin >...