Can someone please tell me why I am getting TLE ...
Before somebody toxic comments, I will tell you that you should not use unordered_map, replace it with map. unordered_map is linear in the worst case, while map is logarithmic in the worst case, so it is better to use.
unordered_map
map
Before somebody toxic comments, I will tell you that you should not use
unordered_map
, replace it withmap
.unordered_map
is linear in the worst case, whilemap
is logarithmic in the worst case, so it is better to use.