Editorial of GOODGRID?

Can someone explain me the logic of GOODGRID problem of JAN 21 Lunchtime as text editorials are not still availvable of Jan Lunchtime .

The main idea behind the solution is to check if we can have a rectangle of area “x” inside the N sided grid. If we can’t have such a rectangle, then the grid is not good. And also keep in mind that the rectangle should have atleast 2 adjacent sides coinciding with any 2 adjacent sides of the N*N grid.

1 Like

I will just add to what he said. make sure the side of the rectangle formed is less than n. you can form the side of the rectangle by checking the divisors.