# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
403288 | Leonardo_Paes | Detecting Molecules (IOI16_molecules) | C++17 | 1 ms | 236 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 <bits/stdc++.h>
using namespace std;
vector<int> find_subset(int ll, int u, vector<int> v){
vector<int> ans;
sort(v.begin(), v.end());
int l = 0;
long long sum = 0;
for(int r=0; r<v.size(); r++){
sum += v[r];
while(sum > u) sum -= v[l++];
if(ll <= sum and sum <= u){
while(l <= r) ans.push_back(l++);
break;
}
}
return ans;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |