vadimk772336

Untitled

Nov 2nd, 2021 (edited)
733
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <fstream>
  4. using namespace std;
  5.  
  6.  
  7. int main()
  8. {
  9.  
  10.     int count_tests;
  11.     ifstream ifs("tests.txt");
  12.     ifs >> count_tests;
  13.     ofstream out("results.txt");
  14.  
  15.    
  16.     for (int i = 0; i < count_tests; ++i)
  17.     {
  18.         int N,M,K;
  19.         ifs >> N; ifs >> M;
  20.  
  21.             //Твой код  мэйна здесь
  22.                             ifs >> K;
  23.                             вместо cout писать out << ответ << ' ';
  24.         out << '\n';
  25.     }
  26.  
  27.        
  28.     return 0;
  29. }
  30.  
Advertisement
Add Comment
Please, Sign In to add comment