#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: Pastor Nicolas int DNI=42611881; bool tiene_al_menos_tres_pares(set &S) { set::iterator it=S.begin(); int n=0; while(it!=S.end()) { if((*it)%2==0) ++n; if(n>=3) return true; ++it; } return false; } //---:---<*>---:---<*>---:---<*>---:---<*>---:---<*> void set3par(vector> &VS, set &S) { vector>::iterator it=VS.begin(); set aux; while(it!=VS.end()) { if(tiene_al_menos_tres_pares(*it)){ aux=S; S.clear(); set_union(*it,aux,S); } ++it; } } //---:---<*>---:---<*>- FINALIZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> int main() { Eval ev; int vrbs=0; ev.eval<1>(set3par,vrbs); return 0; }