What is the complexity for map.clear and unordered_map.clear
Разница между en1 и en2, 202 символ(ов) изменены
I have been solving [Stone Age Problem](https://codeforces.com/contest/1679/problem/B) and something caught my attention, what is the real complexity for map.clear and unordered_map.clear ↵

The same code using map.clear passes but unorder_map.clear however cppreference says both are linear, so what is the real complexity.↵

- [157206280](https://codeforces.com/contest/1679/submission/157206280) map.clear AC ↵
- [157206382](https://codeforces.com/contest/1679/submission/157206382) unordered.clear TLE↵

UPD1: I have proved that isn't related with collision because I haven tested initiating a new one instead of cleaning and it passes.  [AC](https://codeforces.com/contest/1679/submission/157228654)↵

 

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Snow 2022-05-14 19:25:17 202
en1 Английский Snow 2022-05-14 16:03:37 570 Initial revision (published)