fork download
  1. #include <bits/stdc++.h>
  2.  
  3. #define SPED \
  4.   ios_base::sync_with_stdio(false); \
  5.   cin.tie(0); \
  6.   cout.tie(0);
  7.  
  8. #define fi first
  9. #define se second
  10. #define lint long long
  11. #define int lint
  12.  
  13. const lint INF = 1e15;
  14.  
  15. using namespace std;
  16.  
  17. mt19937_64 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
  18.  
  19. lint rand(lint l, lint r)
  20. {
  21. assert(l <= r);
  22. return l + rng() % (r - l + 1);
  23. }
  24.  
  25. void makeTest()
  26. {
  27. ofstream outo("DIVSEQ.inp");
  28. int n, q;
  29. n = rand(100, 100);
  30. q = rand(100, 100);
  31.  
  32. outo << n << " " << q << endl;
  33.  
  34. for (int i = 1; i <= n; i++)
  35. outo << rand(1, 1000000000) << " ";
  36.  
  37. outo << endl;
  38.  
  39. for (int i = 1; i <= q; i++)
  40. {
  41. lint l = rand(1, n );
  42. lint r = rand(l , n);
  43.  
  44. outo << l << " " << r << endl;
  45. }
  46. }
  47.  
  48. signed main()
  49. {
  50. srand(time(0));
  51.  
  52. for (int Test = 1; Test <= 1000; Test++)
  53. {
  54. makeTest();
  55. system("trau.exe");
  56. system("DIVSEQ.exe");
  57.  
  58. if (system("fc trau.out DIVSEQ.out") != 0)
  59. return cout << "Sai o test " << Test, 0;
  60.  
  61. else
  62. cout << "Ok " << Test << "\n";
  63. }
  64. }
  65.  
Success #stdin #stdout #stderr 0.01s 5284KB
stdin
Standard input is empty
stdout
Sai o test 1
stderr
sh: 1: trau.exe: not found
sh: 1: DIVSEQ.exe: not found
sh: 1: fc: not found