#include <iostream>
using namespace std;
const int N = 1000;
int pic[N + 10][N + 10];
int main(int argc, char const *argv[])
{
std::ios::sync_with_stdio(false);
int n, m;
cin >> n >> m;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m; j++)
{
cin >> pic[i][j];
}
}
// rotation output
for (int i = m-1; i >= 0; i--)
{
for (int j = 0; j < n; j++)
{
cout << pic[j][i] << " ";
}
cout << endl;
}
return 0;
}
201503-1 图像旋转
于 2021-03-21 18:46:53 首次发布