| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1303710 | khba | Detecting Molecules (IOI16_molecules) | C++20 | 1 ms | 348 KiB |
#include "molecules.h"
#include "bits/stdc++.h"
using namespace std;
vector<int> find_subset(int L, int R, vector<int> w) {
int n = w.size();
vector <int> o(n);
iota(begin(o), end(o), 0);
sort(begin(o), end(o), [&] (int r, int l) { return w[r] < w[l]; });
int64_t s = 0;
for (int r = 0, l = 0; r < n; ++r) {
s += w[o[r]];
while (s > R) s -= w[o[l++]];
if (s >= L) {
vector <int> ans;
for (int i = l; i <= r; ++i) ans.emplace_back(o[i] + 1);
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... | ||||
