practivceAlgorithm/백준

[백준][Python] 2776 암기왕

findTheValue 2021. 10. 21. 05:52

set을 사용한 checking

 

import sys
input = sys.stdin.readline


for test in range(int(input())):
    N = int(input())
    arr1 = set(input().split())
    M = int(input())
    for num in input().split():
        print(1 if num in arr1 else 0)