We say that $f:\mathbb{R}\to\mathbb{R}$ has a local minimum at every point, if for any point $x_0$ we can find an open interval containing $x_0$ such that $f(x)\ge f(x_0)$ for every point in the interval. Suppose $f$ is any function $\mathbb{R}\to\mathbb{R}$ satisfying this condition (so, in particular, it is not necessarily continuous).
It does not follow that $f$ is constant. For example, take $f$ to be 0 on the integers and 1 elsewhere.
So the question is prove that $f$ is constant except at (at most) countably many points, or find a counter-example.