Strange problems about C++ map in 1771F

Правка en1, от sjc061031, 2022-12-12 04:50:16

My submission 184727292 in contest got Time Limit Exceeded on test 30.

When I submit this solution in C++14 184832244 , it passes in 592ms.

Then I change the map into vector 184832165 , and it passes in 296ms.

So it seems that the map runs too slow, and in test 30, $$$N=23355$$$, which means there are only $$$7e4$$$ operations of map, but strangely it costs more than $$$1s$$$.

Map should run in exactly $$$O(nlogn)$$$ , so what could possibly be the problem?

Теги map, c++, time limit exceeded

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский sjc061031 2022-12-12 11:01:23 346 Tiny change: 'ry/99038). The soluti' -> 'ry/99038).\n\nThe soluti'
en1 Английский sjc061031 2022-12-12 04:50:16 537 Initial revision (published)