Problem 775 · Medium
Every local inversion is global, so the counts match only when no value is more than one slot from home.
Open the interactive visualisation