Cooper Flagg had 33 points, nine rebounds and nine assists, and Anthony Davis had 31 points and nine rebounds as the Dallas Mavericks beat the Denver Nuggets 131-130.