One-Dimensional Puzzle

Problem Name:
One-Dimensional Puzzle
Site:CodeForces
Links:
Tags:
Problem setters: