Check Strict Superset

  • + 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()