Submission #391511

#TimeUsernameProblemLanguageResultExecution timeMemory
391511giorgikobDetecting Molecules (IOI16_molecules)C++14
0 / 100
1 ms296 KiB
#include "molecules.h" #include<bits/stdc++.h> #define ll long long #define pb push_back using namespace std; std::vector<int> find_subset(int l, int u, std::vector<int> w) { sort(w.begin(),w.end()); if(w[0] > u) return {}; vector<int>answer; ll sum = 0; while(sum < l){ sum += w.back(); answer.pb(w.size()-1); w.pop_back(); } if(sum < l) return {}; return answer; }
#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...