POJ 3597 Polygon Division:题目解答源码
2016-09-13 16:40
204 查看
Given a regular polygon, there are numerous ways to divide it into several triangles and/or quadrangles by adding some diagonals that do not properly intersect each other. For example, Figure 4 shows all ten different divisions of a regular pentagon into
triangles and quadrangles.
Figure 4: Divisions of a regular pentagon into triangles and quadrangles
Given n, the number of sides of the polygon, compute the number of such divisions.
输入描述
The input contains multiple test cases. Each test case consists of a single integern (3 ≤n ≤ 5000) on a separate line. The input ends where EOF is met.
输出描述
For each test case, print the answer modulo 264 on a separate line.
程序源码
完整代码
triangles and quadrangles.
Figure 4: Divisions of a regular pentagon into triangles and quadrangles
Given n, the number of sides of the polygon, compute the number of such divisions.
输入描述
The input contains multiple test cases. Each test case consists of a single integern (3 ≤n ≤ 5000) on a separate line. The input ends where EOF is met.
输出描述
For each test case, print the answer modulo 264 on a separate line.
程序源码
完整代码
相关文章推荐
- POJ 3597 Polygon Division:题目解答源码
- POJ 3597 Polygon Division 多边形剖分
- POJ 3434 Terrarium:题目解答源码
- POJ 3434 Terrarium:题目解答源码
- POJ 3434 Terrarium:题目解答源码
- HDU 1036 Average is not Fast Enough!:题目解答源码
- HDU 3826 Squarefree number:题目解答源码
- HDU 3220 Alice’s Cube:题目解答源码
- HDU 3220 Alice’s Cube:题目解答源码
- HDU 3826 Squarefree number:题目解答源码
- HDU 3220 Alice’s Cube:题目解答源码
- HDU 1036 Average is not Fast Enough!:题目解答源码
- 08年第3期算法擂台,网友聚会题目的另一种解答
- 求高人帮我解答以下几道题目
- 浙大复试上机题目解答(2)
- 据说是年薪40万人民币的岗位应聘题目(10分钟内解答)
- PHP面试题目及其解答
- 陈跃峰的《两个基础的算法题目》的解答
- 0801算法擂台题目解答
- 浙大复试上机题目解答(3)