[백준][Python] 숫자카드 10518번


[백준][Python] 숫자카드 10518번

#list의 시간복잡도는 O(n)이고 set의 시간복잡도는 O(1)이다. import sys input = sys.stdin.readline N = int(input()) exam1 = set(map(int,input().split())) M = int(sys.stdin.readline()) exam2 = list(map(int,input().split())) exam3 = [0 for i in range(M)] for i in range(M): if exam2[i] in exam1: exam3[i] = 1 print(*exam3) 10815번: 숫자 카드 10815번 제출 맞힌 사람 숏코딩 재채점 결과 채점 현황 강의 질문 게시판 숫자 카드 시간 제한 메모리 제한 제출 정답 맞힌 사람 정답 비율 2 초 256 MB 75178 34171 24520 44.503% 문제 숫자 카드는 정수 하나가 적혀져 있는 카드이다. 상근이는 숫자 카드 N개를 가지고 있다. 정수 M개가 주어졌을 때, ...



원문링크 : [백준][Python] 숫자카드 10518번