Help in a Grid Problem

Revision en1, by HighHopes, 2020-04-23 12:48:06

Disclaimer: This problem is from a contest on Hackerearth(hiring for intern) held on 13th April.


I was unable to solve this problem, can anyone help how to solve it? Can it be solved greedily or we need to use some graph algo?

Tags #hackerearth

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English HighHopes 2020-04-23 12:48:06 414 Initial revision (published)