标签:io os for sp div bs as ios return
4 4 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
13 9 5 1 14 10 6 2 15 11 7 3 16 12 8 4
#include <iostream>
#include <string>
#include <cstring>
#include <cstdio>
using namespace std;
int map[100][100];
int a[100][100];
int main()
{
int n, m, i, j;
while(cin>>n>>m)
{
for(i=0; i<n; i++)
{
for(j=0; j<m; j++)
{
cin>>map[i][j];
a[j][n-1-i] = map[i][j];
}
}
for(i=0; i<m; i++)
{
for(j=0; j<n; j++)
{
if(j==n-1)
cout<<a[i][j]<<endl;
else
cout<<a[i][j]<<‘ ‘;
}
}
}
return 0;
}
标签:io os for sp div bs as ios return
原文地址:http://www.cnblogs.com/yspworld/p/4029700.html