#include #include #include #include using namespace std; int n,m; vector d(1000); int pick(int now,int sum,int remain){ remain-=1; int place; int tmp; int min=20000; for(int k=0;k>n>>m; for(int i=0;i>d[i]; cout<