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 #221

Merged
merged 5 commits into from
Mar 18, 2024

Conversation

soopeach
Copy link
Member

📌 from issue #220 📌

📋문제 목록📋

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

📍추가로 해결한 문제📍

추천: 👍  
비추천: 👎  
문제에 대한 간단한 코멘트를 남겨주셔도 좋을 것 같아요!

📝메모

공유하고 싶은 정보, 새롭게 알게된 것, 문제를 풀면서 발생한 에로사항 등...자유롭게!



}

val mid = if (totalPeopleCnt % 2 == 0L) totalPeopleCnt / 2 else totalPeopleCnt / 2 + 1
Copy link
Contributor

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")
Copy link
Contributor

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
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

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

확실히 기존 배열을 업데이트 시키는 로직이 더 깔끔하네요!🙂

@soopeach soopeach merged commit 28b8650 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