You are viewing a single comment's thread. Return to all comments →
A = set(map(int, input().split()))
n = int(input())
is_strict_superset = True
for _ in range(n): other_set = set(map(int, input().split()))
# Check if A is a strict superset of other_set if not (A > other_set): # ">" checks for strict superset is_strict_superset = False break
print(is_strict_superset)
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 →
Read the main set A
A = set(map(int, input().split()))
Read number of other sets
n = int(input())
Assume A is a strict superset of all sets until proven otherwise
is_strict_superset = True
for _ in range(n): other_set = set(map(int, input().split()))
Print the final result
print(is_strict_superset)