Color the Fence

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