> 💡문제접근
❌ 이중 for문을 통한 완전탐색(시간초과)
❌ 오름차순 후 완전탐색(시간초과)
🙆♂️ Set
🙆♂️ dictionary
> 🍕코드
1. Set
import sys
input = sys.stdin.readline
M = int(input())
card = set(list(map(int,input().split())))
N = int(input())
card2 = list(map(int, input().split()))
for i in card2:
if i in card:
print(1, end = ' ')
else:
print(0, end = ' ')
2. Dictionary
import sys
input = sys.stdin.readline
M = int(input())
card = list(map(int,input().split()))
N = int(input())
card2 = list(map(int, input().split()))
_dict = {}
for i in range(len(card)):
_dict[card[i]] = 0
for j in range(N):
if card2[j] in _dict:
print(1, end = ' ')
else:
print(0, end = ' ')