#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: Mercedes Gorría int DNI=43348764; bool esPrimo(int n){ if(n==0) return false; if(n==1) return false; if(n==4) return false; for(int i = 2; i < (n/2); i++){ if(n % i == 0) return false; } return true; } // debe retornar en S la unión de todos los juntos que tienen al menos un número primo. void set_prime(vector> &VS, set &S) { for(int i=0;iaux; aux=VS[i]; auto it=aux.begin(); while(it!=aux.end() ) { if( esPrimo(*it) ) { auto it2=aux.begin(); while(it2!=aux.end()){ S.insert(S.end(), *it2); it2++; } break; } else{ it++; } } } } //---:---<*>---:---<*>- FINALIZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> int main() { Eval ev; int vrbs=0; ev.eval<1>(set_prime,vrbs); return 0; }