In the first example test, there are $4$ ways to finish the painting, as illustrated below:

\begin{center}
\includegraphics{pic-2.eps}
\end{center}

In the second example test, there is a single way to finish the painting:

\begin{center}
\includegraphics{pic-3.eps}
\end{center}

In the third example test, regardless of how Eva draws the triangle in the center cell, it will share two sides with black squares.

