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.
- Prepare
- Python
- Sets
- Check Strict Superset
- Discussions
Check Strict Superset
Check Strict Superset
Sort by
recency
|
1106 Discussions
|
Please Login in order to post a comment
A_set=set(map(int, input().split())) n=int(input()) flag=True for i in range(n): B=set(map(int, input().split())) if not A_set.issuperset(B): flag=False continue print(flag)
time complexity n2
sett = set(map(int, (input().split()))) n = int(input()) check = True for _ in range(n): subset = set(map(int, (input().split()))) for j in subset: if j not in sett: check = False break print(check)