#define USECHRONO #undef HAVE_MPI #include "eval.hpp" #include #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: Felipe Repetto int DNI=39950635; void fillbalance(btree &B, btree::iterator itB,list &L) { if(L.empty()) return; if(L.size() == 1) { B.insert(itB, *L.begin()); return; } list L_left, L_right; list::iterator itL = L.begin(); int L_size = L.size(); if(L_size%2==0) { for(int i=1; i<=L_size/2; i++) { L_left.push_back(*itL); itL = L.erase(itL); } itB = B.insert(itB, *itL); L.erase(itL); fillbalance(B, itB.left(), L_left); L_right = L; fillbalance(B, itB.right(), L_right); } else { L_size = L_size+1; for(int i=1; i &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; }