The optimization problem is
$$\min_{x\in K} \|h - x\|_2$$
where
$$K = \{v\in R^n : \exists \lambda \geq 0\ v_1=v_2=\ldots=v_k=\lambda \ \text{and} \ |v_i| \leq \lambda \ \text{for} \ i=k+1,\ldots,n \}$$ , where $h, k, n$ are all known.
Could someone tell me how to write down this constraint in cvx? I couldn't think of a convenient way of specifying the constraints which define the convex set $K$.