Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
7938 邓小龙 矩阵旋转 C++ Accepted 2 MS 304 KB 544 2025-05-31 09:50:14

Tests(10/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() #include<iomanip> using namespace std; int main(){ int n,m,a[101][101]; cin>>n>>m; for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++) cin>>a[n-i+1][j]; } for(int i=1;i<=m;i++){ for(int j=1;j<=n;j++) cout<<a[j][i]<<" "; cout<<endl; } return 0; }