Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[소병희] - 항체 인식, 토마토, 우체국, 문자열 게임 2 #222

Merged
merged 6 commits into from
Mar 18, 2024

Conversation

bngsh
Copy link
Contributor

@bngsh bngsh commented Mar 16, 2024

📌 from issue #220 📌

📋문제 목록📋

항체 인식: ✅
토마토: ✅
우체국: ⛔️
문자열 게임 2: ✅

📍추가로 해결한 문제📍

@bngsh bngsh added the 병희 label Mar 16, 2024
@bngsh bngsh self-assigned this Mar 16, 2024
Copy link
Member

@soopeach soopeach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨서용!!

}

if (maxDist == 0) sb.appendLine(-1)
else sb.appendLine("$minDist $maxDist")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

appendLine 배워갑니다!

Comment on lines +26 to +30
if (abs(total - a - people * 2) < diff) {
diff = abs(total - a - people * 2)
answer = x
people += a
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

힌트 안보시고 직접 생각해서 푸신게... 천재같습니다 진짜로

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

인죵 천재!


box[nr][nc] = box[r][c] + 1
q.add(intArrayOf(nr, nc))
unripe--
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

익은 개수를 탐색 마다 확인해주어 별도의 완탐을 줄인 것이 좋습니다!!

unripe--
}

days = box[r][c]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기서 바로 days를 업데이트해주는 것이 효율적이겠네요!

Comment on lines +26 to +30
if (abs(total - a - people * 2) < diff) {
diff = abs(total - a - people * 2)
answer = x
people += a
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

인죵 천재!

Comment on lines +12 to +14
readLine().forEachIndexed { i, c ->
letter[c - 'a'].add(i)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c - 'a' 👍👍

}
}

while(q.isNotEmpty()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bfs 안에서 days 나 unripe 을 처리해주는 게 좋았어요! 👍👍

@bngsh bngsh merged commit dcfc949 into main Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants