Unordered Map vs Ordered Map

Revision en2, by PRESS_F_2_PAY_RESPECT, 2020-02-05 15:49:43

Hello guys!

In yesterday's round Codeforces Round 617 (Div. 3), in question 1296C - Yet Another Walking Robot, I submitted this solution using map which took 61ms to pass: 70273184. Today, I thought of submitting the same solution using unordered map, which I later found out doesn't have a hash function for pairs, so I copied the hash function from GeeksForGeeks and then submitted the solution which took 187ms to pass: 70355416.

Can somebody tell me why is unordered map working slower than map for this problem ?

Thanks.

Tags map vs unordered_map

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English PRESS_F_2_PAY_RESPECT 2020-02-05 15:49:43 23 Tiny change: '.\nToday, just out of curiosity, I thoug' -> '.\nToday, I thoug'
en1 English PRESS_F_2_PAY_RESPECT 2020-02-05 15:15:51 658 Initial revision (published)