[ブルーブリッジカップ2019予選]回転

90度:直線行列の左下隅、1つのラインの出力から上がります。これは、ライン出力としてリストされます。

 

タイトル:リンクします。http://oj.ecustacm.cn/problem.php ID = 1472?

 

 

 

#include <iostream>
using namespace std;

int a[110][110];
int n,m;

int main()
{
    while(~scanf("%d%d", &n, &m)) {
        
        for (int i = 0; i < n; i++)
            for (int j = 0; j < m; j++)
                scanf("%d", &a[i][j]);
                
        for (int i = 0; i < m; i++) {
            for (int j = n-1; j >= 0; j--) {
                cout << a[j][i] << " ";
             }
            cout << endl;
        }    
    }
  
  return 0;
}

 

 

over......

 

おすすめ

転載: www.cnblogs.com/hello-dummy/p/12348159.html