您的位置:首页 > 编程语言 > Go语言

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.

程序源码

完整代码
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: