| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1314617 | eldorbek_008 | Detecting Molecules (IOI16_molecules) | C++17 | 30 ms | 3484 KiB |
#include "molecules.h"
#include <bits/stdc++.h>
using namespace std;
// #define int int64_t
vector<int> find_subset(int low, int high, vector<int> w) {
int n = w.size();
vector<pair<int, int>> p(n);
for (int i = 0; i < n; i++) {
p[i].first = w[i];
p[i].second = i;
}
sort(p.begin(), p.end());
int s = 0;
int l = 0, r = 0;
while (l < n and r < n) {
while (r < n and s < low) {
s += p[r].first;
r++;
}
while (l < r and s > high) {
s -= p[l].first;
l++;
}
if (low <= s and s <= high) {
vector<int> i;
while (l < r) {
i.push_back(p[l++].second);
}
sort(i.begin(), i.end());
return i;
}
}
return vector<int>(0);
}
컴파일 시 표준 에러 (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... | ||||
