Check Subset

Sort by

recency

|

904 Discussions

|

  • + 0 comments
    t = int(input())
    
    for i in range(t):
        nA = input()
        setA = set(input().split())
    
        nB = input()
        setB = set(input().split())
        
        print(setA.issubset(setB))
    
  • + 0 comments

    Here's my code:

    for _ in range(int(input())):
        al = int(input())
        a = set(list(map(int, input().split()))[:al])
        bl = int(input())
        b = set(list(map(int, input().split()))[:bl])
        print(a.issubset(b))
    
  • + 0 comments
    print(b_set.intersection(a_set)==a_set)
    
  • + 0 comments

    T = int(input()) for i in range(T): A = int(input()) A_el = set(map(int, input().split())) B = int(input()) B_el = set(map(int, input().split())) print(A_el.difference(B_el) == set())

  • + 0 comments

    t = int(input()) for i in range(t): ai = int(input()) a = set(map(int, input().split())) bi = int(input()) b = set(map(int, input().split())) if a.issubset(b):print("True") else:print("False")