What's wrong in my solution please check

programming
Tags: #<Tag:0x00007f24274debb0>

#1

int n = A.size();
vector v1;
int con = 0;
for(int i = 0;i <= n - B; i++){
for(int j = i;j<B + i;j++){
unordered_map<int,bool> m1;
if(m1.count(A[j]) > 0){
continue;
}else{
m1[A[j]] = true;
con++;
}
}
v1.push_back(con);
con = 0;
}

return v1;