# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
614327 | shezitt | Detecting Molecules (IOI16_molecules) | C++14 | 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;
// Subtask 1
vector<int> find_subset(int l, int u, vector<int> w) {
int x = w[0], n = w.size();
if(x == l && x == u){
return {0};
}
int i;
for(i=0, aux=0; i<n && aux < l; ++i){
aux += x;
}
if(aux >= l && aux <= u){
vector<int> ans(i);
iota(ans.begin(), ans.end(), 0);
return ans;
}
return {};
}