| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 1282733 | enzy | Detecting Molecules (IOI16_molecules) | C++20 | 0 ms | 0 KiB | 
#include "molecules.h"
#include<bits/stdc++.h>
using namespace std;
vector<int> find_subset(int l, int u, vector<int> w){
    int sum=0, at=0;
    for(int i=0;i<w.size();i++){
        sum+=w[i];
        while(sum>r){
            sum-=w[at];
            at++;
        }
        if(l<=sum&&sum<=r){
            vector<int>resp;
            for(int j=at;j<=i;j++) resp.push_back(j);
            return resp;
        }
    }
    return {};
}
