-
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 #221
Conversation
|
||
} | ||
|
||
val mid = if (totalPeopleCnt % 2 == 0L) totalPeopleCnt / 2 else totalPeopleCnt / 2 + 1 |
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.
이...홀수일 때 1 더하는 걸 알았더라면 식이 좀 더 짧아졌을텐데..
|
||
dfs(curNumForOrigin, curNumForExpected, Position(i, j), origin, visited) | ||
|
||
if (origin.flatten() == expected.flatten()) println("YES") |
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도 한 조직만 돌면 되고
|
||
} | ||
|
||
val mid = if (totalPeopleCnt % 2 == 0L) totalPeopleCnt / 2 else totalPeopleCnt / 2 + 1 |
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.
오 아예 mid를 만들어서 처리할 수 있군요!! 👍
if (targetNum != curNum) return | ||
|
||
visited[targetPos.x][targetPos.y] = true | ||
target[targetPos.x][targetPos.y] = expectNumber |
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.
확실히 기존 배열을 업데이트 시키는 로직이 더 깔끔하네요!🙂
📌 from issue #220 📌
📋문제 목록📋
📍추가로 해결한 문제📍
📝메모
공유하고 싶은 정보, 새롭게 알게된 것, 문제를 풀면서 발생한 에로사항 등...자유롭게!