Distinct Rows in Submatrices | CodeChef