#P7900. [COCI 2006/2007 #2] SJECIŠTA

    ID: 8985 远端评测题 1000ms 128MiB 尝试: 0 已通过: 0 难度: 5 上传者: 标签>2006O2优化组合数学COCI(克罗地亚)

[COCI 2006/2007 #2] SJECIŠTA

Problem Description

Consider a convex polygon with nn vertices, and no three (or more) diagonals of this polygon intersect at the same point.

Now, compute the number of intersection points of the diagonals of such a polygon.

Input Format

Input one integer nn in a single line.

Output Format

Output one integer in a single line, representing the answer.

3

0
4

1
6

15

Hint

Explanation for Sample 3

Constraints

For all testdata, it is guaranteed that 3n1003 \leq n \leq 100.

Translated by ChatGPT 5