is there a continuous real-valued function on R which takes all its values exactly twice?
Here is a similar proof. See if you can understand it, and if you can see if you can generalize to your question. If you have any trouble report back.
You may need to scroll down a little.