Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <fstream>
- using namespace std;
- int main()
- {
- int count_tests;
- ifstream ifs("tests.txt");
- ifs >> count_tests;
- ofstream out("results.txt");
- for (int i = 0; i < count_tests; ++i)
- {
- int N,M,K;
- ifs >> N; ifs >> M;
- //Твой код мэйна здесь
- ifs >> K;
- вместо cout писать out << ответ << ' ';
- out << '\n';
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment