SHARE
TWEET

penis

a guest Dec 12th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Tworzenie wiader
  2.     vector<vector<int>> bucket(m);
  3.     int max = tab[0];
  4.     for (int i = 0; i < rozmiar; i++)
  5.     {
  6.         if (tab[i] > max)
  7.             max = tab[i];
  8.     }
  9.     max = max + 1;
  10.     //Wsadzanie elementow do wiader
  11.     for (int i = 0; i < rozmiar; i++)
  12.     {
  13.         bucket[floor(tab[i]) / double(max)*m].push_back(tab[i]);
  14.     }
  15.     //Sortowanie
  16.     for (int i = 0; i < m; i++)
  17.     {
  18.         sort(bucket[i].begin(), bucket[i].end());
  19.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top