#define USECHRONO #undef HAVE_MPI #include "eval.hpp" #include #include #include #include #include using namespace aed; using namespace std; //---:---<*>---:---<*>- COMIENZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> // COMPLETAR DNI y NOMBRE AQUI: // Nombre: Bruno Benitez int DNI=43935617; //---:---<*>---:---<*>---:---<*>---:---<*>---:---<*> int suma_de_conjunto(set S){ set::iterator it = S.begin(); int suma =0; while(it != S.end()){ suma+=pow(*it, 3); it++; } return suma%1000; } void compute_invariants(map> &G,vector &z){ vector ztmp; map>::iterator it = G.begin(); while(it != G.end()){ int aux=suma_de_conjunto(it->second); ztmp.push_back(aux); it++; } ztmp.swap(z); } bool isomorph(map> &G1,map> &G2) { int s1= G1.size(); vectorz1(s1,1); for(int i=0;i<6;i++){ compute_invariants(G1,z1); } int s2= G2.size(); vectorz2(s2,1); for(int i=0;i<6;i++){ compute_invariants(G2,z2); } sort(z1.begin(),z1.end()); sort(z2.begin(),z2.end()); for(auto i = 0; i(isomorph,vrbs); return 0; }