Problem 2541 · Medium
Every difference must be a multiple of k, and the positive steps must cancel the negative ones exactly.
Open the interactive visualisation