P412
projecteuler.net

Gnomon Numbering

ℹ️Published on Sunday, 27th January 2013, 01:00 am; Solved by 556;
Difficulty rating: 50%

For integers $m, n$ ($0 \leq n \lt m$), let $L(m, n)$ be an $m \times m$ grid with the top-right $n \times n$ grid removed.

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

0412_table53.png

We want to number each cell of $L(m, n)$ with consecutive integers $1, 2, 3, \dots$ 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)$:

0412_tablenums.png

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

Find $\operatorname{LC}(10000, 5000) \bmod 76543217$.



Soluzione

Last modified: May 01, 2025. Website built with Franklin.jl and the lovely Julia programming language.