ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Разделы > Неотсортированные > задача:


Polygons

Задачи раздела

• Making Potions
• Santa Gifts
• Chessboard Pattern
• Galls village
• Sequence
• Bishops
• Polygons
• String manipulations
• Lawyers Council
• Math and Soldiers
• Many-coloured roads
• What about judges?
• Liars and Knights
• Interesting permutations
• Kovrov

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 3000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Автор: Кирилл Бутин, ПГУ.

You are given a convex polygon with N vertices. Find the total number of parts it is divided by all possible diagonals, assuming that no three of them intersect at one point.

Input
The first line of input contains one integer N (3 ≤ N ≤ 50000).

Output
Output a single number – the number of parts.

Input 1 Output 1
3
1
Input 2 Output 2
4
4

Для отправки решений необходимо выполнить вход.

www.contester.ru