| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1302120 | lunarecho | Detecting Molecules (IOI16_molecules) | C++20 | 2 ms | 340 KiB |
#include "molecules.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
vector<int> find_subset(int lower, int upper, vector<int> weights) {
int n = weights.size();
vector<pair<ll,int>> p(n);
for(int i=0;i<n;++i) {
p[i] = {weights[i], i};
}
sort(p.begin(), p.end());
bool f = false;
int l = 0, r = 0;
ll s = 0;
while(r < n) {
s += p[r].first;
while(s > upper) {
s -= p[l].first;
++l;
}
if(lower <= s && s <= upper) {
f = true;
break;
}
++r;
}
vector<int> ans;
for(int i=l;i<=r;++i) {
ans.push_back(p[i].second);
}
sort(ans.begin(), ans.end());
return ans;
}
컴파일 시 표준 에러 (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... | ||||
