fork(1) download
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4. mt19937_64 rd(chrono::steady_clock::now().time_since_epoch().count());
  5. int randnum(int l, int r){
  6. return rd() % (r - l + 1) + l;
  7. }
  8. signed main(){
  9. ios_base::sync_with_stdio(0);
  10. cin.tie(0);
  11. for(int test = 1; test <= 100; test++){
  12. ofstream inp("MAGICSUM.inp");
  13. int n = randnum(1, 1e5);
  14. inp << n << endl;
  15. for(int i = 1; i <= n; i++){
  16. int a = randnum(1, 1e6), b = randnum(a, 1e6);
  17. inp << a << " " << b << endl;
  18. }
  19. inp.close();
  20. system("MAGICSUM.exe"); // solution 1
  21. system("MAGICSUM_trau.exe"); // solution 2
  22. if(system("fc MAGICSUM.out MAGICSUM.ans") == 0){
  23. cout << "AC" << endl;
  24. }
  25. else{
  26. cout << "WA" << endl; return 0;
  27. }
  28. }
  29. return 0;
  30. }
  31.  
Success #stdin #stdout #stderr 0.01s 5460KB
stdin
Standard input is empty
stdout
WA
stderr
sh: 1: MAGICSUM.exe: not found
sh: 1: MAGICSUM_trau.exe: not found
sh: 1: fc: not found