You are given a matrix Mat of m rows and n columns. The matrix is boolean so the elements of the matrix can only be either 0 or 1. Now, if any row of the matrix contains a 1, then you need to fill that whole row with 1. After doing the mentioned operation, you need to print the modified matrix.InputThe first line of contains m and n denoting number of rows and number of columns. Then next m lines contain n elements denoting the elements of the matrix.Constraints:1 <= m, n <= 700Mat[I][j] ∈ {0,1}OutputIn a new line, print the modified matrix.ExampleInput:5 41 0 0 00 0 0 00 1 0 00 0 0 00 0 0 1Output:1 1 1 10 0 0 01 1 1 10 0 0 01 1 1 1Explanation:rows = 5 and columns = 4The given matrix is1 0 0 00 0 0 00 1 0 00 0 0 00 0 0 1Evidently, the first row contains a 1 so fill the whole row with 1. The third row also contains a 1 so that row will be filled too. Finally, the last row contains a 1 and therefore it needs to be filled with 1 too. The final matrix is1 1 1 10 0 0 01 1 1 10 0 0 01 1 1 1 i need in python
One of the most important periodicals on the condition and social status of women in the 19th century. It was the early period of women's education when Bamabodhini came into circulation.
One of the most important periodicals on the conditions and social states of women in the 19th cemtury.It was the early period of women's educations when bambodhini came into circulation.