In this problem i found this issue for map time complexity is higher than vector,
problem link:https://mirror.codeforces.com/contest/1352/problem/E
sol link with vctor :https://mirror.codeforces.com/contest/1352/submission/214450956
sol link with map :https://mirror.codeforces.com/contest/1352/submission/214450292
your valuable opinion will surely help others who's are like me.