Walls of the North

Problem Name:
Walls of the North
Site:HackerEarth
Links:
Tags:
Problem setters: