#include <algorithm> #include <iostream> #include <vector> using namespace std; struct Good { int price; int value; int PV; Good(const int p = 0, const int v = 0): price(p), value(v), PV(p * v) {} bool empty()const { return price == 0; } }; ...