Unordered Map vs Ordered Map
Difference between en1 and en2, changed 23 character(s)
Hello guys!↵

In yesterday's round [contest:1296], in question [problem:1296C], I submitted this solution using map which took 61ms to pass: [submission:70273184].↵
Today, 
just out of curiosity, 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](https://www.geeksforgeeks.org/how-to-create-an-unordered_map-of-pairs-in-c/) and then submitted the solution which took 187ms to pass: [submission:70355416].↵

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

Thanks.

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)