Neither team led by more than four points over the final 10 minutes until Cook's second free throw with 6.7 seconds left made it 76-71.
The sophomore point guard had six assists and just four turnovers against Louisville's pressure defense. He was 4 for 8 from the field and 6 of 6 from the line.
Mason Plumlee had 16 points for Duke (6-0).
Peyton Siva had 19 points for the Cardinals (5-1) and Russ Smith added 17.
NO. 13 MISSOURI 68, VCU 65
PARADISE ISLAND, Bahamas (AP) — Laurence Bowers had 14 points and 11 rebounds and Phil Pressey had 11 points and eight assists, leading the Tigers over the Rams in the third-place game of the Battle 4 Atlantis.
Pressey gave the Tigers (5-1) the lead for good with a 3-pointer with 1:17 to play. That capped a run of five straight possessions where the teams exchanged the lead.
The Rams (3-3) turned the ball over with 57 seconds left. The Tigers called a timeout with 10 seconds left on the shot clock. Pressey took the inbounds, dribbled off a few seconds, then made a move to the basket where he ducked under a VCU player and hit a flip shot as the shot clock hit zero.
Troy Daniels of VCU missed a 3 and the Tigers ran out the clock.
The Tigers lost to No. 2 Louisville in the semifinals, when they committed 23 turnovers. They had 14 against VCU.
Negus Webster-Chan and Keion Bell had 12 points apiece for Missouri.
NO. 18 UNLV 82, IOWA STATE 70
LAS VEGAS (AP) — Freshman Anthony Bennett scored 22 points and the Runnin' Rebels beat the Cyclones in the consolation game of the Global Sports Classic.
UNLV (3-1) began to pull away late in the second half. After Will Clyburn's tip-in at 7:24 cut Iowa State's deficit to 57-54, the Rebels closed the game with a 25-16 run.
Anthony Marshall added 16 points for the Rebels, and Mike Moser had 15 points and 12 rebounds.
The Runnin' Rebels used a pair of runs to seize momentum midway through the first half, but Iowa State (4-2) managed to stay close.
Clyburn had 21 points and 15 rebounds for the Cyclones. Tyrus McGee added 12 points while Melvin Eljm scored 10.
NO. 19 MEMPHIS 52, NORTHERN IOWA 47
PARADISE ISLAND, Bahamas (AP) — Chris Crawford had 18 points and 12 rebounds, and Memphis avoided losing all three games in the Battle 4 Atlantis.
Joe Jackson scored 15 for the Tigers (3-2), who were one of four ranked teams in the regular-season tournament.
Deon Mitchell led the Panthers (3-3) with 18 points and five assists, but Northern Iowa shot 31.4 percent (16 of 51), including 7 of 27 (25.9 percent) from 3-point range.
COLLEGE OF CHARLESTON 63, NO. 24 BAYLOR 59
WACO, Texas (AP) — Willis Hall scored six consecutive points for the College of Charleston to break the final tie and the Cougars held on for a 63-59 upset.
The Cougars (3-2) won against a Top 25 team for the first time since an overtime home victory over No. 9 North Carolina on Jan. 4, 2010. Their only other road win against a ranked team was at Georgia Tech in January 1993.
Hall had 12 points, with eight free throws. The last came with 2.4 seconds left after grabbing a rebound.
Pierre Jackson's 21 points led Baylor (4-2), which had won 29 consecutive home games against non-conference teams.
Hall's two free throws with 3:22 left snapped a 55-all tie. His layup and jumper stretched the lead to 61-55.