This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "molecules.h"
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
std::vector<int> find_subset(int l, int u, std::vector<int> w) {
int N = w.size();
sort(w.begin(), w.end());
ll taken = 0;
vector<int> v;
for(int i = N - 1; i >= 0; --i){
if(taken < l && taken + w[i] <= u){
taken += w[i];
v.push_back(i);
}
}
sort(v.begin(), v.end());
if(taken < l or taken > u)v.clear();
return v;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |