Elliptic problems in Rn with discontinuous nonlinearities