#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: Diego Benitez int DNI=42602479; void fillbalance(btree &B,btree :: iterator nodo,list &L){ int size = L.size(); list :: iterator it = L.begin(); if ( L.empty() ) return; if ( size == 1 ){ B.insert(nodo,*L.begin()); return; } if ( size > 1 ){ int nleft = size/2; int nright = size-nleft-1; list Lleft; list Lright; for(int i=0;i &B,list &L) { if ( L.size() == 0 ) return; if ( L.size() == 1 ){ B.insert(B.begin(),*L.begin()); return; } if ( L.size() > 1 ) fillbalance(B,B.begin(),L); } //---:---<*>---:---<*>- FINALIZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> int main() { Eval ev; int vrbs=0; ev.eval<1>(fillbalance,vrbs); return 0; }