a015. ็Ÿฉ้™ฃ็š„็ฟป่ฝ‰ 5/16/2025

่งฃๆณ•ไธ€

โœ… ๅฎŒๆ•ดไปฃ็ขผ

่ฉ•ๅˆ†็ตๆžœ(ๅƒ่€ƒ) ๏ผš AC (2ms, 340KB)

#include <bits/stdc++.h>
using namespace std;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int m, n;
    while(cin >> m >> n){
        vector<vector<int>> arr(m+n, vector<int>(m+n));

        for(int i=0; i<m; i++){
            for(int j=0; j<n; j++){
                cin >> arr[i][j];
            }          
        }

        for(int i=0; i<n; i++){
            for(int j=0; j<m; j++){
                if(j!=0) cout << " ";
                cout << arr[j][i];
            }
            cout << "\n";
        }
    }

    return 0;
}