| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1331639 | 12345678 | Detecting Molecules (IOI16_molecules) | C++17 | 1 ms | 344 KiB |
#include "molecules.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
std::vector<int> find_subset(int l, int u, std::vector<int> w) {
int n=w.size();
vector<pair<ll, ll>> srt;
for (int i=0; i<n; i++) srt.push_back({w[i], i});
sort(srt.begin(), srt.end());
ll sm=0, lst=0;
for (int i=0; i<n; i++)
{
sm+=w[i];
while (sm>u) sm-=srt[lst].first, lst++;
if (sm>=l)
{
vector<int> res;
for (int j=lst; j<=i; j++) res.push_back(srt[j].second);
return res;
}
}
return vector<int> ();
}
| # | 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... | ||||
