Advertisement
Guest User

Untitled

a guest
Mar 18th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.05 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. typedef long long int ll;
  5. typedef pair <ll, ll> pll;
  6.  
  7. const int Max = 1e6 + 10;
  8. const int Mod = 1e9 + 7;
  9. const ll Inf = 1LL << 62;
  10.  
  11. ll ar[Max];
  12. ll tot[Max];
  13.  
  14. int main() {
  15.         for(int tc=1; tc<=10; tc++){
  16.                 string str="input";
  17.                 if(tc<10)
  18.                     str+="0", str+=(tc + '0');
  19.                 else
  20.                     str+="10";
  21.                 str+=".txt";
  22.                 freopen(str.c_str(), "w", stdout);
  23.                 printf("10\n");
  24.                 for(int i=1; i<=10; i++){
  25.                     int n=3e5, p, q;
  26.                     p = rand() % 1000000 + 1;
  27.                     q = rand() % 1000000 + 1;
  28.                     printf("%d %d %d\n", n, p, q);
  29.                     for(int j=1; j<=n; j++){
  30.                         int x=rand()%1000000+1;
  31.                         printf("%d", x);
  32.                         if(j==n)printf("\n");
  33.                         else printf(" ");
  34.                     }
  35.                 }
  36.         }
  37.         return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement