#define USECHRONO #undef HAVE_MPI #include "eval.hpp" #include #include #include #include using namespace aed; using namespace std; //---:---<*>---:---<*>- COMIENZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> // COMPLETAR DNI y NOMBRE AQUI: // Nombre: Sebastian Kunci int DNI=44922790; int hermanos(tree&A,tree::iterator itA){ if(itA == A.end()){return 0;} int cont = 0; while(itA != A.end()){ itA++;cont++; } return cont; } void buildBT(tree &A, btree &BT,tree::iterator itA,btree::iterator itBT){ if(itA == A.end()){return;} if(itBT == BT.end()){return;} if(hermanos(A,itA) > 2){ BT.clear(); return; } itBT = BT.insert(itBT,*itA); itA = itA.lchild(); while(itA != A.end()){ buildBT(A,BT,itA,itBT.left()); buildBT(A,BT,itA++,itBT.right()); } } void buildBT(tree &A, btree &BT) { if(A.begin() == A.end()){return;} buildBT(A,BT,A.begin(),BT.begin()); } //---:---<*>---:---<*>- FINALIZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> int main() { Eval ev; int vrbs=0; ev.eval<1>(buildBT,vrbs); return 0; }