Https://ide.codingblocks.com/s/259274

showing TLE in last two cases

Hi Navpreet. Please use unordered_map because its runtime is O(1) that is constant time. You have used map which adds a logn factor due to its sorting nature and hence your overall time complexity becomes O(nlogn) and it will only pass when time complexity is O(n).

https://ide.codingblocks.com/s/259330...still showinh TLE in last case only but ,this tym

Please provide a proper link. This link seems to be broken.

I also think that u should reduce long long int to long int because hashing long long int may take more time than hashing long int. After this it might work.