Advertisement
MinhNGUYEN2k4

Untitled

Mar 30th, 2021
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.83 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. const int Min = 1, Maxn = 1000000, Maxm = 100;
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     srand(time(NULL));
  10.     ///random test bài 1
  11.     /*
  12.     int m, n;
  13.     ofstream inp("perfect.inp");
  14.     //problems 1
  15.     m = 100;
  16.     inp << m << '\n';
  17.     while (m--)
  18.     {
  19.         n = 1000000;
  20.  
  21.         inp << n << '\n';
  22.     }
  23.     */
  24.     ///random test bài 2
  25.     /*
  26.     int n;
  27.     ofstream inp("grab.inp");
  28.     n = 100;
  29.     inp << n << endl;
  30.     int a[n+1][n+1];
  31.     memset(a, 0, sizeof a);
  32.     int time = rand() % (n*n - 1 + 1) + 1;
  33.     while (time)
  34.     {
  35.         int x = rand() % (n-1+1)+1;
  36.         int y = rand() % (n-1+1)+1;
  37.         if (a[x][y]==1) continue;
  38.         else{
  39.             a[x][y]=1;
  40.             inp << x << ' ' << y << endl;
  41.             time--;
  42.         }
  43.     }
  44.     */
  45. }
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement