Help needed in Google Kickstart 2020 Round B "Wandering Robot Problem"

Revision en5, by AjaySabarish, 2020-08-01 09:59:46

I understand the entire solution except the part " The probability of reaching any particular green square is the same for all but the green square in the last row", I don't get it why the last row is any different?

My understanding of the solution : We take all the squares which the extension of the diagonal of the rectangle part. We have to pass through one of these squares in order to reach the destination and once we get to these squares the probability of reaching destination is 1. Since there cannot be interesction between these paths, we individually find the probability of reaching each of these squares and add them.

Can anyone please explain how the last row is any different?

Problem Link

My code : https://ideone.com/FIGKWD (got WA)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en6 English AjaySabarish 2020-08-01 10:01:18 236
en5 English AjaySabarish 2020-08-01 09:59:46 11
en4 English AjaySabarish 2020-07-31 14:41:02 24
en3 English AjaySabarish 2020-07-31 14:40:10 113
en2 English AjaySabarish 2020-07-31 14:33:35 1834 (published)
en1 English AjaySabarish 2020-07-31 14:30:05 2453 Initial revision (saved to drafts)