problem link:https://codeforces.net/contest/1352/problem/E
sol link with vctor :https://codeforces.net/contest/1352/submission/214450956
sol link with map :https://codeforces.net/contest/1352/submission/214450292
your valuable opinion will surely help others who's are like me. and if does not make any sense than please comment section is available, i will delete it.