Painting the Fence

Problem Name:
Painting the Fence
Site:CodeForces
Links:
Tags:
Problem setters: