Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. cout << "ПИРАМИДАЛЬНЯ СОРТИРОВКА" << endl;
  2.       for (int i = 0; i < N; i++) {
  3.         b[i] = rand() % 100 - 50;
  4.  
  5.       }
  6.    
  7.       for (int i = 0; i < 100; i++) {
  8.             for (int i = 0; i < N; i++) {
  9.             a[i] = b[i];
  10.             }
  11.          auto start = chrono::high_resolution_clock::now();
  12.         heapSort(b, N);
  13.         auto end = chrono::high_resolution_clock::now();
  14.         chrono::duration<double> duration = end - start;
  15.         k += duration.count() / N;
  16.       }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement