Let $G$ be a finite group and $x_1,..., x_n$ be an enumeration of its elements. We consider the matrix $(a_{ij})_{1\le i,j \le n}$ where $a_{ij}=0$ if $x_i x_j^{-1}=x_jx_i^{-1}$ and $a_{ij}=1$ otherwise. Find the parity of $\det(a_{ij})$.
This problem comes from the 2019 District stage of the Romanian Mathematics Olympiad.
Let $A=(a_{ij})_{1\le i,j \le n}$. One of the $x_i$s is going to be the identity element of $G$. WLOG we may consider it to be $x_1$, since changing rows and columns only affects the sign of a determinant.
I managed to obseve that $A$ is symmetric since $a_{ij}=a_{ji}$ always. Furthermore, $A$'s principal diagonal is going to be $0$ because $x_i x_i^{-1}=x_i^{-1}x_i$, $\forall i=\overline{1,n}$. Hence, $A$ is a symmetric hollow matrix whose entries are either $0$ or $1$. Here I got stuck and I would like to know if it is possible to continue along these lines.
EDIT: As requested, I will translate the official solution:
$\det(a_{ij})$ is even. To prove this, we will show that $\det(a_{ij})$ is divisible by $|S|$, where $S=\{x | x\in G, x\ne x^{-1}\}$. Since an element of $G$ is in $S$ if and only if its inverse is in $S$, $|S|$ is even (possibly zero), so $\det(a_{ij})$ is even.
The value of a determinant is not changed if a column is replaced by the sum of all the columns. Hence, to prove the divisibility it is enough to show that every row contains exactly $|S|$ units.
If $S$ is empty, then $(a_{ij})=O_n$, so $\det(a_{ij})=0$.
If $S$ isn't empty, we fix a row $i$ and we consider the set $J_i=\{j |a_{ij}=1\}$. Since $j \to x_i x_j^{-1}$ defines a bijection from $J_i$ to $S$, it follows that $|J_i|=|S|$.