Exist or not problem in hashing challenges

#include
#include
using namespace std;
int xyz(map<int,bool> m){
int q;
cin>>q;
while(q–)
{
int n;
cin>>n;
if(m.find(n)==m.end())
cout<<“No”<<endl;
else
cout<<“Yes”<<endl;

	}

}
int main() {
int t;
cin>>t;
while(t–)
{
map<int,bool> m;
int l;
cin>>l;
int ar[l];
for(int i=0;i<l;i++)
{
cin>>ar[i];
m[ar[i]]=true;
}
xyz(m);
}
return 0;
}

@meg.2198 your both while loop is wrong you should write like while(q- -)

I have written that only sir.2 test cases got passed.one test case shows time limit exceeded.

@meg.2198 i have corrected your code next time please save your code on ide.you can refer this this.