Expected running time of an algorithm This demonstrates the limitations of considering expected running time of an algorithm as a useful measure. For any $n&gt;0$, describe  a function $f:\{0,1\}^n \to \mathbb{N}$ such that

$\mathbb{E}[f] = \mathbb{E}_{x\in \{0,1\}^n}[f(x)] = n^c$ for some constant $c$
and 
${\sf var}[f] = E[f^2] - (E[f])^2 = \Omega(2^n)$.

I.e., there can be performance measures $f$ which is polynomial in expectation, but variance being exponential. Give formal justification for your answer (i.e., computation of expectation and variance for the function $f$ constructed).

I'm not able to approach the problem. I guess some hint would suffice.
There is a solution with $c = 0$: what would happen if $f(x) = 1$ for every value $x$ of $\{0,1\}^n$ but one $\tilde{x}$, for which $f(\tilde{x})$ is very big?