Does this uncountable set of $\mathbb{R}\times\mathbb{R}$ contain a dense set? I tried to find a different solution of the following problem:
If $f$ is a function from $\mathbb{R}$ to $\mathbb{R}$, such that $f$ attains every value exactly twice, $f$ cannot be continuous.
My attempt: $f:\mathbb{R} \to \mathbb{R}$, let $g:\mathbb{R}\times\mathbb{R} \to \mathbb{R}$, $g(x,y)=f(x)-f(y)$. Let $f$ is continuous, then so is $g$. As $f$ attains every value exactly twice $f$ can't be constant, and as $f$ is continuous, $f$ is uncountable. Thus there are uncountably many pairs of points $(x,y)$ such that $f(x)=f(y)$. Thus $g$ sends uncountably many points of $\mathbb{R}\times\mathbb{R}$ to $0$. Now if every uncountable set of $\mathbb{R}$ contains a dense set, then $g$ sends a dense set to $\{0\}$. Thus $g$ is $0$. But then $f$ is constant, contradiction. Thus $f$ isn't continuous.
So the real problem: Is it true that this uncountable set contains a set, dense in $\mathbb{R}\times\mathbb{R}$?
 A: I would appeal to the major theorems about continuous functions on closed and bounded intervals.  For instance, there must be points $a$ and $b$ with $a < b$ and $f(a) = f(b) = 0$.  Let $M$ and $m$ be the maximum and minimum values of $f$ on $[a,b]$.  Either $M > 0$ or $m < 0$ (otherwise $f$ is constant, which would be a contradiction); assume without loss of generality that $M > 0$.
There exists $c$ in $(a,b)$ such that $f(c) = M$.  Then there exist $d$ and $e$ such that $ a < d < c < e < b$ and $f(d) = f(e) = M/2$.
There must be a second point $p$ with $f(p) = M$.  Cases:


*

*If $p < a$, then there is a third point $q$ with $p < q < a$ and $f(q) = M/2$.

*If $p > b$, then there is a third point $q$ with $b < q < p$ and $f(q) = M/2$.

*If $a < p < b$ then $f$ is constant on the interval between $c$ and $p$, $f$ has a minimum $m'$ between $c$ and $p$.  Assume $p < c$; then we can find four points $r_1$, $r_2$, $r_3$, and $r_4$ such that $a < r_1 < p < r_2 < r_3 < c < r_4$ and $f(r_i) = (M+m')/2$.


These all contradict the assumption that each value has exactly two points in its preimage.  OK, that's ugly; but perhaps you can simplify it.
A: $\mathbb{R}\times \{0\}$ is an uncountable subset of the plane that contains no dense subset (countable or not) of the plane. There are a lot more examples of course. 
A: Let $f$ be a continuous function that achieves each value exactly twice.
Let $x < y$ so that $f(x) = f(y) = a$.  Let $w < v$ be so that $f(w) = f(v) = b > a$.  As a directly result of Intermediate value theorem either $x < w < v < y$ or $w < x < y < v$.
So let $A = \{x|$ if $f(x) = f(w)$ and $w \ne x$ then $x< w\}$ and $B = \{x|$ if $f(x) = f(w)$ and $w \ne x$ then $x> w\}$.
This basically a "cut".  All reals are either in $A$ or $B$.  Every element of $A$ is less than every element of $B$.
So let $s= \sup A = \inf B$ and $(-\infty, s) \subset A$ and $(s, \infty) \subset B$.
So the question is, is $s \in A$ or is $s \in B$?  Either option leads to a contradiction.
A: If any uncountable subset of $\mathbb R^2$ contained a dense set, then—since supersets of dense sets are dense—this would mean that

any uncountable subset of $\mathbb R^2$ is dense.

This is clearly absurd.

In addition, it is easy to construct continuous, non-constant functions $g:\mathbb R^2\to\mathbb R$ such that $g^{-1}(\{0\})$ is uncountable yet not dense, so your particular argument does not reveal any contradiction.

ANSWER AMENDED
Using the assumptions you made to obtain a contradiction, I will show that the set $g^{-1}(\{0\})$ cannot be dense in $\mathbb R^2$ (and hence nor can it contain any dense subset).
To see this, pick any $(x,y)\in\mathbb R^2$ such that $f(x)\neq f(y)$. This is certainly possible because $f$ is obviously not constant. Without loss of generality, suppose that $f(x)<f(y)$ and let $$\alpha\equiv\frac{f(x)+f(y)}{2}.$$ Since $f$ is continuous, there exist $\varepsilon_x>0$ and $\varepsilon_y>0$ such that


*

*$f(z)<\alpha$ whenever $x-\varepsilon_x<z<x+\varepsilon_x$; and

*$f(z)>\alpha$ whenever $y-\varepsilon_y<z<y+\varepsilon_y$.


Let $\varepsilon\equiv\min\{\varepsilon_x,\varepsilon_y\}$. Now, if $(z_1,z_2)\in\mathbb R^2$ is within a circle of radius $\varepsilon$ centered around $(x,y)$, then $|z_1-x|<\varepsilon_x$ and $|z_2-y|<\varepsilon_y$, so that $$g(z_1,z_2)=f(z_1)-f(z_2)<\alpha-\alpha=0,$$ so that $(z_1,z_2)\notin g^{-1}(\{0\})$.
The conclusion is that the circle of radius $\varepsilon$ around $(x,y)$ does not contain any points from $g^{-1}(\{0\})$. This means that $g^{-1}(\{0\})$ is not dense.
