# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
233792 | 2020-05-21T17:43:16 Z | jam_xd_ | Detecting Molecules (IOI16_molecules) | C++17 | 0 ms | 0 KB |
#include "molecules.h" #include "bits/stdc++.h" using namespace std; vector<int> find_subset(int l, int u, vector<int> w) { int gg = w[0], funcionaaa = w.size(), sum = 0; bool afirmo; vector<int>covid; vector<int>nada; if(l == 0 and u == 0 and w[0]!= 0)return nada; else{ guardar = 1; for(int i=1; i<=funcionaaa;i++){ if(gg * funcionaaa < min(l,u) or sum > max(l,u)){ break; } sum = sum + gg; covid.push_back(guardar); guardar++; if(sum >= min(l,u) and sum <= max(l,u)){ afirmo = true; break; } } if(afirmo == true)return covid; else return nada; } } //:v ??