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;
std::vector<int> find_subset(int l, int u, vector<int> w){
vector<int> v;
int c=1, s=w[0], n=w.size();
sort(w.begin(), w.end());
for(int i=0; i<n; i++){
while(s<l&&c<n){
s+=w[c];
c++;
}
if(l<=s&&s<=u){
for(int t=i; t<c; t++)v.push_back(t);
break;
}
s-=w[i];
}
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... |