3015: 【例63.1】 蛇形填数
Memory Limit:64 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:4
Solved:3
Description
在$n×n$方阵里填入$1$,$2$,$3$,... ,$n × n$,要求填成蛇形。例如$n=4$时方阵为:n
10 11 12 1n9 16 13 2n8 15 14 3n7 6 5 4n其中,$nle 20$。
Input
输入$n$。
Output
输出题述方阵。$n$行,每行各数之间用一个空格隔开。
Sample Input Copy
4
Sample Output Copy
10 11 12 1
9 16 13 2
8 15 14 3
7 6 5 4