Let be a surjective function $ f:\mathbb{R}\longrightarrow\mathbb{R} $ that has the property that if the sequence $ \left( f\left( x_n \right) \right)_{n\ge 1} $ is convergent, then the sequence $ \left( x_n \right)_{n\ge 1} $ is convergent. Prove that it is continuous.
Problem
Source: Romanian National Olympiad 2017, Grade xi, p.1
Tags: real analysis, Sequences, function, continuity