#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: Bruno Benitez int DNI=43935617; //---:---<*>---:---<*>---:---<*>---:---<*>---:---<*> void predsplit(list &L,bool (*pred)(int),list> &LLtrue, list> &LLfalse) { list::iterator it = L.begin(); list auxTrue; list auxFalse; while(it != L.end()){ if(pred(*it)){ if(auxTrue.empty() && !auxFalse.empty()){ LLfalse.push_back(auxFalse); auxFalse.clear(); } auxTrue.push_back(*it); }else{ if(!auxTrue.empty())LLtrue.push_back(auxTrue); auxTrue.clear(); auxFalse.push_back(*it); } it++; } if(!auxTrue.empty())LLtrue.push_back(auxTrue); if(!auxFalse.empty())LLfalse.push_back(auxFalse); } //---:---<*>---:---<*>- FINALIZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> int main() { Eval ev; int vrbs=0,seed=123; ev.eval<1>(predsplit,vrbs); return 0; }