Solution (source code)

= Solution

The supplied factors give $Q^Tb=(0,2)^T$. <Back substitution> in $Rx=Q^Tb$ yields $2y=2$ and $10x+4y=0$, so
$$
\boxed{x=-2/5,\qquad y=1.}
$$
Multiplying by the original <matrix> gives $(1,1,1,1)^T$, so this least-squares minimizer has residual zero: this particular overdetermined system is exactly consistent. <Full column rank> still guarantees uniqueness of the minimizer.