WEEK 5 ASSIGNMENT 5 QUESTION 02 SOLUTION
QUESTION :
The matrix M is divided into four quadrants by halving the rows and columns. If row/column is an odd number, divide them in such a way that the first half of the row/column should be one smaller than the second half.
The four quadrants are numbered from 1 to 4 in the structure shown below: Q1 | Q2
---+---
Q3 | Q4
INPUT FORMAT: M is a matrix of integers. You would be given two numbers m and n specifying the number of rows and columns. This would be followed by m lines of n integers each specifying the data of the m*n matrix M.
n and m will be greater than 1 and less than 12. OUTPUT FORMAT: Print in a separate line, the quadrant number with the smallest minimum-element.