← ALL NOTES
Array

3160. Find the Number of Distinct Colors Among the Balls

Given a limit and queries (ball, color): paint ball ball with color color (repainting if already colored). After each query, report the number of distinct colors among all painted balls.

Loading…