Snow Cow

I’m working on this problem lately.

However, I don’t really understand how one can quickly find if there’s any parents that have already been splashed with a certain color.
If anyone could give me a pointer in the right direction, that would be greatly appreciated!