#define USECHRONO #undef HAVE_MPI #include "eval.hpp" #include #include #include #include using namespace aed; using namespace std; //---:---<*>---:---<*>- COMIENZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> // COMPLETAR DNI y NOMBRE AQUI: // Nombre: Gonzalo Martinez Yattah int DNI=44780897; bool compararDist(int x, int y, int prom){ int distX = abs(x - prom); int distY = abs(y - prom); return distX < distY; } void prom_distance(list &L){ int suma = 0; for(auto n : L){ suma += n; } int prom = suma/L.size(); //ordena la lista comparando la distancia de x y de y L.sort([prom](int x, int y){return compararDist(x,y,prom);}); } //---:---<*>---:---<*>- FINALIZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> int main() { Eval ev; int vrbs=0; ev.eval<1>(prom_distance,vrbs); return 0; }