Check Subset

  • + 0 comments
    t = int(input()) #number of testcases
    for i in range(t):
        a, set_a = int(input()), set(map(int, input().split()))
        b, set_b = int(input()), set(map(int, input().split()))  
        if set_a.intersection(set_b) == set_a:
            print(True)
        else:
            print(False)