#include "molecules.h"
#include <bits/stdc++.h>
using namespace std;
// #define int long long
// #define endl '\n'
#define ff first
#define ss second
#define pb push_back
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define ar array
const int MOD = 1e9 + 7,INF = 1e9, N = 2e5 + 5;
vector<int> find_subset(int x, int y, vector<int> w) {
	vector <pair<int,int>> b;
    int n = w.size();
    
    for(int i = 0;i < n;i++){
		b.pb({w[i] , i});
	}
	sort(all(b));
    vector <int> ans;
    
    int sum = w[0];
    
    int l = 0, r = 0;
    
    while(l < n && r < n){
		if(x < sum && sum < y){
			int res = 0;
			for(int i = l;i <= r;i++){
				ans.pb(b[i].ss);
				res += b[i].ff;
			}
			return ans;
		}
		else if(sum <= x && r <  n - 1){
			r++;
			sum += b[r].ff;
		}
		else if(sum >= y && l < r){
			sum -= b[l].ff;
			l++;
		}
		else{
			return ans;
		}
	}
	
	return ans;
}
Compilation message (stderr)
molecules.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
molecules_c.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~| # | 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... |