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<algorithm>
#include<assert.h>
#include<numeric>
#include<iostream>
using namespace std;
using ll = long long;
vector<int> find_subset(int weight_low, int weight_hi, vector<int> w) {
int n = w.size();
sort(w.begin(), w.end());
for(int l = 0; l < n; ++l){
for(int r = l; r < n; ++r){
ll sum = 0;
for(int i = l; i <= r; ++i)
sum += w[i];
if(weight_low <= sum and sum <= weight_hi){
vector<int> ans;
for(int i = l; i <= r; ++i)
ans.push_back(i);
return ans;
}
}
}
return vector<int>();
}
# | 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... |