Hello Codeforces,
I was trying to solve Codeforces Round #632 (Div. 2) Problem C. It gave me TLE on the last case (87th case) when I used unordered_map (Link) while it was accepted when I used map (Link).
I know the worst-case time complexity of the unordered_map is O(n) for searching, insertion, and deletion. Is the last case the worst case? Could someone help me to figure out how this is happening or where I'm getting wrong?
Please refer to https://codeforces.net/blog/entry/62393
Thank you very much. And yes, your custom hash function is astounding.