# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
424926 | Ahmadsm2005 | Detecting Molecules (IOI16_molecules) | C++14 | 1 ms | 296 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 "grader.cpp"
#include<bits/stdc++.h>
using namespace std;
vector<int>find_subset(int l,int u,vector<int>w){
vector<int>ANS;
long long SUM=0;
int L=0;
sort(w.begin(),w.end());
for(int i=0;i<w.size();i++){
SUM+=w[i];
while(SUM>u)
SUM-=w[L],L++;
if(SUM>=l&&SUM<=u){
for(int l=L;l<=i;l++)
ANS.push_back(w[l]);
return ANS;
}
}
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... |