COCI00010
Sjecišta
레이팅
의견: 0
설명
Consider a convex polygon with \(N\) vertices, with the additional property that no three diagonals intersect in a single point. Find the number of intersections between pairs of diagonals in such a polygon.
The figure below shows one such polygon with \(6\) vertices.
Note: a polygon is convex if all of its interior angles are less than \(180\) degrees.
제약
입력 형식
The first and only line of input contains a single integer \(N\) (\(3 \le N \le 100\)).
출력 형식
Output the number of intersections on a single line.
서브태스크
| 서브태스크 | 점수 | 설명 |
|---|---|---|
Subtask 1 | 40점 |
예제 1
입력
3출력
0예제 2
입력
4출력
1예제 3
입력
6출력
15문제 정보
태그
평가 및 의견
Sjecišta
개별 의견
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
Sjecišta
게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다.
로그인하고 제출하기