-
카테고리
-
세부 분야
알고리즘 · 자료구조
-
해결 여부
미해결
문제해결 차이
20.09.12 18:50 작성 조회수 99
0
안녕하세요. 유익한 강의 잘 듣고있습니다.
collections 의 Counter로 해결하는 방법과 효율성 차이가 있을까요?
import sys
sys.stdin = open('input.txt', 'rt')
from collections import Counter
word1 = input()
word2 = input()
res = Counter(word1)-Counter(word2)
if len(res) == 0:
print('YES')
else:
print('NO')
답변을 작성해보세요.
1
0
답변 2