Advertisement
Infiniti_Inter

Задача 6

May 23rd, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <vector>
  4. #include <string>
  5. #include <map>
  6. using namespace std;
  7.  
  8.  
  9.  
  10. ifstream fin("input.txt");
  11. ofstream out("output.txt");
  12.  
  13.  
  14. int main()
  15. {
  16.     int n, m;
  17.     fin >> n >> m;
  18.     vector<vector<int> > a(n, vector<int>(m));
  19.     for (int i = 0; i < n; ++i)
  20.         for (int j = 0; j < m; ++j)
  21.             fin >> a[i][j];
  22.     for (int j = 0; j < m; ++j, out << '\n')
  23.         for (int i = 0; i < n; ++i)
  24.             out << a[i][j] << ' ';
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement