Check Subset

  • + 0 comments
    for _ in range(int(input())):
        input(); a = set(map(int, input().split()))
        input(); b = set(map(int, input().split()))
        print(a.issubset(b))
    

    a slightly more compact code