#P365. 【例63.1】 蛇形填数
【例63.1】 蛇形填数
Description
Fill an matrix with numbers , , , ..., in a snake-like pattern. For example, when , the matrix looks like:
10 11 12 1 9 16 13 2 8 15 14 3 7 6 5 4
Where $n \le 20$.
Input Format
Input .
Output Format
Output the matrix as described. lines, with numbers in each line separated by a single space.
Sample
410 11 12 1
9 16 13 2
8 15 14 3
7 6 5 4
Related
In following homework: