I am solving Codechef (Easy) : DISHLIFE problem (https://www.codechef.com/problems/DISHLIFE ).Why I am getting WA in few subtasks ? Here is my code :

```
#include <bits/stdc++.h>
using namespace std;
typedef long long int lint ;
int main(){
lint t;
cin>>t;
while(t--){
lint n,k,p,q;
cin>>n>>k;
set<lint> s;
vector<lint> v[n];
for(lint i=0;i<n;i++){
cin>>p;
while(p--){
cin>>q;
v[i].push_back(q);
}
}
lint all=0;
for(lint i=0;i<n;i++){
for(lint j=0;j<v[i].size();j++)
s.insert(v[i][j]);
if(s.size()==k)
all++;
}
if(all==0)
cout<<"sad"<<endl;
else if(all==1)
cout<<"all"<<endl;
else
cout<<"some"<<endl;
}
}
```