https://en.wikipedia.org/wiki/Permutation_matrix
Clasify a binary matrix as a permutation Matrix when returning 1 or not when returning 0. Input numbers are given as decimal numbers from keyboard, each number represents a row in binary. example 3x3 matrix: 1 -> 001 3 -> 011 6 -> 110
The first nunmber you have to introduce the number of test cases you want to perform. After that every test case starts with the range of the square matrix, followed by the binary rows as a decimal numbers. For instance the input given above will be:
1 3 1 3 6 Output: 0
2 test cases for two different ranges:
2 3 1 2 4 Output: 1
2 1 0 Output: 0