[Noti-aed] tpl3 - victoria favre set3par

Victoria Favre victoriafavre7 en gmail.com
Jue Nov 9 19:47:21 -03 2023


void set3par(vector<set<int>> &VS, set<int> &S) {
  vector<set<int>>::iterator itVS = VS.begin();
  while(itVS != VS.end()) { // recorro el vector
    set<int>::iterator itS = itVS->begin();
    int par = 0;
    while(itS != itVS->end()) { // recorro el set
      if(*itS % 2 == 0) {
        par++;
      }
      itS++;  // siguiente numero
    }
    if(par >= 3) { // al menos 3 pares
      S.insert(itVS->begin(), itVS->end());
    }
    itVS++;
  }
}
------------ próxima parte ------------
A non-text attachment was scrubbed...
Name: favrevictoria-set3par.cpp
Type: application/octet-stream
Size: 1015 bytes
Desc: no disponible
URL: <http://venus.santafe-conicet.gov.ar/pipermail/noti-aed/attachments/20231109/0e32b56c/attachment-0001.obj>


Más información sobre la lista de distribución Noti-AED