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 Subset
- Discussions
Check Subset
Check Subset
Sort by
recency
|
921 Discussions
|
Please Login in order to post a comment
n = int(input()) for i in range(n): n1 = int(input()) a = set(map(int,input().split())) n2 = int(input()) b = set(map(int,input().split())) c = a.intersection(b) if a == c: print('True') else: print('False')
t=int(input()) for _ in range(t): n=int(input()) set_a=set(map(int,input().split())) m=int(input()) set_b=set(map(int,input().split())) print(set_a.issubset(set_b))
n = int(input())
for i in range(n):
a slightly more compact code