Production of Kaons, Protons, and Antiprotons with Large Transverse Momentum inppandpdCollisions at 200, 300, and 400 GeV