1337: 蛇形
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:2
Solved:0
Description
在 m×n 的方阵里填入 1, 2, ..., m×n (0 < m, n ≤ 100),要求填成蛇形。
Input
输入只有一行,为两个正整数m和n,表示m*n的矩阵。
Output
为m*n的矩阵,每个数字占5个字符,且右对齐。
Sample Input Copy
4 4
Sample Output Copy
10 11 12 1
9 16 13 2
8 15 14 3
7 6 5 4