제출 #890223

#제출 시각아이디문제언어결과실행 시간메모리
890223MercubytheFirstDetecting Molecules (IOI16_molecules)C++14
9 / 100
1 ms600 KiB
#include "molecules.h" #include<algorithm> #include<assert.h> #include<numeric> #include<iostream> using namespace std; using ll = long long; vector<int> find_subset(int weight_low, int weight_hi, vector<int> w) { int n = w.size(); sort(w.begin(), w.end()); for(int l = 0; l < n; ++l){ for(int r = l; r < n; ++r){ ll sum = 0; for(int i = l; i <= r; ++i) sum += w[i]; if(weight_low <= sum and sum <= weight_hi){ vector<int> ans; for(int i = l; i <= r; ++i) ans.push_back(i); return ans; } } } return vector<int>(); }
#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...