fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. const string NAME = "b1";
  5. const int NTEST = 100;
  6.  
  7. mt19937_64 rd(chrono::steady_clock::now().time_since_epoch().count());
  8.  
  9. long long Rand(long long L, long long R) {
  10. return L + rd() % (R - L + 1);
  11. }
  12.  
  13. int main() {
  14. for (int iTest = 1; iTest <= NTEST; iTest++) {
  15. ofstream inp((NAME + ".inp").c_str());
  16. int n = Rand(1, 100);
  17. inp << n;
  18. inp.close();
  19.  
  20.  
  21. system((NAME + ".exe").c_str());
  22. system((NAME + "_trau.exe").c_str());
  23. if (system(("fc " + NAME + ".out " + NAME + ".ans").c_str()) != 0) {
  24. cout << "Test " << iTest << ": WRONG!\n";
  25. return 0;
  26. }
  27. cout << "Test " << iTest << ": CORRECT!\n";
  28. }
  29. return 0;
  30. }
  31.  
Success #stdin #stdout #stderr 0.01s 5320KB
stdin
Standard input is empty
stdout
Test 1: WRONG!
stderr
sh: 1: b1.exe: not found
sh: 1: b1_trau.exe: not found
sh: 1: fc: not found