Check Strict Superset

  • + 0 comments

    time complexity n2

    sett = set(map(int, (input().split()))) n = int(input()) check = True for _ in range(n): subset = set(map(int, (input().split()))) for j in subset: if j not in sett: check = False break print(check)