#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long int ll; typedef pair P; int n; ll W; ll v[5001], w[5001]; int ind[5001]; ll ans; double rsolve(int i, double ws, double vs){ for(int k=i; k>n>>W; for(int i=0; i>v[i]>>w[i]; } sort(ind, ind+n, [&](int i, int j){ return (double)v[i]/(double)w[i]>(double)v[j]/(double)w[j];}); solve(0, 0, 0); cout<