fork download
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. mt19937_64 gen(chrono::steady_clock::now().time_since_epoch().count());
  6.  
  7. long long rand(long long l, long long r) {
  8. uniform_int_distribution<long long> rnd(l, r);
  9. return rnd(gen);
  10. // return rand() % (r - l + 1) + l;
  11. }
  12.  
  13. void gen_test() {
  14. ofstream cout("task.inp");
  15. int n = rand(5, 10), m = rand(5, 10);
  16. cout << n << endl;
  17. for (int i = 1; i <= n; ++i) {
  18. cout << char('a' + rand(0, 3));
  19. }
  20. cout << endl;
  21. }
  22.  
  23. signed main() {
  24. srand(time(nullptr));
  25. int test = 100;
  26. gen_test(); return 0;
  27. for (int i = 1; i <= test; ++i) {
  28. gen_test();
  29. system("code.exe");
  30. system("trau.exe");
  31. if(system("fc task.out task.ans") != 0) {
  32. cout << "test thu " << i << " sai roi nhe, he he he he\n";
  33. return 0;
  34. }
  35. cout << "test thu " << i << " dung roi nhe\n";
  36.  
  37. }
  38. }
  39.  
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
Standard output is empty