The following problem is problem 2.1 from John Lee's Introduction to Smooth Manifolds:
Define $ f: R \to R $ by $ f(x) = 1 $ if $ x \geq 0 $ and $ f(x) = 0 $ if $ x < 0 $. Show that for every $ x \in R $, there are smooth coordinate charts $ (U, \varphi) $ containing $ x $ and $ (V, \psi) $ containing $ f(x) $ such that $ \psi \circ f \circ \varphi^{-1} $ is smooth as a map from $ \varphi(U \cap f^{-1}(V)) $ to $ \psi(V) $, but $ f $ is not smooth.
That $ f $ is not smooth I think is pretty clear, since using the smooth atlas containing the chart $ (R, Id) $, the map $ f \circ Id^{-1} = f $ is clearly not smooth.
However, I have a problem with the first part of the question. I think the charts $ (U, \varphi) $ and $ (V, \psi) $ should be quite simple, something like open subsets $ (x - 1/2, x+ 1/2) $ with linear maps, but I don't know how to make it work. Any help is appreciated.