#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: Mauro Negri Chamorro int DNI=41513523; void fillbalance(btree &B,btree::iterator n,list &L) { //if (n == B.end()) return; if (L.size() ==0) return; if (L.size() ==1) B.insert(n,*L.begin()); list Lleft; list::iterator itl = L.begin(); int mitad = L.size()/2; int cont = 0; while (cont < mitad){ Lleft.push_back(*itl); ++cont; itl = L.erase(itl); } n = B.insert(n,*itl); list Lright; while (!L.empty()){ Lright.push_back(*itl); itl = L.erase(itl); } fillbalance(B,n.left(),Lleft); fillbalance(B,n.right(),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; }