Hint: If f is indeed continuous, then f^{-1}( (0,1) ) is a non-empty open subset of R. It also contains 1/2, for instance. Since 1/2 lies in an open subset of R, look at an irrational number in a neighborhood of 1/2 and show that it doesn't map into (0,1) as originally assumed.