D - Adventure in Magicland

Problem Name:
D - Adventure in Magicland
Site:HackerEarth
Links:
Tags:
Problem setters: