Type: Default 1000ms 256MiB

蛇形方阵

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

By way of example, for pastures of size N=3 and N=4, here are the routes Bessie should use:

1 2 3

8 9 4

7 6 5

n=4

1  2  3  4

12 13 14 5

11 16 15 6

10  9  8 7

Input Format

A single integer: N (1 <= N <= 750)

Output Format

Lines 1..N: N space-separated integers

Sample

input

3

output

1 2 3
8 9 4
7 6 5

Hint

时间限制:1s1 \text {s}

空间限制:256MB256 \text {MB}

20200818二维数组练习

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
11
Start at
2020-8-18 8:25
End at
2020-8-21 8:25
Duration
72 hour(s)
Host
Partic.
23