Problem 2672 · Medium

Number of Adjacent Elements With the Same Color

Track the count of equal adjacent pairs; each query only affects its two neighbors.

Open the interactive visualisation