Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/3190
🧭 풀이 시간
50분
👀 체감 난이도
✏️ 문제 설명
snake game 의 시뮬레이션을 구현하여 게임이 끝나는 시간을 구하는 문제입니다.
🔍 풀이 방법
구현으로 풀었습니다.
뱀의 몸은 큐를 활용하여 유지하고
시간 마다 방향배열에 따라서 뱀을 이동시켰습니다.
사과가 있어서 사과를 먹는 경우에는 뱀의 몸통이 추가되는 식으로 구현하였습니다.
⏳ 회고
구현 문제의 경우에 분기점을 파악하고 이를 구현하는 방식을 선택하는 것이 중요한 것 같습니다.
이 문제에서도 뱀의 몸통을 어떤식으로 유지관리 해야할지 고민하는 시간이 길었습니다.