diff --git a/froglike6/README.md b/froglike6/README.md index 11d89bd..0470a70 100644 --- a/froglike6/README.md +++ b/froglike6/README.md @@ -21,4 +21,5 @@ | 17차시 | 2025.05.22 | 기하학 | [아맞다우산](https://www.acmicpc.net/problem/17244)|https://github.com/AlgoLeadMe/AlgoLeadMe-13/pull/66| | 18차시 | 2025.07.03 | 자릿수를 이용한 다이나믹 프로그래밍 | [합 찾기](https://www.acmicpc.net/problem/7786)|https://github.com/AlgoLeadMe/AlgoLeadMe-13/pull/69| | 19차시 | 2025.07.04 | 애드 혹 | [서로소 그래프 게임](https://www.acmicpc.net/problem/34035)|https://github.com/AlgoLeadMe/AlgoLeadMe-13/pull/72| + | 20차시 | 2025.07.09 | 조합론 | [암호 만들기](https://www.acmicpc.net/problem/1759)|https://github.com/AlgoLeadMe/AlgoLeadMe-13/pull/77| --- diff --git a/froglike6/combinatorics/1759.py b/froglike6/combinatorics/1759.py new file mode 100644 index 0000000..28031d4 --- /dev/null +++ b/froglike6/combinatorics/1759.py @@ -0,0 +1,12 @@ +from itertools import combinations +import sys +input = sys.stdin.readline + +L, C = map(int, input().split()) +letters = sorted(input().split()) +vowels = {'a', 'e', 'i', 'o', 'u'} + +for combo in combinations(letters, L): + v_cnt = sum(ch in vowels for ch in combo) + if v_cnt >= 1 and L - v_cnt >= 2: + print(''.join(combo)) \ No newline at end of file