SHARE
TWEET

Untitled

a guest Nov 9th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     ios_base::sync_with_stdio(false);
  8.     cin.tie(0);
  9.  
  10.     cin >> n >> m >> endl;
  11.     cin >> a >> b >> end;
  12.     unsigned int cur = 0;
  13.     unsigned int nextRand24() {
  14.     cur = cur * a + b;
  15.     return cur >> 8;
  16.  }
  17.  
  18.     for (int i=0; i!=a; i++) {
  19.  
  20.         a[i]= nextRand24() % m;
  21.  
  22.     }  
  23.     void MergeSort (int l, int r, int *a, int * buffer ) {
  24.         if (r - l <= 1)
  25.             return ;
  26.         int m = (l + r) / 2;
  27.         MergeSort (l, m, a, buffer ) ;
  28.         MergeSort (m, r, a, buffer ) ;
  29.         Merge (l, m, r, a, buffer ) ;
  30.  }
  31.     void sorter (){
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