Please help me with this Div 2B problem (1858B) (The Walkway -Petya & Cookies)
You can find the link to the problem here
I find the tutorial implementation a bit confusing. I would really appreciate if someone can help me with the above problem. Thanks.
Codeforces Round 950 Solution Discussion