The number of ways of going from a cell to another

Правка en1, от Eddagdeg, 2019-02-04 14:07:45

Hello! There is a field n×m, and k of its cells are impassable walls. A robot is initially at the cell (1,1) (bottom left). The robot can only move right or up, and eventually it needs to get into the cell (n,m), avoiding all obstacles. You need to count the number of ways he can do it. Assume that the sizes n and m are very large (say, 109), and the number k is small (around 100) how to solve that in o(k^3)? any hint please and thanks!

Теги #2d-dp, #combinatorics

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Eddagdeg 2019-02-04 14:07:45 494 Initial revision (published)