0%

Problem 412


Problem 412


Gnomon numbering

For integers m, n (0 ≤ n < m), let L(m, n) be an m×m grid with the top-right n×n grid removed.

For example, L(5, 3) looks like this:

We want to number each cell of L(m, n) with consecutive integers 1, 2, 3, … such that the number in every cell is smaller than the number below it and to the left of it.

For example, here are two valid numberings of L(5, 3):

Let LC(m, n) be the number of valid numberings of L(m, n).
It can be verified that LC(3, 0) = 42, LC(5, 3) = 250250, LC(6, 3) = 406029023400 and LC(10, 5) mod 76543217 = 61251715.

Find LC(10000, 5000) mod 76543217.


圭表填数

对于整数m,n(0 ≤ n < m),L(m, n)表示一个m×m的方格被挖去了右上角n×n的方格后留下的L型部分。

例如,L(5, 3)如下图所示:

我们给L(m, n)的每一格填上连续整数1, 2, 3, …,并要求每个格子中的数要小于它左侧和下方格子中的数。

例如,下图是L(5, 3)两种可行的填法:

记LC(m, n)是L(m, n)所有可行填法的数目。
可以验证LC(3, 0) = 42, LC(5, 3) = 250250, LC(6, 3) = 406029023400以及LC(10, 5) mod 76543217 = 61251715。

求LC(10000, 5000) mod 76543217。