Problem 3395 · Hard

Subsequences with a Unique Middle Mode I

Fix the middle element of a 5-element subsequence, then count the pairs on each side that keep it the single most frequent value.

Open the interactive visualisation