# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
233778 | jam_xd_ | Detecting Molecules (IOI16_molecules) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "molecules.h"
#include "bits/stdc++.h"
using namespace std;
vector<int> find_subset(int l, int u, vector<int> w) {
int gg = w[0], funcionaaa = w.size(), sum = 0;
bool afirmo;
vector<int>covid;
int nada[];
//nada.clear();
if(l == 0 and u == 0 and w[0] != 0)return nada;
for(int i=0;i<funcionaaa;i++){
if(sum > max(l,u)){
break;
}
sum = sum + gg;
covid.push_back(i+1);
if(sum >= min(l,u) and sum <= max(l,u)){
afirmo = true;
break;
}
}
if(afirmo == true)return covid;
else return nada;
}
//:v ??