EVILAND from February Cook-Off
https://www.codechef.com/COOK103B/problems/EVILAND Anyone knows how to code it?