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 <algorithm>
#include "molecules.h"
using namespace std;
std::vector<int> find_subset(int l, int u, std::vector<int> w) {
vector<int> ret;
sort(w.begin(),w.end());
if(u < w[0]) return ret;
int hi=w.size()-1;
while(l > 0 && u > 0 && hi >= 0){
while(w[hi] > u) hi--;
if(u-w[hi] >= 0){
l -= w[hi];
u -= w[hi];
hi--;
}
}
return ret;
}
# | 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... |