Cubs end 12-game losing streak, beat Padres 11-7