| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 1196673 | amanthaband | Detecting Molecules (IOI16_molecules) | C++20 | 0 ms | 324 KiB | 
#include "molecules.h"
#include <vector>
#include <algorithm>
using namespace std;
vector<int> find_subset(int l, int u, vector<int> w) {
    int n = w.size();
    vector<pair<int,int>> in;
    for (int i = 0; i < n; i++)
    {
        in.push_back({w[i],i});
    }
    
    sort(in.begin(),in.end());
    int sum = 0;
    int left = 0,right = 0;
    
    while (right < n)
    {
        sum+= in[right].first;
        if(sum>u){
            sum-=in[left].first;
            --left;
        }
        if(sum>=l && sum<=u){
            vector<int> ans;
            for (int i = left; i < right; i++)
            {
                ans.push_back({in[i].second});
            }
            return ans;
        }
    }
    
    return {};
}
컴파일 시 표준 에러 (stderr) 메시지
| # | 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... | ||||
