We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
setA = set(input().split())
n = int(input())
for _ in range(n):
subset = set(input().split())
if subset.issubset(setA) == False or (subset.issubset(setA) == True and len(subset) == len(setA)) :
print(False)
break
else: print(True)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Check Strict Superset
You are viewing a single comment's thread. Return to all comments →
setA = set(input().split()) n = int(input()) for _ in range(n): subset = set(input().split()) if subset.issubset(setA) == False or (subset.issubset(setA) == True and len(subset) == len(setA)) : print(False) break else: print(True)