
ZOJ Problem Set  1482
Given a maze, you are to tell the number of partitions in it.
The first line is an integer N (2 <= N <= 3000), the size of the maze. The next N lines each has N 0and1's, 1 for an obstacle and 0 for an unoccupied
space.
One number on a line  the number of partitions. Sample Input 2
2
Author: PAN, Minghao Source: ZOJ Monthly, January 2003 