#include <bits/stdc++.h>
using namespace std;
ifstream fin ("date.in");
ofstream fout ("date.out");
#define cin fin
#define cout fout
vector <int> rez,a;
int s,n;
vector <pair <int,int>> p;
vector <int> find_subset (int l, int r, vector <int> v){
    n=v.size ();
    for (int i=0;i<n;++i){
        p.push_back ({v[i],i});
    }
    sort (p.begin (),p.end ());
    sort (v.begin (),v.end ());
    for (int i=n-1;i>=0;--i){
        int st=0,dr=i;
        while (st<=dr){
            int mij=(st+dr)/2;
            if (s+v[mij]>=l){
                dr=mij-1;
            }
            else{
                st=mij+1;
            }
        }
        if (st==i+1){
            s+=v[i];
            a.push_back (p[i].second);
        }
        else{
            s+=v[st];
            a.push_back (p[st].second);
            break;
        }
    }
    if (s>=l and s<=r) return a;
    a.clear ();
    s=0;
    for (int i=0;i<n;++i){
        int st=i,dr=n-1;
        while (st<=dr){
            int mij=(st+dr)/2;
            if (s+v[mij]>=l){
                dr=mij-1;
            }
            else{
                st=mij+1;
            }
        }
        if (st==n){
            s+=v[i];
            a.push_back (p[i].second);
        }
        else{
            s+=v[st];
            a.push_back (p[st].second);
            break;
        }
    }
    if (s>=l and s<=r) return a;
    return rez;
}
컴파일 시 표준 에러 (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... |