Let $X$ be a $5\times 5$ matrix with each entry be $0$ or $1$. Let $x_{i,j}$ be the $(i,j)$-th entry of $X$ ($i,j=1,2,\hdots,5$). Consider all the $24$ ordered sequence in the rows, columns and diagonals of $X$ in the following:
\begin{align*}
&(x_{i,1}, x_{i,2},\hdots,x_{i,5}),\ (x_{i,5},x_{i,4},\hdots,x_{i,1}),\ (i=1,2,\hdots,5) \\
&(x_{1,j}, x_{2,j},\hdots,x_{5,j}),\ (x_{5,j},x_{4,j},\hdots,x_{1,j}),\ (j=1,2,\hdots,5) \\
&(x_{1,1},x_{2,2},\hdots,x_{5,5}),\ (x_{5,5},x_{4,4},\hdots,x_{1,1}) \\
&(x_{1,5},x_{2,4},\hdots,x_{5,1}),\ (x_{5,1},x_{4,2},\hdots,x_{1,5})
\end{align*}
Suppose that all of the sequences are different. Find all the possible values of the sum of all entries in $X$.
1. **Define Variables:**
   Let \( n \) denote the sum of entries on cells that do not lie on the two main diagonals.
   Let \( d \) denote the sum of entries on cells that lie on the two main diagonals, except the center cell.
   Let \( c \) denote the entry on the center cell.

2. **Double Counting:**
   By double counting the total number of 1s in the sequences, we have:
   \[
   4n + 6d + 8c = 60
   \]
   Simplifying, we get:
   \[
   2n + 3d + 4c = 30
   \]

3. **Divisibility:**
   Since \( 2n + 3d + 4c = 30 \), it follows that \( d \) must be even. Let \( d = 2d' \). Substituting, we get:
   \[
   2n + 6d' + 4c = 30 \implies n + 3d' + 2c = 15
   \]

4. **Sum of All Entries:**
   The sum of all entries in \( X \) is:
   \[
   s = n + 2d' + c
   \]
   From the equation \( n + 3d' + 2c = 15 \), we can express \( n \) as:
   \[
   n = 15 - 3d' - 2c
   \]
   Substituting \( n \) into the sum equation:
   \[
   s = (15 - 3d' - 2c) + 2d' + c = 15 - d' - c
   \]

5. **Range of \( s \):**
   Since \( d' \) and \( c \) are integers and \( d' \neq 4 \) (as it would create a palindrome on the diagonals), we have:
   \[
   11 \leq s \leq 14
   \]
   This is because:
   \[
   15 - 3 - 1 \leq 15 - d' - c \leq 15 - 1 - 0
   \]

6. **Symmetry Argument:**
   The problem is symmetric over switching 0 to 1 and vice versa in all entries. Therefore, it is sufficient to show that \( s = 11 \) is impossible and \( s = 12 \) is possible.

7. **Case Analysis for \( s = 11 \):**
   If \( s = 11 \), then:
   \[
   11 = 15 - d' - c \implies d' + c = 4
   \]
   Since \( c = 1 \) and \( d = 2d' = 6 \), the two 0 entries on the diagonals must be on distinct diagonals. This reduces some cases.

8. **Constructing the Matrix:**
   Consider the following matrix:
   \[
   \begin{array}{|c|c|c|c|c|}
   \hline
   1 &   &   &   & 1 \\ \hline
     & 1 &   & 0 &   \\ \hline
     &   & 1 &   &   \\ \hline
     & 1 &   & 1 &   \\ \hline
   1 & 0 & 0 & 0 & 0 \\ \hline
   \end{array}
   \]
   This matrix does not satisfy the condition that all sequences are different.

9. **Constructing a Valid Matrix for \( s = 12 \):**
   Consider the following matrix:
   \[
   \begin{array}{|c|c|c|c|c|}
   \hline
   0 & 1 & 0 & 0 & 1 \\ \hline
   0 & 0 & 0 & 0 & 1 \\ \hline
   0 & 0 & 1 & 0 & 1 \\ \hline
   1 & 1 & 1 & 1 & 0 \\ \hline
   0 & 1 & 0 & 1 & 1 \\ \hline
   \end{array}
   \]
   This matrix satisfies the condition that all sequences are different and the sum of all entries is 12.

The final answer is \( \boxed{ 12, 13 } \)