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"
std::vector<int> find_subset(int l, int u, std::vector<int> w) {
int n=w.size(), kiri=0, sums=0, i=0;
std::vector<int>ans;
for(;i<n;++i){
sums+=w[i];
while(sums > u) sums-=w[kiri++];
if(sums>=l && sums<=u){
for(int j=kiri;j<=i;++j) ans.push_back(j);
return ans;
}
}
return std::vector<int>(0);
}
# | 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... |