백준 14500_테트로미노(삼성 SW역량 테스트 기출문제) #263
youbeen2798
started this conversation in
1일 1알고리즘
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
문제 링크 : https://www.acmicpc.net/problem/14500
문제 난이도 : 골5
풀이 : 완전 탐색 기반 DFS 사용
<풀이 과정>
문제가 정의한 테트로미노의 모양(하나 제외)들은 한 점에서 DFS를 통해 depth 4까지 탐색하는 모든 경로와 같음
한가지 예외: ㅗ,ㅓ,ㅏ,ㅜ의 모양은 배열의 각 원소마다 직접 더하는 방법밖에 없음( ㅗ,ㅓ,ㅏ,ㅜ의 모양은 depth가 4가 아닌 3이기 때문)
Beta Was this translation helpful? Give feedback.
All reactions