Which is faster Map or Set, Count or Find?

Revision en1, by -M1, 2024-12-16 15:28:46

In the recent Div4 contest problem F: My submission1 using map + .find fails on TC 25 (TLE). My submission2 using set + .find fails on TC 33 (TLE). But when I used .count with set it barely passes in C++20 (submission) but gave TLE in C++17 as well as C++23. Why is it so?

Tags number theory, need help

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English -M1 2024-12-16 15:28:46 549 Initial revision (published)