[20251021] BOJ / G4 / 주사위 굴리기 / 이준희 #1182
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧷 문제 링크
https://www.acmicpc.net/problem/14499
🧭 풀이 시간
40분
👀 체감 난이도
✏️ 문제 설명
N*M 지도에서 주사위를 굴리면서 아래의 규칙을 따릅니다.
이 때 각 돌리기 마다 주사위의 상단에 쓰여진 숫자를 출력하는 문제입니다.
단, 지도를 벗어나는 돌리기 요청의 경우에는 그냥 무시됩니다.
🔍 풀이 방법
빡구현 문제였습니다.
주사위는 상 하 동 서 북 남 순의 6자리 1차원 배열을 사용하여 유지하였고
동 서 북 남 으로 주사위를 굴리는 경우의 메소드를 구현했습니다.
⏳ 회고
처음에 주사위에서 바닥칸으로 복사할 때 주사위 칸을 0으로 만들어서 틀렸었는데 문제를 다시 읽고 고쳤습니다.