#include<bits/stdc++.h> using namespace std; int main(){ int a[15][15]={0},i,j,n,x; cin>>n; x=n*n; for(i=n;i>0;i--){ for(j=n;j>0;j--){ a[i][j]=x; x--; } } for(i=n;i>0;i--){ for(j=n;j>0;j--){ cout<<setw(3)<<a[i][j]; } cout<<endl; } } /************************************************************** Problem: 1188 User: linzihang Language: C++ Result: Accepted Time:8 ms Memory:2072 kb ****************************************************************/