#define USECHRONO #undef HAVE_MPI #include "eval.hpp" #include #include #include #include using namespace aed; using namespace std; // Escribir una función void set3par(vector> &VS, set &S) que dado un vector de conjuntos VS, // debe retornar en el conjunto S, la unión de todos los juntos que tienen al menos 3 numeros pares. //---:---<*>---:---<*>- COMIENZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> // COMPLETAR DNI y NOMBRE AQUI: // Nombre: Francisco Giordano int DNI=42064149; bool tiene3par (set &A){ int cant = 0; for (auto element : A){ if(element %2 == 0){ cant++; } } return (cant >= 3); } //---:---<*>---:---<*>---:---<*>---:---<*>---:---<*> void set3par(vector> &VS, set &S) { S.clear(); for (auto &s : VS){ if(tiene3par(s)){ S.insert(s.begin(),s.end()); } } } //---:---<*>---:---<*>- FINALIZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> int main() { Eval ev; int vrbs=0; ev.eval<1>(set3par,vrbs); return 0; }