Possible Duplicate:
A converse of sorts to the intermediate value theorem, with an additional property
Definition of Darboux function: Let $S\subset\mathbb{R}$ be given. We say that $f:S\rightarrow\mathbb{R}$ is a Darboux function if it possesses the following property: for each $a,b\in S$, such that $a, and for each $y_0\in(c,d)$ (where $c=\mathrm{min}\{f(a),f(b)\}$ and $d=\mathrm{max}\{f(a),f(b)\}$) there exists an $x_0\in S\cap (a,b)$ such that $f(x_0)=y_0$.
My problem is this: Suppose that $f:\mathbb{R}\rightarrow\mathbb{R}$ is a Darboux function. Suppose also that $f^{-1}(\{q\})$ is closed for each $q\in\mathbb{Q}$. I have to prove that $f$ is continuous on $\mathbb{R}$.
Could you help me with this problem, please?