0%

Problem 453


Problem 453


Lattice Quadrilaterals

A simple quadrilateral is a polygon that has four distinct vertices, has no straight angles and does not self-intersect.

Let Q(m, n) be the number of simple quadrilaterals whose vertices are lattice points with coordinates (x,y) satisfying 0 ≤ x ≤ m and 0 ≤ y ≤ n.

For example, Q(2, 2) = 94 as can be seen below:

It can also be verified that Q(3, 7) = 39590, Q(12, 3) = 309000 and Q(123, 45) = 70542215894646.

Find Q(12345, 6789) mod 135707531.


格点四边形

一个简单四边形是指有四个顶点、没有任意三个顶点共线且不自交的多边形。

记坐标在格点上,且格点坐标满足0 ≤ x ≤ m以及0 ≤ y ≤ n的简单四边形数目为Q(m, n)。

例如,Q(2, 2) = 94,如下图所示:

可以验证,Q(3, 7) = 39590,Q(12, 3) = 309000以及Q(123, 45) = 70542215894646.

求Q(12345, 6789) mod 135707531。