비트마스킹
[백준 1062번-파이썬/Python] 가르침
http://acmicpc.net/problem/1062 {코드} from itertools import combinations n, k = map(int, input().split()) if k < 5: print(0) else: k -= 5 nece_chars = {'a', 'n', 't', 'i', 'c'} input_chars = [] alpha = {ky: v for v, ky in enumerate( (set(map(chr, range(ord('a'), ord('z')+1))) - nece_chars))} cnt = 0 for _ in range(n): tmp = 0 for c in set(input())-nece_chars: tmp |= (1