HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


Triangles

Section problems

• Many-coloured roads
• What about judges?
• Liars and Knights
• Interesting permutations
• Kovrov
• Points
• Roads
• Brackets
• Triangles
• String Multiplication
• Nice Floor
• Strange Numbers
• Factorial
• Boundary Troops
• ATM
• Division
• Unusual Lottery

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 3000/7000/7000/7000 ms. Memory limit 65000/65000/65000/65000 Kb.
Автор: Павел Кузнецов, ПГУ.

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