Rivers' buzz-beater sinks Tar Heels