Home > Back-end >  To solve the
To solve the

Time:09-15

2.1 the title description
Please calculate the area of the closed area surrounded by the Numbers 1, calculate the size of the method is to statistics the number of the area surrounded by 1 0, for example, the sample ten times ten to the two dimensional array of Numbers 1 surrounded by four point, closed area of 4,
2.2 input format
Ten times ten to the matrix, the matrix of only 1 s and 0 s
2.3 the output format
The number of surrounded by Numbers 1 0

2.4 input sample
0 0 0 0 0 0 0 0 0 0
1 1 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0

2.5 the output sample
4
  • Related