Can anyone help me with debbugging my code for https://www.spoj.com/problems/AKBAR/

the code is not showing any outputs

bool flg = true;

void bfs(ll node, ll dis, vl adj, vl& vis){
vis[node]+=1;
// visited[node] = true;
if(vis[node]>1) {
flg = false;
return;
}
dis++;
queue q;
q.push(node);
while(!q.empty()){
ll x = q.front();
q.pop();
while(dis–){
for(auto it: adj){
vis[it]+=1;
q.push(it);
}
// dbg
}
}
}
signed main(){
fast;
int t;
cin>>t;
while(t–){
ll n, r, m;
cin>>n>>r>>m;
vl adj[n+1];
vl vis(n+1);
vl str[n+1];
for(int i=0;i<n;i++){
vis[i]=0;
}
rep1(i, 0, r){
ll a, b;
cin>>a>>b;
adj[a].pb(b);
adj[b].pb(a);
}
rep1(i,0, m){
ll a, b;
cin>>a>>b;
str[a].pb(b);
str[b].pb(a);
// dbg
}
for(auto& it: str){
ll city = it[0];
ll power = it[1];
bfs(city, power, adj, vis);
if(!flg) {
cout<<“No\n”;
break;
}
}
if(flg){
rep1(i, 0 ,n){
if(vis[i] == 0) cout<<“No\n”;
}
}
else{
cout<<“Yes\n”;
}
}
return 0;

}
this is the code