logo AlgoBeat OnlineJudge
登录 注册

#215825. [JAG 2025 Summer Camp #2] Triangles

内存限制:1024 MiB 时间限制:2000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

You are given distinct points on a 2D plane. The -th point is located at .

For each integer , let be the maximum number of non-degenerate triangles you can place under the following conditions:

  • You add new points on the plane such that all points are distinct.
  • Each triangle has its vertices among the points.
  • No two triangles have an intersection with a positive area.

Compute .

输入格式

The input consists of a single test case in the following format.

The first line contains two integers and (, ), representing the number of points and the maximum value of . Each of the next lines contains two integers and (), representing the coordinates of the -th point. It is guaranteed that all points are distinct.

输出格式

Print the answer.

样例

样例输入 1

5 1
0 0
0 20
20 20
20 0
10 10

样例输出 1

6

样例输入 2

5 20250914
0 0
0 100
20 25
9 14
50 0

样例输出 2

894241420