# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
170021 | whttt | Detecting Molecules (IOI16_molecules) | C++14 | 3 ms | 376 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <vector>
#include <algorithm>
#define ll long long
using namespace std;
vector<ll> find_subset(int l, int u, vector<int> w){
ll sum = 0;
vector<ll> returnThis;
sort(w.begin(), w.end());
for(ll i = 0;i < w.size();i++){
sum += w[i];
if(sum <= u && sum >= l){
for(ll j = 0;j <= i;j++){
returnThis.push_back(w[i]);
}
return returnThis;
} else if(sum > l){
sum -= w[i];
for(ll j = i;j < w.size();j++){
sum += w[j]-w[j-i];
if(sum <= u && sum >= l){
for(ll j = 0;j <= i;j++){
returnThis.push_back(w[i]);
}
return returnThis;
}
if(j == w.size()-1){
return {};
}
}
}
}
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... |