# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1019884 | vjudge1 | Detecting Molecules (IOI16_molecules) | C++17 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#define int long long
#define vi vector<long long>
#define vvi vector<vi>
#define pi pair<long long, long long>
#define vpi vector<pi>
#define loop(a, b) for(long long a = 0;a<b;a++)
#define all(a) a.begin(), a.end()
#define space << " " <<
#define flase false
#define fasle flase
using namespace std;
const int VeryBigNumber = 1e18 + 42 + 1;
const int VeryNiceNumber = 420 + 69;
void debug(vector<int>& a, string name){
cout << name << " :";
for(int i : a){
cout << " " << i;
}
cout << endl;
return;
}
vi find_subset(int l, int u, vi w){
int wnow = 0;
int n = w.size();
loop(i, n){
wnow += w[i];
if (wnow <= u and wnow >= l){
vi ans = {};
loop(j, i+1){
ans.push_back(j);
}
return ans;
}
}
return {};
}
/*
signed main(){
vi v = find_subset(5, 7, {1, 1, 1, 1, 1, 1, 1});
debug(v, "v");
return 0;
}
*/
/*
l < k*Wi < u
*/