Why I am getting TLE can anyone help me?

Revision en1, by Aman_Khanna, 2022-02-23 18:45:03

Hello everyone, Today in codeforces round 773 I had submitted question B solution LINK-:https://codeforces.com/contest/1642/submission/147484347, I am getting TLE on test case 6 instead of using unordered_set but after that when I submit my code using set only then it get accepted LINK-:https://codeforces.com/contest/1642/submission/147488911 Can anyone tell why this happen?? In my knowledge unordered_set time complexity is less than set so that why I used unordered_set.. Correct me if I have some wrong information please.. It also happens with unordered_map and map also..

Tags need help, unordered_set, set, map vs unordered_map

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Aman_Khanna 2022-02-23 18:45:03 625 Initial revision (published)