[Noti-aed] TPL 3 Balbin Lina 44459174
Lina Balbin
mariabalbin18 en gmail.com
Jue Nov 9 19:54:27 -03 2023
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://venus.santafe-conicet.gov.ar/pipermail/noti-aed/attachments/20231109/80f70b2e/attachment.html>
------------ próxima parte ------------
#define USECHRONO
#undef HAVE_MPI
#include "eval.hpp"
#include <cassert>
#include <climits>
#include <cstdlib>
#include <stack>
using namespace aed;
using namespace std;
//---:---<*>---:---<*>- COMIENZA CODIGO FUNCION --:---<*>---:---<*>---:---<*>
// COMPLETAR DNI y NOMBRE AQUI:
// Nombre: Lina Balbin
int DNI=44459174;
//---:---<*>---:---<*>---:---<*>---:---<*>---:---<*>
void createab_aux(btree<int> &B, btree<int>::iterator n, list<int> &abpos,list<int> &vals) {
// COMPLETAR AQUI...
if(abpos.begin() == abpos.end()){ return;}
int p_act = *abpos.begin();
abpos.pop_front();
int v_act = *vals.begin();
vals.pop_front();
n = B.insert(n,v_act);
if(!abpos.empty() and p_act *2+1 == abpos.front()){
auto izq_c = n.left();
createab_aux(B,izq_c,abpos,vals);
}
if(!abpos.empty() and p_act *2+2 == abpos.front()){
auto dr_c = n.right();
createab_aux(B,dr_c,abpos,vals);
}
}
//---:---<*>---:---<*>---:---<*>---:---<*>---:---<*>
void createab(btree<int> &B, list<int> &abpos,list<int> &vals) {
createab_aux(B,B.begin(),abpos,vals);
}
//---:---<*>---:---<*>- FINALIZA CODIGO FUNCION --:---<*>---:---<*>---:---<*>
int main() {
Eval ev;
int vrbs=0;
ev.eval<1>(createab,vrbs);
// ev.evalr<1>(createab,12345,vrbs);
return 0;
}
Más información sobre la lista de distribución Noti-AED