Maximum possible number of colored cells in a 5x5 grid where no 3x3 subgrid can include more than 5 colored cells. In a 5x5 grid, each cell can be either colored or uncolored. What is the maximum number of cells you are able to color where no 3x3 subgrid can contain more than 5 colored cells?
Follow up: Could you explain your thought process in answering this question?

I can get $18$ colored squares: color the 2x2s in the corners and either the cell in the first row, third column and last row, third column, or third row, first column and third row, last column. I was asking for your thought process because I simply used trial and error, recognizing that the optimal cells to color tend to be those shared by the fewest 3x3 subgrids. I was wondering if there was a more methodical approach in addition to an answer for the problem.
I saw this problem posted on a display advertising a club at school. When I contacted the club leaders they did not know the solution, and so I thought I'd ask this community. This is in no way schoolwork.

 aabbb
 aabbb
 ccddd
 ccddd
 ccddd

Assume there exists a solution with 19. There are at most 5 in the d region, at most 5 in the b, and at most 5 in the c region, hence a is completely filled with 4.
So all is sharp, i.e., there are exactly 5 in each of b, c, d.
Then at least one of the left two b fields and at least one of the top two c fields is coloured, giving us already 6 coloured fields in the top left $3\times3$, contradiction!
