#include #include struct beras { unsigned short w; unsigned short c; double CostPerWeight; }; typedef beras Beras; using std::cout; using std::cin; using std::endl; Beras B[1000]; Beras BSorted[1000]; void insertionSort(unsigned short); int main() { unsigned short n; unsigned int x; cin>>n>>x; for(unsigned short i=0; i>B[i].w; } for(unsigned short i=0; i>B[i].c; B[i].CostPerWeight=((double)B[i].c)/B[i].w; insertionSort(i); } unsigned short i=0; while(x>0 && i0 && BSorted[i-1].CostPerWeight