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;
// #define int long long
vector<int> sub1(int l, int u, vector<int> w) {
int n = w.size();
int cur = 0;
vector<int> res;
for(int i = 0; i < n; i++) {
cur += w[i];
res.push_back(i);
if(cur >= l && cur <= u) {
return res;
}
}
return vector<int>(0);
}
vector<int> find_subset(int l, int u, vector<int> w) {
int n = w.size();
sort(w.begin(), w.end());
if(n <= 100 && w[n - 1] <= 100 && w[0] == w[n - 1]) {
return sub1(l, u, w);
}
return 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... |