-
https://www.acmicpc.net/problem/3040
3040번: 백설 공주와 일곱 난쟁이
매일 매일 일곱 난쟁이는 광산으로 일을 하러 간다. 난쟁이가 일을 하는 동안 백설공주는 그들을 위해 저녁 식사를 준비한다. 백설공주는 의자 일곱개, 접시 일곱개, 나이프 일곱개를 준비한다.
www.acmicpc.net
https://github.com/JUNGSOONIL/JAVA/blob/main/BAEKJOON%203040
GitHub - JUNGSOONIL/JAVA: JAVA 소스 코드
JAVA 소스 코드. Contribute to JUNGSOONIL/JAVA development by creating an account on GitHub.
github.com
https://github.com/JUNGSOONIL/JAVA/commit/053e99fd911f9e0166c640a149e93850df8bbe52
Create BAEKJOON 3040_NP · JUNGSOONIL/JAVA@053e99f
Permalink This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. Browse files Create BAEKJOON 3040_NP Loading branch information Showing 1 changed file with 58 additions and 0 deletions. +58 −0 B
github.com
해당 문제는 조합을 사용해서 쉽게 해결하였고,
하나는 재귀를 이용해서 풀었고, 하나는 next_permutation을 사용해서 풀었다.
728x90'알고리즘 > Baekjoon' 카테고리의 다른 글
Baekjoon 15686 치킨 배달 JAVA (0) 2021.11.06 Baekjoon 11723 집합 JAVA (0) 2021.11.06 Baekjoon 16926 배열 돌리기 1 JAVA (0) 2021.11.06 Baekjoon 2563 색종이 JAVA (0) 2021.11.06 Baekjoon 1158 요세푸스 문제 JAVA (0) 2021.11.06 댓글