#include #include #include #include // istringstream #include // sort #include // pair #include // DBL_MAX typedef long long ll; using namespace std; int main(){ //// input int L, N; cin >> L >> N; vector blocks (N); for(int i=0; i> blocks[i]; } //// main sort(blocks.begin(), blocks.end()); //// output int idx, space = L; for(idx=0; idx