题解
2025-06-10 12:35:48
发布于:浙江
89阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int main(){
    long long a,b[2222][2222];
    cin>>a;
    for(int i=1;i<=a;i++)
        for(int j=1;j<=a;j++)
            cin>>b[i][j];
    for(int i=0;i<a;i++){
        for(int j=0;j<a;j++){
            if(i==0||i==a-1||j==0||j==a-1){
                cout<<b[a-j][i+1]<<" ";
            }
            else{
                cout<<b[i+1][j+1]<<" ";
            }
        }
        cout<<endl;
    }
    return 0;
}
这里空空如也







有帮助,赞一个