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

Правка en6, от AjaySabarish, 2020-08-01 10:01:18

Problem Link

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 are the extension of the diagonal of the removed 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?

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

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en6 Английский AjaySabarish 2020-08-01 10:01:18 236
en5 Английский AjaySabarish 2020-08-01 09:59:46 11
en4 Английский AjaySabarish 2020-07-31 14:41:02 24
en3 Английский AjaySabarish 2020-07-31 14:40:10 113
en2 Английский AjaySabarish 2020-07-31 14:33:35 1834 (published)
en1 Английский AjaySabarish 2020-07-31 14:30:05 2453 Initial revision (saved to drafts)