Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
125845 | 周子潇 | 数组转置 | C++ | Wrong Answer | 1 MS | 280 KB | 783 | 2025-07-15 15:52:47 |
#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() using namespace std; int main(){ int a[100][100]; int b[100][100]; int n; int m; cin>>n>>m; for(int i=1;i<=n;i++) { for(int j=1;j<=m;j++) { cin>>a[i][j]; } } for(int i=1;i<=n;i++) { for(int j=1;j<=m;j++) { b[i][j]=a[j][i]; } } for(int i=1;i<=n;i++) { for(int j=1;j<=m;j++) { cout<<b[i][j]<<" "; } cout<<endl; } return 0; }
------Input------
1 2 2359 23 439 2 239 309 13
------Answer-----
1 23 239 2 439 309 2359 2 13
------Your output-----
2359 0