Feu una funció que, donada una matriu quadrada @m@, indiqui si
aquesta és simètrica o no.
Recordeu que una matriu
és simètrica si
per a tota
i per a tota
.
Precondició
@m@ és una matriu quadrada
amb
.
Interfície
C++
typedef vector< vector<int>> Matriu;
bool es_simetrica(const Matriu& m);
Java
publicstaticbooleanesSimetrica(int[][] m);
Python
es_simetrica(m) # returns bool
MyPy
es_simetrica(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.