Number of Grid Paths With Conditions

Revision en1, by CipherText, 2020-04-24 17:58:45

I have a grid containing $$$10^5$$$ rows and $$$10^5$$$ columns. I also have coordinates of $$$N$$$ cells of this grid each of which has either a red ball, or a blue ball, or both. When a person visits a cell, he/she can collect all the balls from that cell. The target is to reach the bottom-right cell from the top-left cell by collecting at least one ball of each color. From one cell, it's only possible to visit the cell on its right or the cell below it. Upper bound of $$$N$$$ is $$$1000$$$.

Tags grid

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English CipherText 2020-04-24 19:41:36 299 Tiny change: 'l, or both. When a p' -> 'l, or both (one ball of each color). When a p' (published)
en1 English CipherText 2020-04-24 17:58:45 514 Initial revision (saved to drafts)