Problem 3917 · Medium

Count Indices With Opposite Parity

Scan each index forward and tally the later values whose parity differs from its own.

Open the interactive visualisation