# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3831 |
3 | Radewoosh | 3646 |
4 | jqdai0815 | 3620 |
4 | Benq | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | gamegame | 3386 |
10 | ksun48 | 3373 |
# | User | Contrib. |
---|---|---|
1 | cry | 164 |
1 | maomao90 | 164 |
3 | Um_nik | 163 |
4 | atcoder_official | 160 |
5 | -is-this-fft- | 158 |
6 | awoo | 157 |
7 | adamant | 156 |
8 | TheScrasse | 154 |
8 | nor | 154 |
10 | Dominater069 | 153 |
Name |
---|
your unordered_map got an anti-hash test(unordered_map worst case look time O(n) due to all hashes colliding with each other). And because MS C++ 2017 is a different compiler, so unordered map hashing works a bit different. In whatever way, the three should get timelimit anyways. I recommend you not to use unordered_map in hackable contests or in sites that have system testing afterwards like codeforces.
At least it could have given TLE at the time of contest so i would have changed the unordered_map to map.
Sadly, authors usually don't usually think of anti-hashing tests but hackers do. Here is a really cool blog which helps if you want to use unordered_map.
But here all keys are ints and not int64_t/long longs, so their hashes do not (should not?) collide, so what's the real reason?
Numbers till $$$10^9$$$. At least not all hashes collide, but a lot of them. If numbers were only till $$$10^6$$$ or lower, I guess it was gonna pass.
Yeah, I did not realize that the hash function includes % bucket_count, thank you