map vs unordered_map

Revision en1, by alexashu, 2021-02-17 09:54:50

Yesterday , I gave contest round 702 div3 .

Problem F

Solution 1(https://codeforces.com/contest/1490/submission/107661957)

Solution 2(https://codeforces.com/contest/1490/submission/107661859)

In Solution1 I used unordered_map which gave me tle and than i used map in solution 2 it didn't.

Can anyone explain how does unordered_map gave tle and map won't?

Tags map vs unordered_map

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English alexashu 2021-02-17 09:54:50 587 Initial revision (published)