This link from CodeChef is the editorial for CHEFHACK. It had the link to another similar problem in UVA which is Seasonal War. I started to solve the problem and had just one thing that sounded unclear to me: "Cells with adjacent sides on common vertices, which contain binary ones, comprise one war eagle. A very large image of one war eagle might contain all ones." Looking at the sample cases it became clear. Coded the changes, created my own test cases and seeing that all was well, I submitted the solution. This is what the judge told: "Your submission with number 11293947 for the problem 352 - The Seasonal War has succeeded with verdict Accepted."