HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Kovrov IT > problem:


2009.H. 50268 - Triangles

Guest
• Discussion of problem (1)

Volume problems

• 2008.H. 50254 - Lawyers Council
• 2009.A. 50283 - Tetris 3D
• 2009.B. 50284 - Knights of the Rook
• 2009.C. 50285 - Meat store
• 2009.D. 50259 - Many-coloured roads
• 2009.E. 50266 - Kovrov
• 2009.F. 50267 - Interesting permutat...
• 2009.G. 50260 - What about judges?
• 2009.H. 50268 - Triangles
• 2009.I. 50278 - ATM
• 2010.A. 50287 - Providers
• 2010.B. 50281 - Primes
• 2010.C. 50255 - Bishops
• 2010.D. 50277 - Unusual Lottery
• 2010.E. 50664 - Polygons
• 2010.F. 50265 - Liars and Knights
• 2010.G. 50256 - Sequence

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