Problem D in Codeforces 847 div3 contest

Revision en1, by J_san, 2023-01-29 23:12:29

problem:D Most of the time i use UNORDERED MAP because it takes O(1) time, but while solving this problems, it is actually giving TLE, while on the other hand if you use ORDERED MAP which takes O(logn) time, is getting accepted.I don't know why? Can anyone please explain the reason and also how to decide in advance which to use?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English J_san 2023-01-29 23:12:29 421 Initial revision (published)