Check Subset

  • + 0 comments
    # Enter your code here. Read input from STDIN. Print output to STDOUT
    t = int(input())
    
    for i in range(t):
        a = int(input())
        A = set(map(int, input().split()))
        b = int(input())
        B = set(map(int, input().split()))
        
        for m in A:
            if (m not in B):
                print("False")
                break
        else:
            print("True")