# 25 distinct numbers in a 6x10 Minesweeper grid

You are making a new Minesweeper game. You can place 1, 2 or 3 mines in a cell. As usual the number in an empty cell is the number of mines surrounding it (in 8 directions). Can you place mines into a 6x10 grid such that every number from 0 to 24 inclusive appears exactly once? Good luck!

$$\begin{matrix} &5 &8 &6 &9 &\color{red}{3} &\color{red}{3} &\color{red}{3} &\color{red}{2} &2 &0 \\&\color{red}{2} &\color{red}{3} &\color{red}{3} &15 &\color{red}{3} &24 &\color{red}{3} &12 &3 &1 \\&\color{red}{2} &22 &\color{red}{3} &18 &\color{red}{3} &\color{red}{3} &\color{red}{3} &13 &\color{red}{1} &4 \\&\color{red}{3} &\color{red}{3} &\color{red}{3} &20 &\color{red}{3} &21 &\color{red}{3} &16 &\color{red}{3} &7 \\&\color{red}{3} &23 &\color{red}{2} &\color{red}{3} &\color{red}{3} &17 &\color{red}{3} &19 &\color{red}{3} &10 \\&\color{red}{3} &\color{red}{3} &\color{red}{3} &14 &\color{red}{3} &11&\color{red}{2} &\color{red}{2} &\color{red}{3} &\color{red}{1} \\\end{matrix}$$
$$\begin{matrix} 3 &\color{red}{3} &\color{red}{3} &\color{red}{3} &13 &\color{red}{2} &5 &0 &1 &\color{red}{1} \\ 8 &14 &21 &\color{red}{3} &\color{red}{2} &\color{red}{3} &11 &6 &10 &7 \\ \color{red}{2} &\color{red}{3} &\color{red}{3} &\color{red}{3} &23 &\color{red}{3} &15 &\color{red}{3} &\color{red}{3} &\color{red}{3} \\ \color{red}{3} &\color{red}{3} &19 &\color{red}{3} &\color{red}{3} &\color{red}{3} &18 &\color{red}{3} &17 &\color{red}{2} \\ \color{red}{3} &16 &\color{red}{3} &\color{red}{1} &22 &\color{red}{3} &20 &\color{red}{3} &12 &4 \\ \color{red}{2} &\color{red}{2} &9 &\color{red}{3} &\color{red}{3} &\color{red}{3} &\color{red}{3} &\color{red}{2} &\color{red}{2} &2 \end{matrix}$$
• @I'mNobody I used integer linear programming, with a binary decision variable $x_{ijk}$ to indicate whether cell $(i,j)$ contains $k$ mines and a binary decision variable $y_{ijk}$ to indicate whether cell $(i,j)$ has $k$ neighboring mines. Commented Oct 26, 2022 at 18:08