fork download
  1. #include <bits/stdc++.h>
  2.  
  3. #define ll long long
  4. #define el cout << '\n'
  5.  
  6. using namespace std;
  7.  
  8. mt19937_64 rd(chrono::steady_clock::now().time_since_epoch().count());
  9.  
  10. ll random(ll l, ll r)
  11. {
  12. return rd() % (r - l + 1) + l;
  13. }
  14. void makeTest()
  15. {
  16. ofstream cout("FERTILIZE.INP");
  17.  
  18. int n = random(1, 5);
  19. int k = random(1, n);
  20. int m = random(1, n);
  21. int b = random(1, 10);
  22. int r = random(1, 10);
  23.  
  24. cout << n << ' ' << k << ' ' << m << ' ' << b << ' ' << r, el;
  25. for (int i = 1; i <= n; i++)
  26. cout << random(1, 10) << ' ';
  27. }
  28.  
  29. int main()
  30. {
  31. ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  32.  
  33. for (int i = 1; i <= 1e2; i++)
  34. {
  35. makeTest();
  36. system("FERTILIZE.EXE");
  37. system("FERTILIZE_TRAU.EXE");
  38. if (system("fc FERTILIZE.OUT FERTILIZE_TRAU.OUT"))
  39. {
  40. cerr << i << " WRONG\n";
  41. break;
  42. }
  43. cerr << i << " PASSED\n";
  44. }
  45. }
  46.  
Success #stdin #stdout #stderr 0.01s 5320KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
sh: 1: FERTILIZE.EXE: not found
sh: 1: FERTILIZE_TRAU.EXE: not found
sh: 1: fc: not found
1 WRONG