Consider a smooth function $f : \mathbb{R}^2 \to \mathbb{R}$, I wonder that any contour (curve) in $\mathbb{R}^2$ where every point of it is a local maxima of $f$, need be a smooth curve?
Edit : $f$ need to be smooth.
Edit 2 : By contour I mean curve of nonzero arc length.
Elaboration (after comments by Will and copper.hat)
Let the function be $f(x,y)$. I want the contour to have at every point on it, the $\frac{\partial f}{\partial x} = 0$ and $\frac{\partial^2 f}{\partial x^2} < 0$. Is any such contour which is not smooth possible?