#define USECHRONO #undef HAVE_MPI #include "eval.hpp" #include #include #include #include #include using namespace aed; using namespace std; //---:---<*>---:---<*>- COMIENZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> // COMPLETAR DNI y NOMBRE AQUI: // Nombre: Mauro Negri Chamorro int DNI=41513523; //---:---<*>---:---<*>---:---<*>---:---<*>---:---<*> bool prom_subc(set &S,int prom) { if (prom == 0) return true; if (S.find(prom) != S.end()) return true; auto itS = S.begin(); while (itS != S.end()){ if (*itS < prom){ set aux = S; aux.erase(*itS); if (prom_subc(aux,prom-*itS)) return true; } ++itS; } return false; } bool prom_subc(set &S) { // COMPLETAR int prom = 0; float sum = 0; for (auto x: S){ sum += x; } prom = sum/S.size(); return prom_subc(S,prom); } int main() { Eval ev; int vrbs = 0; ev.eval<1>(prom_subc,vrbs); return 0; }