# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 165 |
2 | maomao90 | 163 |
2 | Um_nik | 163 |
4 | atcoder_official | 161 |
5 | adamant | 160 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | nor | 153 |
9 | 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