Gambling in contests with heterogeneous loss constraints