C++ Problem about a Matrix
Please explain every step, and your method.
DESCRIPTION
Input a n*m matrix containing only 0 and 1 values.
Objective: Find its biggest submatrix, for which all the values are 0 s
INPUT
first line is two numbers n,m(n,m<=300) .
then n lines,each line has m digits,each digit is 0 or 1 .
Each digit is separated by one blank space.
OUTPUT
One number ,which represent the number of zeros inside that submatrix
SAMPLE INPUT
6 5
0 0 0 0 0
0 1 1 1 0
0 1 0 1 0
0 1 1 1 0
0 0 0 0 0
0 0 0 0 0
SAMPLE OUTPUT
10
HINT
This question ia relatively easy, there are many methods, for example you coud search for all the submatrix and check for each if it contains all zero values
By OTA: Sandeep Kumar, MTech
OTA Rating: 4.8/5
Your Price: $2.19 (original value ~$15.96)
What's included:
Page generated in 0.0185 seconds