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 <iostream>
#include <vector>
#include <algorithm>
using namespace std;
vector<int> find_subset(int l, int u, vector<int> w) {
sort(w.begin(), w.end());
int n=w.size();
int a, b, cc, pos;
vector<int>result;
a=b=cc=pos=0;
while(1){
if(b>=n) break;
if(cc<l){
cc+=w[a++]; continue;
}
if(cc>u){
cc-=w[b++]; continue;
}
for(int i=a; i<b ; i++){
result.push_back(w[i]);
}
return result;
}
return std::vector<int>(0);
}
# | 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... |