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 set_a = set(map(int, input().split())) n = int(input()) set_n = set() for i in range(n): set_n.update(list(map(int, input().split()))) print(set_a.issuperset(set_n))
+ 0 comments s1 = set(map(int,input().split())) n = int(input()) s2 = set(map(int,input().split())) if s1.issuperset(s2): print(False) else: print(True)
can anybody tell wher the problem is?
+ 0 comments def main(): A = set(map(int, input().split())) s = set() n = int(input()) for _ in range(n): B = set(map(int, input().split())) s.update(B) is_super_set = True for i in s: if i not in A: is_super_set = False print(is_super_set) if __name__ == "__main__": main()
+ 0 comments if __name__ == '__main__': a = set(map(int, input().split(" "))) isit = True for _ in range(int(input())): other = set(map(int, input().split(" "))) if not a.issuperset(other): isit = False break print(isit)
+ 0 comments A=set(map(int,input().split())) n=int(input())
for _ in range(n): b=set(map(int,input().split())) if b.difference(A): print(False) break else: if A==A.intersection(b): print(False) break else: print(True)
Load more conversations
Sort 900 Discussions, By:
Please Login in order to post a comment