Miami's Kendrick Nunn and San Antonio's DeMar DeRozan both topped 30 points as the Heat beat the Spurs 106-110.