Advertisement
Guest User

Untitled

a guest
Apr 13th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.52 KB | None | 0 0
  1.     // STD Priority queue
  2.     priority_queue<numero_entero, vector<numero_entero>, Compara_Numero> lista_numeros;
  3.     time_start = clock();
  4.     for(int i=0; i<tamano_experimento; i++){
  5.         lista_numeros.push( ((1 + rand() % 20)));
  6.     }
  7.     for(int i=0; i<tamano_experimento; i++){
  8.         aux = lista_numeros.top();
  9.         //cout << aux.get_numero() << endl;
  10.         lista_numeros.pop();
  11.     }
  12.     cout << "El experimento con STD priority_queue tardo: " << ((double)clock() - time_start) / CLOCKS_PER_SEC  << endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement