# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
264303 | 2020-08-14T06:07:02 Z | amalla | Detecting Molecules (IOI16_molecules) | C++17 | 0 ms | 0 KB |
#include "molecules.h" #include<bits/stdc++.h> using namespace std; #define ll long long vector<int> find_subset(int l, int u, vector<int> w) { int N = w.size(); sum = 0; for (int i = 0; i<N; ++i) { sum += w[i]; if (l<=sum && sum<=u) { vector<int> Ans(i); for (int j = 0; j<=i; ++j) Ans[j] = j; return Ans; } } return vector<int>(0); }