vadimk772336

Untitled

Nov 3rd, 2021
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. int main()
  2. {
  3.  
  4.  
  5. ifstream ifs("com.txt");
  6. ofstream out("results.txt");
  7. int count_tests;
  8. ifs >> count_tests;
  9.  
  10. for (int k = 0; k < count_tests; k++)
  11. {
  12.  
  13.  
  14.  
  15. cout << endl;
  16. int y;
  17. int true_ans[M];
  18. for (int j = 0; j < M; j++)
  19. {
  20. cout << answers[j] << " ";
  21. out << answers[j] << " ";
  22. }
  23. out << endl;
  24. for (int j = 0; j < M; j++)
  25. {
  26. ifs >> y;
  27. true_ans[j] = y;
  28. out << y << " ";
  29. }
  30. out << endl;
  31. for (int j = 0; j < M; j++)
  32. {
  33. if (true_ans[j] != answers[j])
  34. out << "WA" << j << " ";
  35. else
  36. out << "1 ";
  37. }
  38. out << endl;
  39.  
  40.  
  41.  
  42.  
  43. }
  44.  
  45.  
  46. return 0;
  47. }
  48.  
Advertisement
Add Comment
Please, Sign In to add comment