Repository navigation
[W10] 김대원 주간 풀이 - #64
Open
dae-won-kim wants to merge 4 commits into
Open
dae-won-kim wants to merge 4 commits into
dae-won-kim wants to merge 4 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
💡 핵심 접근
250137 붕대 감기: 공격 목록을 큐에 넣고 1초씩 시간을 진행했습니다. 공격이 없는 초에는
x를 회복하고 연속 성공을 세어t에 도달하면y를 더 회복했습니다. 공격을 받으면 연속 성공을 0으로 초기화하고, 체력은 최대 체력을 넘지 않게 했으며 0 이하가 되면-1을 반환합니다.250136 석유 시추: 열 단위로 돌면서 아직 방문하지 않은 석유 칸에서 BFS를 시작해 덩어리 크기를 구하고, 덩어리가 걸친 열(
usedCol)마다 크기를 한 번씩 더했습니다. 덩어리마다 BFS를 한 번만 하므로 시추 위치마다 BFS를 다시 할 필요가 없습니다.250135 아날로그 시계: 바늘 위치를 12시간 = 43200 단위의 정수 각도로 나타냈습니다(초침
t*720, 분침t*12, 시침t). 1초 구간[t, t+1]마다 초침이 분침/시침을 따라잡거나 겹치는지 판단했고, 초침이 0으로 돌아가는 경우는 43200으로 보정했습니다. 세 바늘이 동시에 겹치는 12:00:00은 한 번만 세도록 뺐습니다.250134 수레 움직이기: 빨간/파란 수레의 위치와 각자의 방문 배열을 상태로 두는 BFS로 풀었습니다. 도착한 수레는 그대로 두고, 같은 칸으로 이동하거나 서로 자리를 바꾸는 경우는 제외했습니다.
한글 주석이 GitHub에서 깨지지 않도록 풀이 파일 인코딩을 CP949 → UTF-8로 변경했습니다(코드 변경 없음).
🔍 리뷰 요청
State에 방문 배열 두 개를 통째로 복사해서 넣고 있어 상태마다 복사 비용이 큽니다. 맵이 최대 4x4라 통과는 했지만, 비트마스크나 DFS 백트래킹으로 바꾸는 게 나을지 의견 부탁드립니다.secondCur < minuteCur && secondNext >= minuteNext)과 12:00:00 예외 처리가 경계 상황(시작 시각이 이미 겹친 경우, 0시/12시)에서 모두 맞는지 봐주시면 감사하겠습니다.🤖 Generated with Claude Code