#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: Zeballos Bruno int DNI=43114431; void fillbalance(btree &B, btree::iterator node, list&L){ if(node == B.end()) return; listLleft; listLright; if(L.size() == 1){ B.insert(B.begin(),*L.begin()); } if(L.size() > 1){ int k = L.size() / 2; auto it = L.begin(); int cont = 0; while(cont < k){ Lleft.insert(Lleft.end(),*it); it++; cont++; } node = B.insert(node,*it); it++; while(!L.empty()){ Lright.insert(Lright.end(), *it); it++; } } auto ita = node.left(); auto itb = node.right(); fillbalance(B,ita,Lleft); fillbalance(B,itb,Lright); } void fillbalance(btree &B,list &L) { // COMPLETAR AQUI... fillbalance(B,B.begin(),L); } //---:---<*>---:---<*>- FINALIZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> int main() { Eval ev; int vrbs=0; ev.eval<1>(fillbalance,vrbs); return 0; }