Profitable paths -2

Can some please provide the editorial for profitable paths2 from this month’s lunchtime

Link to the problem —> https://www.codechef.com/LTIME86B/problems/PRT2


Also, this is how you can search for a topic:

Mad, Actually i was searching for profitable paths 2 rather than PRT2 that’s why it’s not showing results to me.NVM and thanks