#define USECHRONO #undef HAVE_MPI #include "eval.hpp" #include #include #include #include using namespace aed; using namespace std; bool even(int x) { return x%2==0; } bool odd(int x) { return x%2; } bool ge7(int x) { return x>=7; } bool le3(int x) { return x<=3; } bool div4(int x) { return x%4==0; } bool isprime(int x) { return is_prime(abs(x)); } bool isnotprime(int x) { return !is_prime(abs(x)); } //---:---<*>---:---<*>- COMIENZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> // COMPLETAR DNI y NOMBRE AQUI: // Nombre: Jorge Palacios. int DNI=43644738; //---:---<*>---:---<*>---:---<*>---:---<*>---:---<*> void predsplit(list &L,bool (*pred)(int),list> &LLtrue, list> &LLfalse) { auto it = L.begin(); while(true){ listaux = {}; if(pred(*it)){ while(pred(*it) && it!=L.end()){ aux.push_back(*it); it++; } if(aux.size() != 0){ LLtrue.push_back(aux); aux.clear(); } } if(!pred(*it)){ while(!pred(*it) && it!=L.end()){ aux.push_back(*it); it++; } if(aux.size() != 0){ LLfalse.push_back(aux); aux.clear(); } } if(it == L.end()){ break; } } } //---:---<*>---:---<*>- FINALIZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> int main() { Eval ev; int vrbs=0,seed=123; ev.eval<1>(predsplit,vrbs); return 0; }