Problem

Source: X International Festival of Young Mathematicians Sozopol 2019, Theme for 10-12 grade

Tags: algebra, functional equation



The non-decreasing functions $f,g: \mathbb{R}\rightarrow \mathbb{R}$ are such that $f(r)\leq g(r)$ for $\forall$ rational numbers $r$. Is it true that $f(x)\leq g(x)$ for $\forall$ real numbers $x$?