Foreman's fifth 3-pointer of the game tied it at 80 with 1:48 left and Gueye grabbed an offensive rebound on his missed free throw with 4 seconds left and sank it for an 85-84 lead.
The Seawolves nearly made a heave at the end of regulation.
For more AP college basketball coverage: https://apnews.com/Collegebasketball and http://twitter.com/AP-Top25
Elements of this story were generated by Automated Insights, http://www.automatedinsights.com/ap, using data from STATS LLC, https://www.stats.com
Gonzaga leads Dickie V's early 'dazzling dozen' for 2020-21
When looking ahead to next season, Dick Vitale says don't overlook a talented Gonzaga squad.
UCLA junior Chris Smith enters NBA draft
UCLA junior Chris Smith has decided to enter the 2020 NBA draft.
Hardaway reflects on decision to coach Memphis
Memphis coach Penny Hardaway looks back on his team's previous season, including navigating the James Wiseman situation. Catch more of "The Harder Way: A Season with the Memphis Tigers" on ESPN+.