image

  • Thoughts.
    • Isn’t it simply DP?
    • No. A simple DP would be 10^10 for the largest case, so it’s impossible.
    • Is it a problem that can be mathematically transformed to arrive at a solution of smaller order?
    • This is, in essence, asking for the number of ways to choose the H times to move vertically out of the W+H times, so we can find .
  • Official Explanation
    • I’ve read about finding the inverse of the factorial to get this, but it’s known to me.
    • Did I put this together on one of the pages?
    • Written Combination in mod P.

This page is auto-translated from /nishio/ABC034C using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.