제출 #403268

#제출 시각아이디문제언어결과실행 시간메모리
403268MDarioDetecting Molecules (IOI16_molecules)C++11
69 / 100
52 ms5524 KiB
#include "molecules.h" #include<bits/stdc++.h> using namespace std; #define F first #define S second std::vector<int> find_subset(int l, int u, vector<int> z){ vector<int> v; vector<pair<int, int>> w; int c=0, s=0, n=z.size(); for(int i=0; i<n; i++){ w.push_back({z[i], i}); } sort(w.begin(), w.end()); for(int i=0; i<n; i++){ while(s<l&&c<n){ s+=w[c].F; c++; } if(l<=s&&s<=u){ for(int t=i; t<c; t++)v.push_back(w[t].S); break; } s-=w[i].F; } return v; }
#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...