You are given a polygon with sides without self-intersections. In how many ways can you triangulate it?
Input consists of several cases with only integer numbers. Each case begins with , followed by the coordinates of the vertices given in counterclockwise order. Assume and . The given polygons are such that no triangulation contains a degenerate triangle.
For every case, print the number of triangulations modulo .
Author: Gerard Orriols
Generation: 2026-01-25T11:18:35.924Z
© Jutge.org, 2006–2026.
https://jutge.org