№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
Название |
---|
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