abhinavawasthi's blog

By abhinavawasthi, history, 2 years ago, In English

Yesterday, I have participated in codeforces round 773.

Was able to solve the first three questions during the contest, but my B and C submission got TLE on System Cases, do you know why? Just because I have used unordered_map instead of map.

I think, this is practical example to examine the diff btw unordered_map and map.

The same code with the same logic gives TLE, when using UMAP but got accepted, when using MAP.

1642B - Power Walking Submission with UMAP: submission:147440230

1642C - Great Sequence Submission with UMAP: submission:147426920

1642B - Power Walking Submission with MAP: submission:147497381

1642C - Great Sequence Submission with MAP: submission:147497320

One of my codeforces friends also told me about this, with a very good resource attached, you can check it.

Any suggestions are welcomed!

Full text and comments »

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