Help in easy problem

https://www.codechef.com/problems/MATMIN1
can you guys help for the approach of this problem even though there is editorial for this problem
but not getting could you guys help?