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
+ 0 comments t = int(input()) #number of testcases for i in range(t): a, set_a = int(input()), set(map(int, input().split())) b, set_b = int(input()), set(map(int, input().split())) if set_a.intersection(set_b) == set_a: print(True) else: print(False)
+ 0 comments for _ in range(int(input())): _, a = input(), set(map(int, input().split())) _, b = input(), set(map(int, input().split())) if a - b: print("False") else: print("True")
+ 0 comments T = int(input()) for i in range(T): n = input().split() A = set(map(int, input().split())) N = input().split() B = set(map(int, input().split())) if A.intersection(B) == A: print('True') else: print('False')
+ 0 comments n_T = int(input()) for i in range (0,n_T): c_A = int(input()) set_A = set(input().split()) c_B = int(input()) set_B = set(input().split()) if (set_A == set_A & set_B): print("True") else: print("False")
+ 0 comments n=int(input()) while(n>0): n1=int(input()) set1=set(map(int,input().split())) n2=int(input()) set2=set(map(int,input().split())) c=0 for i in set1 : if i in set2: c=c+1 if c==len(set1): print("True") else: print("False") n=n-1
Load more conversations
Sort 819 Discussions, By:
Please Login in order to post a comment