#define USECHRONO #undef HAVE_MPI #include "eval.hpp" #include #include #include #include #include #include using namespace aed; using namespace std; //---:---<*>---:---<*>- COMIENZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> // COMPLETAR DNI y NOMBRE AQUI: // Nombre: Godoy Ángel int DNI=43124241; //---:---<*>---:---<*>---:---<*>---:---<*>---:---<*> int promedio(list &A){ return accumulate(A.begin(),A.end(),0)/A.size(); } list prom_sublist(list& L, int S){ //COMPLETAR! if(L.empty()) return L; list aux; list::iterator it=L.begin(); while(it!=L.end()){ aux.clear(); auto it2=it; while(it2!=L.end()){ aux.push_back(*it2); if(promedio(aux)==S and promedio(aux)!=0){ return aux; } it2++; } it++; } aux.clear(); return aux; } int main() { Eval ev; int vrbs = 0; ev.eval<1>(prom_sublist,vrbs); return 0; }