Find all functions $f: \mathbb{R} \mapsto \mathbb{R}$ such that for all $x, y \in \mathbb{R}$,

$$
f(x-f(y))=1-x-y
$$
We need to set $x=f(y)$ (note that the direction matters. In general, we can replace $x$ with $f(y)$), but we cannot always replace $f(y)$ with $x$ (Why?). Thus, we obtain for all $y \in \mathbb{R}$

$$
f(0)=1-f(y)-y
$$

By letting $c=1-f(0)$ and rearranging, every solution function is of the form $f(y)=c-y$. We verify for each $c \in \mathbb{R}$: if a $c$ were valid, then in the original equation for all $x, y$:

$$
c-(x-(c-y))=1-x-y,
$$

which implies that $c=\frac{1}{2}$, so $f(y)=\frac{1}{2}-y$ is the unique solution.

The following equation, known as Cauchy's equation, is a classic and the result can be freely used in Olympiad problems.