Write a function that, given a square matrix @m@, tells if it is
symmetric or not.
Remember that a matrix
is symmetric if
for any
and for any
.
Precondition
@m@ is a square matrix
with
.
Interface
C++
typedef vector< vector<int>> Matrix;
bool is_symmetric(const Matrix& m);
Java
publicstaticbooleanisSymmetric(int[][] m);
Python
is_symmetric(m) # returns bool
MyPy
is_symmetric(m: list[list[int]]) ->bool
About statements
The official statement of a problem is always the one
in the PDF document. The HTML version of the statement
is also given to help you, but may contain some content
that is not well displayed. In case of doubt, always use the PDF.