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

[JAG 2025 Summer Camp #2] Triangles

题目描述

You are given NN distinct points on a 2D plane. The ii-th point is located at (xi,yi)(x_i, y_i).

For each integer k1k \geq 1, let f(k)f(k) be the maximum number of non-degenerate triangles you can place under the following conditions:

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

Compute $\left(\sum \limits_{k=1}^{K} f(k)\right) \mod 998244353$.

输入格式

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

$$\begin{aligned} & N \ K \\ & x_1 \ y_1 \\ & \vdots \\ & x_N \ y_N \end{aligned} $$

The first line contains two integers NN and KK (1N2000001 \leq N \leq 200\,000, 1K1091 \leq K \leq 10^9), representing the number of points and the maximum value of kk. Each of the next NN lines contains two integers xix_i and yiy_i (0xi,yi1090 \leq x_i, y_i \leq 10^9), representing the coordinates of the ii-th point. It is guaranteed that all NN points are distinct.

输出格式

Print the answer.

5 1
0 0
0 20
20 20
20 0
10 10
6
5 20250914
0 0
0 100
20 25
9 14
50 0
894241420