# Painting a 6x6 with 3 colours

Can you paint a 6x6 grid in red, green and blue, such that its every 3x3 sub-grid contains exactly 5 red, 3 green and 1 blue cell?

Good luck!

Will this work?

$$r r r r r r$$
$$r b r r b r$$
$$g g g g g g$$
$$r r r r r r$$
$$r b r r b r$$
$$g g g g g g$$

• You've go it! In fact there is a simple algorithm that can find solutions for arbitrary grid sizes, number of colors and their counts. – Dmitry Kamenetsky Oct 1 '19 at 0:47
• @DmitryKamenetsky, nice! Thanks. – ppgdev Oct 1 '19 at 0:52

There are at least $$9!/3!5!=504$$ different arrangements that work