__gcd VS std::gcd

Revision en3, by Barakat., 2025-06-01 12:37:47

Hello Codeforces,
Just got TLE on 2116C - Gellyfish and Flaming Peony using __gcd, but after switching to gcd from <numeric>, my code got AC!

TLE Submission (using __gcd): Submission #322284306
AC Submission (using std::gcd): Submission #322321593

I couldn't find a clear reason online for this difference.
If anyone knows why this happens, please share in the comments section!

Tags div.2

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English Barakat. 2025-06-01 12:38:41 0 (published)
en3 English Barakat. 2025-06-01 12:37:47 143
en2 English Barakat. 2025-06-01 12:36:27 126
en1 English Barakat. 2025-06-01 12:35:03 259 Initial revision (saved to drafts)