[Noti-aed] tpl1-2023-invertm-Demartin_Alondra
Alondra Demartin
alodemartin en gmail.com
Jue Nov 9 20:40:45 -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/72f59d0e/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: DemartinAlondra
int DNI=41979987;
//---:---<*>---:---<*>---:---<*>---:---<*>---:---<*>
void invertm(list<int> &L,int m) {
// COMPLETAR AQUI....
list<int> l;
auto it = L.begin();
while(it!=L.end()){
list<int>laux;
for(int i = 0; i<m and it!=L.end(); i++){
laux.push_back(*it);
++it;
}
laux.reverse();
l.insert(l.end(),laux.begin(),laux.end());
laux.clear();
}
L = l;
}
//---:---<*>---:---<*>- FINALIZA CODIGO FUNCION --:---<*>---:---<*>---:---<*>
int main() {
Eval ev;
int vrbs=0;
ev.eval<1>(invertm,vrbs);
return 0;
}
Más información sobre la lista de distribución Noti-AED