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<bits/stdc++.h>
using namespace std;
vector<int> find_subset(int L, int R, vector<int> w){
int n = w.size();
vector<int> ans;
int l=0, r=0, sum=0;
while(r<n){
if(sum<=R) sum += w[++r];
if(sum>R) sum -= w[l++];
if(sum>=L && sum<=R){
for(int i = l; i < r; i++) ans.push_back(i);
break;
}
}
return ans;
}
# | 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... |