Advertisement
AquaBlitz11

TASK_068 - AquaBlitz11's Solution

Mar 5th, 2018
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. const int N = 110;
  5.  
  6. int A[N][N];
  7.  
  8. int main()
  9. {
  10.     int n, m;
  11.     scanf("%d%d", &n, &m);
  12.     for (int i = 1; i <= n; ++i) {
  13.         for (int j = 1; j <= m; ++j)
  14.             scanf("%d", &A[i][j]);
  15.     }
  16.     for (int j = 1; j <= m; ++j) {
  17.         for (int i = n; i >= 1; --i) {
  18.             if (i != n) printf(" ");
  19.             printf("%d", A[i][j]);
  20.         }
  21.         printf("\n");
  22.     }
  23.    
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement