WA in Codechef (easy) DISHLIFE problem

I am solving Codechef (Easy) : DISHLIFE problem (DISHLIFE Problem - CodeChef ).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;
	}
}	

Your code fails here-

Input
1
4 4
1 1
1 2
1 3
4 1 2 3 4
Your Output
all
Expected Output
some

One of the good approaches to differentiate between some and all is, to first see what ingredients you can get by visiting all islands. Then, for every island i, remove the ingridients of that island and check if dish can still be formed or not. If you come across even one redundant island, output “some”.