https://www.acmicpc.net/problem/2776
import sys
input = sys.stdin.readline
T = int(input())
for _ in range(T):
N = int(input())
num1 = set(map(int, input().split()))
M = int(input())
num2 = list(map(int, input().split()))
for num in num2:
if num in num1:
print(1)
else:
print(0)
'Algorithm > Python' 카테고리의 다른 글
[Algorithm|Python] 백준 1260번 / 99클럽 코테 스터디 6일차 TIL (0) | 2025.01.21 |
---|---|
[Algorithm|Python] 백준 2470번 / 99클럽 코테 스터디 5일차 TIL (0) | 2025.01.18 |
[Algorithm|Python] 백준 2343번 / 99클럽 코테 스터디 4일차 TIL (0) | 2025.01.17 |
[Algorithm|Python] 백준 11663번 / 99클럽 코테 스터디 3일차 TIL (0) | 2025.01.16 |
[Algorithm|Python] 백준 1654번 / 99클럽 코테 스터디 2일차 TIL (0) | 2025.01.15 |