Arya and the Grid of Stars (ALKH2019)

https://www.codechef.com/ALKH2019/problems/ARYGRD
please someone tell me how this problem can be solved

ref :- https://codeforces.com/blog/entry/66412?locale=en
it has the hints you need

1 Like