Check:
n=1 -> Ans=1
n=3 -> Ans=4
Color the table with black and white
n=5 -> Ans=9
n=7 -> Ans=16
Ans=((n+1)/2)^2
Consider range
Place 1 in the cells that their row and column is odd
n(1)=((n+1)/2)^2
Place 2 in the cells that their row and column is even
n(1)=((n-1)/2)^2
Prove that if the hole is determined the table is determined