1
For the first question, take the function $$f(x) = \left\lbrace \begin{array} .1-\frac{d(x,C)}{d(m,C)} & \text{if} & d(x,C)\leq d(m,C) \\ 0 & \text{if} & d(x,C)> d(m,C) \end{array} \right.$$ With $$d(x,C) = \inf_{y\in C} d(x,y)$$ For the second question, the function is a little more complex....