Solution with unordered_map giving TLE gets accepted with ordered_map

Правка en1, от Infinite.Loop, 2021-02-17 10:06:42

This is my solution when I used unordered_map.

This is my solution when I used ordered_map.

It is seen that unordered_map performs better than ordered_map so how can TLE get resolved with ordered_map but not with unordered_map???

Теги #tle, #cpp, #std::map, map vs unordered_map

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Infinite.Loop 2021-02-17 10:06:42 426 Initial revision (published)