1076: 素数环
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:22
Solved:6
Description
不允许普通用户打印题目,请教师登录后使用。如有疑问请联系管理员!
Input
一个数 n (0 < n < 20).
Output
每一行代表环中从1顺时针和逆时针开始的一系列圆形数字。编号顺序必须满足上述要求。按字典顺序打印解决方案。
Sample Input Copy
8
Sample Output Copy
1 2 3 8 5 6 7 4
1 2 5 8 3 4 7 6
1 4 7 6 5 8 3 2
1 6 7 4 3 8 5 2