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>
#define ll long long
#define pb push_back
using namespace std;
std::vector<int> find_subset(int l, int u, std::vector<int> w) {
sort(w.begin(),w.end());
if(w[0] > u) return {};
vector<int>answer;
ll sum = 0;
while(sum < l){
sum += w.back();
answer.pb(w.size()-1);
w.pop_back();
}
if(sum < l) return {};
return answer;
}
# | 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... |