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 u, vector<int> w){
int n = (int)w.size();
vector<int> ans;
int sum = 0;
int id = -1;
for(int i = 0; i < n; ++i){
sum += w[i];
if(sum >= l){
id = i;
break;
}
}
if(sum <= u and ~id)
for(int i = 0; i <= id; ++i)
ans.push_back(i);
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... |