实现
#include <cstdio>
#define MAXN 0x3ef
int origin_matrix[MAXN][MAXN];
int new_matrix[MAXN][MAXN];
int main() {
int x_size, y_size;
scanf("%d%d",&x_size,&y_size);
for (int i = 0;i < x_size;++i) {
for (int j = 0;j < y_size;++j) {
scanf("%d",&origin_matrix[i][j]);
}
}
for (int i = 0;i < x_size;++i) {
for (int j = 0;j < y_size;++j) {
new_matrix[y_size - 1 - j][i] = origin_matrix[i][j];
}
}
for (int i = 0;i < y_size;++i) {
for (int j = 0;j < x_size;++j) {
printf("%d ",new_matrix[i][j]);
}
printf("
");
}
}