11. (20 points) Given $f: \mathbf{Z} \rightarrow \mathbf{Z}$ is an even function, and $f(1)=1, f(2017) \neq 1$. If for any $x, y \in \mathbf{Z}$, the following inequality holds:
$$
2 f(x+y)-f(x)-f(y) \leqslant|f(x)-f(y)|,
$$

find all possible values of $f(2018)$.
11. By the problem, for any $x, y \in \mathbf{Z}$, we have
$$
\begin{array}{l}
f(x+y) \leqslant \frac{f(x)+f(y)+|f(x)-f(y)|}{2} \\
=\max \{f(x), f(y)\} .
\end{array}
$$

Given $f(1)=1$, we can prove that for any $k \in \mathbf{Z}$ $(k \neq 0)$, $f(k) \leqslant 1$.
First, we use induction to prove that when $k \in \mathbf{Z}_{+}$, $f(k) \leqslant 1$.
For $k=1$, it is clearly true.
Assume that when $n=k$, $f(k) \leqslant 1$.
Then $f(k+1) \leqslant \max \{f(k), f(1)\} \leqslant 1$.
Since $f(x)$ is an even function, thus, for any $k \in \mathbf{Z}$ $(k \neq 0)$, $f(k) \leqslant 1$.
Notice that,
$$
\begin{array}{l}
f(1)=f(2018-2017) \\
\leqslant \max \{f(2018), f(-2017)\} .
\end{array}
$$

Given $f(2017) \neq 1$, we know $f(-2017) \neq 1$, i.e., $f(-2017)<1$.
Thus, $1=f(1) \leqslant f(2018) \leqslant 1$, i.e., $f(2018)=1$.
Therefore, such an $f(x)$ exists, for example,
$$
f(x)=\left\{\begin{array}{ll}
1, & 2017+x \\
-1, & 2017 \mid x
\end{array}\right.
$$