# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1102133 | akzytr | 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>
typedef long long ll;
using namespace std;
vector<int> find_subset(int l, int u, vector<int> w) {
vector<int> result;
int sum = 0;
for(int i = 0; i < n; i++) {
sum += a[i];
if(sum >= l && sum <= u) {
for(int j =0; j <= i; j++){
result.push_back(j+1);
}
break;
}
}
return result;
}