I used ***unordered\_map<long long int, long long int>*** ***the key may take values of upto 1e9***, this lead to my answer being Time Limit Exceeded.

when I used map<long long int, long long int> it was succesful.

I came to know from other answers that ***unordered\_map is bad when hash function is bad , is there a way to change the hash function of this unordered\_map*?**