[Noti-aed] Ejercicio 1 - TPL3 - Ramiro Ibarra
Ramiro Ibarra
rami.ibarra47 en gmail.com
Jue Nov 9 18:45:52 -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/62944e30/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: Ibarra, Ramiro. DNI: 44180987
int DNI=44180987;
//---:---<*>---:---<*>---:---<*>---:---<*>---:---<*>
void set3par(vector<set<int>> &VS, set<int> &S) {
for(int i=0;i<VS.size();i++) {
set<int>::iterator p=VS[i].begin();
int cant_pares=0;
while(p!=VS[i].end()){
if(*p%2==0) cant_pares++;
if(cant_pares==3) break;
p=next(p);
}
if(cant_pares==3){
p=VS[i].begin();
while (p!=VS[i].end()) {
S.insert(*p);
p=next(p);
}
}
}
}
//---:---<*>---:---<*>- FINALIZA CODIGO FUNCION --:---<*>---:---<*>---:---<*>
int main() {
Eval ev;
int vrbs=0;
ev.eval<1>(set3par,vrbs);
return 0;
}
Más información sobre la lista de distribución Noti-AED