Approach hintTry it first, then revealHide
Each corner cell lies on two borders, so try all 2^4 choices of black corners. After subtracting them, every border's remaining count must fit in its n - 2 non-corner cells.
Each corner cell lies on two borders, so try all 2^4 choices of black corners. After subtracting them, every border's remaining count must fit in its n - 2 non-corner cells.