摘要:
#include #include #include #include
using namespace std;
#define N 500
struct Bag
{ int id; int w; int v; double wv;
};
int C,n,Wsum,Vsum,best;
struct Bag bag[N];
int tempans[N],ans[N];
int cmp(const void *a,const void *b)
{ struct Bag *c = (Bag *) a; struct Bag *d = (Bag ... 阅读全文