Building a Fence

Problem Name:
Building a Fence
Site:CodeForces
Links:
Tags:
Problem setters: