Same Code giving TLE but also AC for other users

Describe your issue

Please see submissions
https://www.codechef.com/viewsolution/1093151736
and
https://www.codechef.com/viewsolution/1093325448

They are the exact same code (I have copied it to submit after contest) but one gives TLE and other is AC.
Please explain :smiley:

Screenshot

Additional info

Unordered map has a high constant for some cases, so it works some of the times. But the intended solution did not require it.

1 Like

Thanks. Replacing map with vector works.