f:R->R

f(x) is 1 on Q and 0 elsewhere

Show f is not continuous at any point of R.

What about if the usual metric on R is replaced by the discrete metric?

I know that if f(x) takes 1 on Q and 0 elsewhere(Q complement), then by the density property there's infinite number of points between any values of Q, so the graph will keep jumping from 1 to 0 and back, so that's obviously not continuous. Have no idea how to show that in an actual proof though.

Also, I don't really understand replacing a metric by some other metric. What happens id R is replaced by the discrete metric?