Unordered Map vs Ordered Map

Правка en2, от 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.

Теги map vs unordered_map

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский 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 Английский PRESS_F_2_PAY_RESPECT 2020-02-05 15:15:51 658 Initial revision (published)