[Noti-aed] Ejercicio 2 (corregido) - TPL3 - Ramiro Ibarra
Ramiro Ibarra
rami.ibarra47 en gmail.com
Jue Nov 9 19:00:18 -03 2023
Pasé el cpp con el nuevo zip.
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://venus.santafe-conicet.gov.ar/pipermail/noti-aed/attachments/20231109/c1590459/attachment-0001.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;
typedef btree<int>::iterator node_bt;
//---:---<*>---:---<*>- COMIENZA CODIGO FUNCION --:---<*>---:---<*>---:---<*>
// COMPLETAR DNI y NOMBRE AQUI:
// Nombre: Ibarra, Ramiro. DNI: 44180987
int DNI=44180987;
//---:---<*>---:---<*>---:---<*>---:---<*>---:---<*>
void listab(btree<int> &B, list<int> &abpos, list<int> &vals, node_bt p, int posactual){
if(p==B.end()) return;
abpos.push_back(posactual);
vals.push_back(*p);
listab(B,abpos,vals,p.left(),2*posactual+1);
listab(B,abpos,vals,p.right(),2*posactual+2);
}
void listab(btree<int> &B, list<int> &abpos,list<int> &vals) {
listab(B,abpos,vals,B.begin(),0);
}
//---:---<*>---:---<*>- FINALIZA CODIGO FUNCION --:---<*>---:---<*>---:---<*>
int main() {
Eval ev;
int vrbs=0;
ev.eval<1>(listab,vrbs);
ev.evalr<1>(listab,12345,vrbs);
return 0;
}
Más información sobre la lista de distribución Noti-AED