| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1343493 | tull | Detecting Molecules (IOI16_molecules) | C++20 | 32 ms | 4124 KiB |
#include "molecules.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> find_subset(int l, int u, vector<int> w) {
vector<int>a;
int sum=0,n=w.size();
int left=0;
vector<pair<int,int>>d;
//sort(w.begin(),w.end());
for(int i=0;i<n;++i){
int e=w[i];
if(e>=l and e<=u){
a.emplace_back(i);
return a;
}
d.emplace_back(e,i);
}
sort(d.begin(),d.end());
for(int right=0;right<n;++right){
sum+=d[right].first;
while(sum>u){
sum-=d[left++].first;
}
if(sum>=l and sum<=u){
for(;left<=right;++left){
a.emplace_back(d[left].second);
}
break;
}
}
return a;
}
| # | 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... | ||||
