[Noti-aed] set3par.cpp tpl 3 Cordini
Juan Cordini
juanbcordini en gmail.com
Jue Nov 9 19:12:55 -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/7549b107/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;
//---:---<*>---:---<*>- COMIENZA CODIGO FUNCION --:---<*>---:---<*>---:---<*>
// COMPLETAR DNI y NOMBRE AQUI:
// Nombre: Cordini Juan Bautista
int DNI=45344874;
//---:---<*>---:---<*>---:---<*>---:---<*>---:---<*>
void set3par(std::vector<std::set<int>> &VS, std::set<int> &S) {
for (const auto &s : VS) {
int contador = 0; // Contador para rastrear la cantidad de números pares en el conjunto
for (int num : s) {
if (num % 2 == 0) {
contador++;
}
}
if (contador >= 3) {
S.insert(s.begin(), s.end()); // Agrega todos los elementos del conjunto al conjunto S
}
}
}
//---:---<*>---:---<*>- 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