Submission #1114577

#TimeUsernameProblemLanguageResultExecution timeMemory
1114577lftroqDetecting Molecules (IOI16_molecules)C++14
9 / 100
2 ms504 KiB
#include<bits/stdc++.h> #include "molecules.h" using namespace std; vector<int> find_subset(int l, int u, vector<int> w) { sort(w.begin(),w.end()); long long s=0; for(int i=0,j=0;i<(int)w.size();i++) { s+=w[i]; while(s>u) s-=w[j++]; if(s>=l) { vector<int> ans; for(int k=j;k<=i;k++) ans.push_back(k); return ans; } } return {}; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...