Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
110380 黄枳润 矩阵旋转 C++ Wrong Answer 1 MS 300 KB 903 2025-02-17 20:44:23

Tests(0/10):


Code:

#include<iostream> #include<cstdio> #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> using namespace std; int main(){ /* int a[6][6],b,n,m; cin>>n>>m; for(int i=1;i<=5;i++){ for(int j=1;j<=5;j++){ cin>>a[i][j]; } } for(int j=1;j<=5;j++){ b=a[n][j]; a[n][j]=a[m][j]; a[m][j]=b; } for(int i=1;i<=5;i++){ for(int j=1;j<=5;j++){ cout<<a[i][j]<<' '; } cout<<endl; } */ int a[101][101],b[101][101],n,m; cin>>n>>m; for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ cin>>a[i][j]; b[j][i]=a[i][j]; } } for(int i=1;i<=m;i++){ for(int j=1;j<=n;j++){ cout<<b[i][j]<<' '; } cout<<endl; } return 0; }


Run Info:

------Input------
63 2 172 209 8 220 167 99 11 235 109 116 236 76 131 197 121 95 90 88 192 206 126 210 221 22 16 36 16 67 118 106 19 250 81 19 170 189 175 67 123 107 131 117 32 6 82 101 123 185 46 45 73 26 232 174 250 172 130 49 193 168 227 78 231 253 206 14 100 149 21 76 176 218 10 97 215 121 55 0 204 101 79 94 255 32 100 150 49 54 89 77 135 10 155 145 222 212 12 7 95 235 64 70 83 64 236 126 56 43 155 93 20 107 163 51 9 104 88 84 42 186 127 190 141 239 6 251
------Answer-----
6 141 127 42 88 9 163 20 155 56 236 83 64 95 12 222 155 135 89 49 100 255 79 204 55 215 10 176 21 100 206 231 227 193 130 250 232 73 46 123 82 32 131 123 175 170 81 19 118 16 16 221 126 192 90 121 131 236 109 11 167 8 172 251 239 190 186 84 104 51 107 93 43 126 64 70 235 7 212 145 10 77 54 150 32 94 101 0 121 97 218 76 149 14 253 78 168 49 172 174 26 45 185 101 6 117 107 67 189 19 250 106 67 36 22 210 206 88 95 197 76 116 235 99 220 209
------Your output-----
172 8 167 11 109 236 131 121 90 192 126 221 16 16 118 19 81 170 175 123 131 32 82 123 46 73 232 250 130 193 227 231 206 100 21 176 10 215 55 204 79 255 100 49 89 135 155 222 12 95 64 83 236 56 155 20 163 9 88 42 127 141 6 209 220 99 235 116 76 197 95 88 206 210 22 36 67 106 250 19 189 67 107 117 6 101 185 45 26 174 172 49 168 78 253 14 149 76 218 97 121 0 101 94 32 150 54 77 10 145 212 7 235 70 64 126 43 93 107 51 104 84 186 190 239 251