图像旋转
from CCF-CSP 2015-03-1
Time limit:5s
Memory limit:256MB
ac代码:
#include<bits/stdc++.h>
using namespace std;
int n,m,x[1005][1005];
int main(){
cin>>n>>m;
for(int i = 1;i <= n;++i)
for(int j = 1;j <= m;++j)
cin>>x[i][j];
for(int j = m;j >= 1;--j){
for(int i = 1;i <= n;++i)
cout<<x[i][j]<<" ";
cout<<"\n";
}
return 0;
}