in this problem when I used an unordered map I got TLE and used the same solution with map I got ACC I need an explanation, please
- solution with unordered map https://codeforces.me/contest/1790/submission/191038498
- solution with map https://codeforces.me/contest/1790/submission/191038420
I really appreciate any help you can provide.
Because Unordered map(HashTable) has worst case time complexity of O(n^2). That happens in case of collisions and since there was hacking available. Hackers added anti-hash tests so it got the unordered map to have O(n^2) and thus TL
Map(Self Balancing BST) always O(log n)
Thank you my bro
u r wlcm. pls up this https://codeforces.me/blog/entry/111968. This bad ass cheater may have affected your rank and many other fair contestants
You should read this.