#include "molecules.h"
#include <bits/stdc++.h>
using namespace std;
std::vector<int> find_subset(int l, int u, std::vector<int> v) {
vector<int> ans; int n = (int)v.size();
for (int i = 0; i < (int)v.size(); i++) {
if (v[i] >= l && v[i] <= u) {
ans.push_back(i);
return ans;
}
}
vector<pair<int, int>> w;
for (int i = 0; i < n; i++) w.push_back({v[i], i});
set<pair<int, int>> pfxs; pfxs.insert({0, 0});
int curp = 0;
sort(w.begin(), w.end());
for (int i = 0; i < n; i++) {
pfxs.insert({curp, i});
curp += w[i].first;
// lower bound pj - u
auto it = pfxs.lower_bound({curp - u, -1e18});
if (it != pfxs.end()) {
pair<int, int> x = *it;
if (x.first <= curp - l) {
int j = x.second;
vector<int> tmpp;
for (int z = j; z <= i; z++) {
tmpp.push_back(w[z].second);
}
return tmpp;
}
}
// vector<int> tmp; int cs = 0;
// for (int j = i; j < n; j++) {
// cs += w[j].first;
// tmp.push_back(w[j].second);
// if (cs >= l && cs <= u) {
// return tmp;
// }
// }
}
vector<int> ans2; return ans2;
}