Check Strict Superset

Sort by

recency

|

1166 Discussions

|

  • + 0 comments
    A = set(map(int,input().split()))
    print(all(A.issuperset(B:=set(map(int,input().split()))) and A!=B for _ in range(int(input()))))
    
  • + 0 comments
    A,n=set(map(int,input().split())),int(input())
    subset_list=[ set(map(int,input().split())) for i in range(n)]
    D=set()
    chk_flag=True
    for B in subset_list:
        if A.intersection(B)==B and A-B!=D:
            continue
        else:
            chk_flag=False
            break
    
    print(chk_flag)``
    
  • + 0 comments

    A= set(map(int, input().split())) N= int(input())

    is_superset = all(A > set(map(int,input().split())) for _ in range(N))

    print(is_superset)

  • + 0 comments

    Master_set = set(map(int,input().split())) N = int(input()) count = 0 for i in range(N): other_set = set(map(int,input().split())) if Master_set >= other_set: count += 1 if count == N: print("True") else: print("False")

  • + 0 comments
    A= set(map(int, input().split()))
    N= int(input())
    
    sets_superset = []
    
    for i in range(N):
        sets= set(map(int, input().split()))
        if len(sets.difference(A)) == 0:
            sets_superset.append(True)
        else:
            sets_superset.append(False)
    
    print(all(sets_superset))