TL 12 [submission:107676717] -- `unordered_map<int, int> cnt` (TL = 2s)↵
<br>↵
TL 18 [submission:107676732] -- `unordered_map<int, int> cnt(n)` (works 46ms on 12th test)↵
<br>↵
OK [submission:107676952] -- `sort` (works 77ms and 66ms on 12th and 18th tests)↵
↵
What's going on?) I have no access to tests and can not repeat this effect locally (both windows:g++, linux:g++)↵
↵
**UPD:** <br>↵
[submission:107679200] `rehash(100 + gen() % 10000)` gives OK in 670 ms, which is still too slow<br>↵
[submission:107679288] `rehash(100 + gen() % 10000) + reserve` gives OK in 100 ms, which is strange but acceptable.
TL 18 [submission:107676732] -- `unordered_map<int, int> cnt(n)` (works 46ms on 12th test)
OK [submission:107676952] -- `sort` (works 77ms and 66ms on 12th and 18th tests)↵
↵
What's going on?) I have no access to tests and can not repeat this effect locally (both windows:g++, linux:g++)↵
↵
**UPD:** <br>↵
[submission:107679200] `rehash(100 + gen() % 10000)` gives OK in 670 ms, which is still too slow<br>↵
[submission:107679288] `rehash(100 + gen() % 10000) + reserve` gives OK in 100 ms, which is strange but acceptable.