# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
132799 | 2019-07-19T15:04:08 Z | reda | Detecting Molecules (IOI16_molecules) | C++14 | 0 ms | 0 KB |
#include<bits/stdc++.h> using namespace std ; vector<int>find_subset(int l, int r, vector<int> w) { vector<int> ans; int c=0; for(int i=0;i<w.size();i++) { if(c+w[i]<=r && c+w[i]>=l) { c+=w[i]; ans.push_back(w[i]); } else break; } return ans; return 0; }