rinku11's blog

By rinku11, history, 3 years ago, In English

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.

  • Vote: I like it
  • -10
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
  Vote: I like it +8 Vote: I do not like it

first learn how to ask questions in blogs

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by rinku11 (previous revision, new revision, compare).

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

unordered_map is implemented using hash table because of hash collision it can take O(n) time in some cases