Descriptions:

Sign on Fence

CodeForces - 484E