Exact solutions of generalized Calogero-Sutherland models: BCN and CN cases