Let $f,g :[a,b]\to\mathbb{R}$ be continuous functions such that $$\int\limits_c^df(x)\leq \int\limits_c^dg(x)dx$$ whenever a$\leq$c$<$d$\leq$b.

I need to show that $f(x)\leq g(x)$. I have the idea of using proof by contradiction supposing that $f(x)>g(x)$, but I do not know how to continue.