Time limit in exist or not problem

Complexity of my code written for exist or not id O(n+q) still I am getting a TLE on test 2. Can you please help.
I am using unordered map.

Plz send your code by saving on ide

Yaa sure ma’am! https://ide.codingblocks.com/s/91446

Please help with this question! It’s been a long time

I have made some changes in your code, kindly try to submit it now