-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
There was a problem hiding this 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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appendLine 배워갑니다!
if (abs(total - a - people * 2) < diff) { | ||
diff = abs(total - a - people * 2) | ||
answer = x | ||
people += a | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
힌트 안보시고 직접 생각해서 푸신게... 천재같습니다 진짜로
There was a problem hiding this comment.
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-- |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기서 바로 days를 업데이트해주는 것이 효율적이겠네요!
if (abs(total - a - people * 2) < diff) { | ||
diff = abs(total - a - people * 2) | ||
answer = x | ||
people += a | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
인죵 천재!
readLine().forEachIndexed { i, c -> | ||
letter[c - 'a'].add(i) | ||
} |
There was a problem hiding this comment.
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()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bfs 안에서 days 나 unripe 을 처리해주는 게 좋았어요! 👍👍
📌 from issue #220 📌
📋문제 목록📋
📍추가로 해결한 문제📍