HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Geometry > problem:


50268 - Triangles

Guest
• Discussion of problem (1)

Section problems

• 50664 - Polygons
• 50263 - Points
• 50268 - Triangles
• 51041 - Plane Segmentation
• 50670 - Picture
• 50487 - Radius of Inscribed Circle
• 50480 - What quadrant is it?
• 50473 - Counting Circles Positions
• 50327 - Parallel Lines
• 50328 - How far away
• 50825 - Drawing Polygon

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