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

Сборники > Kovrov IT 2009 > задача:


H. Triangles

Задачи сборника

• A. Tetris 3D
• B. Knights of the Rook
• C. Meat store
• D. Many-coloured roads
• E. Kovrov
• F. Interesting permutations
• G. What about judges?
• H. Triangles
• I. ATM

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

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

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

There are N points on the plane, such that no three of them lie on the same line. You would like to know, how many ways are there to pick three points such that there would be no more than K remaining points inside the resulting triangle.

Input
The first line of input contains two integers N and K (3 ≤ N ≤ 200; 0 ≤ KN-3). The following N lines contain point's coordinates Xi, Yi. All coordinates are integers with absolute value smaller or equal to 10000.
Output
Output the single number - answer for the problem.

Input 1 Output 1
4 0
0 0
10 0
5 10
5 5
3
Input 2 Output 2
4 1
0 0
10 0
5 10
5 5
4

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

www.contester.ru