#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: Godoy Ángel int DNI=43124241; //---:---<*>---:---<*>---:---<*>---:---<*>---:---<*> void predsplit(list &L,bool (*pred)(int), list> &LLtrue, list> &LLfalse) { // COMPLETAR AQUI.... if(L.empty()) return; auto it=L.begin(); while(it!=L.end()){ list auxT; list auxF; while(pred(*it) and it!=L.end()){ auxT.push_back(*it); it++; } if(!auxT.empty()) LLtrue.push_back(auxT); auxT.clear(); while(!pred(*it) and it!=L.end()){ auxF.push_back(*it); it++; } if(!auxF.empty()) LLfalse.push_back(auxF); auxF.clear(); } } //---:---<*>---:---<*>- FINALIZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> int main() { Eval ev; int vrbs=0,seed=123; ev.eval<1>(predsplit,vrbs); return 0; }