#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: Lacava, Matias int DNI=40268083; void fillbalance(btree &B,btree::iterator itB,list &L){ if (L.empty()){return;} if (L.size()==1){itB=B.insert(itB,*L.begin()); return;} int nleft=L.size()/2; int nright=L.size()-1-nleft; listLleft; listLright; auto itL=L.begin(); int contador=0; while (contador!=L.size()){ if (contadornleft){ Lright.push_back(*itL); } itL++; contador++; } fillbalance(B,itB.left(),Lleft); fillbalance(B,itB.right(),Lright); } void fillbalance(btree &B,list &L) { fillbalance(B,B.begin(),L); } //---:---<*>---:---<*>- FINALIZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> int main() { Eval ev; int vrbs=0; ev.eval<1>(fillbalance,vrbs); return 0; }