X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/3b646c1573243463ab55e4e2903f050900322f76..8a5515f7e7d38bb41a711b1d8a1ac6cee750ef18:/src/main.cpp?ds=inline diff --git a/src/main.cpp b/src/main.cpp index 553ea8c..58a00ec 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -53,6 +53,8 @@ int main (int argc, char *argv[]) std::list l = km.GetList (); it = l.begin (); + int bien = 0; + int mal = 0; while (it != l.end ()) { ClaveFija c(*it); BTreeFindResult *r; @@ -60,12 +62,20 @@ int main (int argc, char *argv[]) r = tree.FindKey (c); if (r != NULL) { std::cout << "** Clave " << (*it) << " encontrada.\n"; + bien++; delete r; - } else + } else { std::cout << "** Clave " << (*it) << " NO encontrada.\n"; + mal++; + } it++; } + std::cout << "\n\n === Resultados ===\n"; + std::cout << " Hist : " << bien << "\n"; + std::cout << " Miss : " << mal << "\n"; + std::cout << " Total : " << (bien+mal) << "\n"; + return 0; }