NC State ends three-game losing streak, beats Pittsburgh 79-74