问题4069--Edge Case

4069: Edge Case

[命题人 : ]
时间限制 : 1.000 sec  内存限制 : 128 MB

题目描述

In graph theory, a matching or independent edge set in a graph G = (V, E) is a set of edges M   E such that no two edges in the matching M share a common vertex.
Recently you saw in the news that “The Sveriges Riksbank Prize in Economic Sciences in Memory of Alfred Nobel” (informally, the Nobel Prize in Economics) for 2012 was awarded to Alvin E. Roth and Lloyd S. Shapley for, amongst other things, their algorithm for finding a matching satisfying certain criteria in a bipartite graph. Since you have also heard that matchings in cycle graphs have applications in chemistry your thoughts centre around a plan for a beautiful future where your Christmas shopping is more luxurious than ever!

输入

For each test case, you get a single line containing one positive integer: n, with 3 <= n <= 10000.

输出

For each test case, a row containing the number of matchings in Cn.

样例输入 Copy

3
4
100

样例输出 Copy

4
7
792070839848372253127

来源/分类

NWERC 2012