#define USECHRONO #undef HAVE_MPI #include "eval.hpp" #include #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: Gassmann Alan int DNI=42248342; list::iterator getMid(list&L){ auto it = L.begin(); advance(it,L.size()/2); return it; } void fillbalance(btree &B,list &L,btree::iterator nodo) { if(!L.size()){return;} auto itmid = getMid(L); auto it2 = L.begin(); nodo= B.insert(nodo,*itmid); listaux1; listaux2; while(it2!=itmid){ aux1.push_back(*it2); it2++; } it2++; while(it2!=L.end()){ aux2.push_back(*it2); it2++; } fillbalance(B,aux1,nodo.left()); fillbalance(B,aux2,nodo.right()); } void fillbalance(btree &B,list &L) { // COMPLETAR AQUI... fillbalance(B,L,B.begin()); } //---:---<*>---:---<*>- FINALIZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> int main() { Eval ev; int vrbs=0; ev.eval<1>(fillbalance,vrbs); return 0; }