제출 #773374

#제출 시각아이디문제언어결과실행 시간메모리
773374MatblubeDetecting Molecules (IOI16_molecules)C++17
0 / 100
1 ms212 KiB
#include "molecules.h" #include <iostream> #include <vector> #include <algorithm> using namespace std; vector<int> find_subset(int l, int u, vector<int> w) { sort(w.begin(), w.end()); int n=w.size(); int a, b, cc; vector<int>result; a=b=cc=0; while(1){ if(b>n || a>n) break; if(cc<l){ cc+=w[a++]; continue; } if(cc>u){ cc-=w[b++]; continue; } for(int i=b; i<a ; i++){ result.push_back(w[i]); } return result; } return std::vector<int>(0); }
#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...