이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "molecules.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN=2e5+5;
pair<ll, int> v[MAXN];
vector<int> resp;
ll L, R;
int n;
vector<int> find_subset(int u, int l, vector<int> w) {
	L=u; R=l;
	int n=w.size();
	for(int i=1; i<=n; i++) v[i]={w[i-1], i-1};
	sort(v+1, v+1+n);
	int ind=1;
	ll soma=0;
	for(int i=1; i<=n; i++) {
		soma+=v[i].first;
		while(soma>R&&ind<i) soma-=v[ind++].first;
		if(L<=soma&&soma<=R) {
			//printf("achou!! %d %d\n", ind, i);
			for(int j=ind; j<=i; j++) resp.push_back(v[j].second);
			break;
		}
	}
	if(resp.size()) sort(resp.begin(), resp.end());
    return resp;
}
| # | 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... |