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;
typedef long long ll;
const int N = 1e5 + 545 , inf = 1e9 + 199;
#include "molecules.h"
vector<int> find_subset(int left, int right, vector<int> a){
int n = a.size();
int l = 0 , r = 0;
ll sum = 0;
sort(a.begin() , a.end());
vector<int> res;
for(int i=0;i<n;i++) {
if(r < n && sum < left){
sum += a[r++];
}
else if(sum > right) {
sum -= a[l++];
}
else{
break;
}
}
if(sum < left || sum > right) {
return res;
}
for(int i=l;i<r;i++){
res.push_back(i);
}
return res;
}
# | 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... |