2098. Betsy tour

单点时限: 2.0 sec

内存限制: 256 MB

A square township has been divided up into N2 square plots (1 <= N <= 9). The Farm is located in the upper left plot and the Market is located in the lower left plot. Betsy takes her tour of the township going from Farm to Market by walking through every plot exactly once. Shown below is one possible tour for Betsy when N=3.

Write a program that will count how many unique tours Betsy can take in going from Farm to Market for any value of N.

输入格式

Line 1: A single integer N (1 <= N <= 9)

输出格式

A single line with a single integer, the number of unique tours.

样例

Input
3
Output
2

5 人解决,16 人已尝试。

6 份提交通过,共有 55 份提交。

8.5 EMB 奖励。

创建: 16 年,7 月前.

修改: 7 年,3 月前.

最后提交: 4 年,1 月前.

来源: USACO

题目标签