If f:R→S, defined by f(x)=sinx−√3cosx +1, is onto, then the interval of S is

A. [−1,3]
B. [−1,1]
C. [0,3]
D. [0,1]