My issue
i think there is an mistake in test case 3 the correct output is some but you gave all
My code
# cook your dish here
for _ in range(int(input())):
n,k = map(int,input().split())
my = dict()
lists = []
for i in range(n):
a = list(set(map(int,input().split())))
lists.append(a)
for j in a:
if j in my:
my[j] += 1
else:
my[j] = 1
if len(my) < k:
print('sad')
continue
for i in lists:
for j in i:
if my[j] == 1:
break
else:
print('some')
break
else:
print('all')
Problem Link: Dish Of Life Practice Coding Problem