#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: Bruno Benitez int DNI=43935617; //---:---<*>---:---<*>---:---<*>---:---<*>---:---<*> int promedio(list L){ list::iterator it= L.begin(); int suma=0,cont=0; while (it != L.end()){ suma+=*it; cont++; it++; } return suma/cont; } list prom_sublist(list& L, int S){ //COMPLETAR! list::iterator it= L.begin(); list::iterator it2= L.begin(); list aux; if(S==0)return aux; while(it != L.end()){ while(it2 != L.end()){ aux.push_back(*it2); if(promedio(aux)== S)return aux; it2++; } aux.clear(); it++; it2=it; } aux.clear(); return aux; } int main() { Eval ev; int vrbs = 0; ev.eval<1>(prom_sublist,vrbs); return 0; }