[20250817] BOJ / G5 / 중력 큐 / 이강현 #680
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/28078
🧭 풀이 시간
10분
👀 체감 난이도
✏️ 문제 설명
큐가 있음.
큐에는 공과 가림막을 넣을 수 있음.
넣을때는 무조건 뒤에서부터 넣음.
근데 큐를 회전시킬 수 있음. 시계방향 반시계방향으로 90도씩
큐의 상태가 세로인 경우에 공들은 중력의 영향을 받아 아래로 떨어지게됨.
가림막은 중력의 영향을 안 받음.
이때, 다양한 명령에 대해 시뮬레이션 하면 됨.
🔍 풀이 방법
덱, 조건 분기 설정
걍 하라는대로 하면 됨.
큐 상태가 어떤 상태인지 보고 공들이 흘러내리는 것만 잘 생각
⏳ 회고
ez