fork download
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include<bits/stdc++.h>
  3. using namespace std;
  4. typedef long long ll;
  5. std::mt19937_64 rng(std::chrono::system_clock::now().time_since_epoch().count());
  6. ll rand(ll l,ll r)
  7. {
  8. return uniform_int_distribution<ll>(l,r)(rng);
  9. }
  10. int main()
  11. {
  12. int idx = 3;
  13. char x[] = "out00000000000000000000000000000550.txt";
  14. for (int ii = 0; ii < 5; ii++){
  15. if (x[idx] == '9')
  16. idx++;
  17. freopen(x, "w", stdout);
  18. x[idx]++;
  19. // edit from here
  20. cout<<1<<'\n';
  21. int n=rand(1,10);
  22. cout<<n<<'\n';
  23. for(int i=1;i<=n;i++)
  24. {
  25. cout<<rand(1,128)<<' ';
  26. }
  27. cout<<'\n';
  28. // stop edit
  29. }
  30. }
  31.  
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
Standard output is empty