My code got accepted when I use map<> but, I got tle when I use unordered_map<>.why ??

Revision en2, by rinku11, 2022-02-24 10:50:30

Here I'm doing searching work only.unordered_map<>takes O(1) for searching and map<>takes O(long) for searching so I didn't get that why I'm getting tle. Here is my code link -:

https://mirror.codeforces.com/contest/1642/submission/147498144

Above is my tle code.

Tags implementations, brute force

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English rinku11 2022-02-24 10:50:30 1581
en1 English rinku11 2022-02-24 10:43:31 1771 Initial revision (published)