fork download
  1. #include <bits/stdc++.h> // NeOWami
  2. using namespace std;
  3.  
  4. #define ft first
  5. #define sc second
  6.  
  7. signed main() {
  8. system("g++ new.cpp -o new -O2");
  9. system("g++ gen.cpp -o gen -O2");
  10. system("g++ trau.cpp -o trau-O2");
  11.  
  12. // checker.cpp;
  13. // system("g++ checker.cpp -o checker - O2");
  14. for (int i = 1; i <= 10000; i++) {
  15. cout << "\nTEST: " << i << ": ";
  16. system("gen > test.inp");
  17. auto stc = clock();
  18. system("trau < test.inp > test.ans");
  19. auto edc = clock();
  20. long double dur1 = (long double)(edc - stc) / CLOCKS_PER_SEC;
  21. cout << "Trau: "; cout << setprecision(6) << fixed << dur1 << "s | ";
  22.  
  23. auto start = clock();
  24. system("new < test.inp > test.out");
  25. auto ed = clock();
  26. long double dur = (long double)(ed - start) / CLOCKS_PER_SEC;
  27.  
  28. if (system("fc test.out test.ans > NUL")) return cout << "WA", 0;
  29.  
  30. // system("checker < test.inp < test.out > test.checkout");
  31. // system("checker < test.inp < test.ans > test.checkans");
  32. // if (system("fc test.checkout test.checkans > NUL")) return cout << "WACHECKER", 0;
  33.  
  34. cout << "AC";
  35. cout << " - "; cout << setprecision(6) << fixed << dur << "s ";
  36. if (dur > (long double)1.0) return cout << "TLE\n", 0;
  37. }
  38. return 0;
  39. }
  40.  
Success #stdin #stdout #stderr 0.02s 5288KB
stdin
Standard input is empty
stdout
TEST: 1: Trau: 0.000060s | WA
stderr
g++: error: new.cpp: No such file or directory
g++: fatal error: no input files
compilation terminated.
g++: error: gen.cpp: No such file or directory
g++: fatal error: no input files
compilation terminated.
g++: error: trau.cpp: No such file or directory
g++: fatal error: no input files
compilation terminated.
sh: 1: cannot create test.inp: Permission denied
sh: 1: gen: not found
sh: 1: cannot open test.inp: No such file
sh: 1: trau: not found
sh: 1: cannot open test.inp: No such file
sh: 1: new: not found
sh: 1: cannot create NUL: Permission denied
sh: 1: fc: not found