A tricky (but not too inherently difficult) grid problem. You're given a rectangular map with each cell either water or land. An island is any connected component of the 8-neighbour map. You need to determine something about how the islands "contain" each other.
From TopCoder Single Round Match 341.