#include <bits/stdc++.h>
// #define int long long
#define dbg(x) cerr << #x << " -> " << x << "\n"
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define len(x) (int)(x).size()
#define pii pair<int,int>
using namespace std;
vector<int> find_subset(int l, int u, vector<int> w){
int n = len(w);
vector<int> idx(n);
iota(all(idx),0);
sort(all(idx),[&](int x, int y){
return w[x] < w[y];
});
int L = 0;
int R = 0;
long long cur = w[idx[L]];
if(cur <= u and cur >= l){
return vector<int>{idx[0]};
}
vector<int> ans;
while(R + 1 < n) {
++R;
cur += w[idx[R]];
if(cur <= u and cur >= l){
for(int i = L; i <= R; ++i){
ans.pb(idx[i]);
}
return ans;
}
if(cur > u){
cur -= w[idx[L]];
++L;
}
if(cur <= u and cur >= l){
for(int i = L; i <= R; ++i){
ans.pb(idx[i]);
}
return ans;
}
}
return vector<int>{};
}