Let $f:[0, 1]×[0, 1] \rightarrow \Bbb{R}$ be continuous and assume that for all $x \in [0, 1]$ there is a unique $y_x$ such that $f(x,y_x)$ = $\max\{f(x,y):y∈[0, 1]\}$. If $g(x) =y_x$, then $g:[0, 1] \rightarrow [0, 1]$ is continuous.
Is this true? I believe compactness would play a role.
Any hints would be appreciated.