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
+ 0 comments seta=set(map(int,input().split())) n=int(input()) setb=set(map(int,input().split())) setc=set(map(int,input().split())) setd=setb.union(setc) print(seta.issuperset(setd)) my solution
+ 0 comments A = set(map(int, input().split(' '))) n = int(input()) isSuperset = True for _ in range(0, n): nth_set = set(map(int, input().split())) if not A.issuperset(nth_set): isSuperset = False break print(str(isSuperset))
+ 1 comment I am failing in Test case 2 & 4: Can you guide me on what I'm missing or doing wrong?
set_A = set(input().split()) N = int(input()) bool_cnt = 0 for i in range(N): set_B = set(input().split()) if set_A>set_B: bool_cnt += 1 print(bool_cnt>N)
+ 0 comments setAlfa = set(map(int, input().split())) numSets = int(input()) set0 = set() while numSets > 0: setA = set(map(int, input().split())) set0 = set0.union(setA) numSets -= 1 if setAlfa.issuperset(set0): print(True) else: print(False)
+ 0 comments It always surprises me how compact a code Python allows
readint = lambda : int(input()) readset = lambda : set(input().split()) A = readset() n = readint() print(all(A > readset() for _ in range(n)))
Load more conversations
Sort 971 Discussions, By:
Please Login in order to post a comment