[20250701] BOJ / G4 / 수 나누기 게임 / 이강현 #403
Merged
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.
🧷 문제 링크
https://www.acmicpc.net/problem/27172
🧭 풀이 시간
30분
👀 체감 난이도
✏️ 문제 설명
N명의 플레이어가 서로 다른 카드를 뽑고 그 카드로 1:1 대결을 함.
대결은 서로 나누었을 때, 상대를 나머지 없이 나눌 수 있으면 +1을 얻고 나누어진 상대는 -1의 점수를 가짐. 서로 나눌 수 없다면 점수 변화 x
모두 서로 한번씩 대결은 마쳤을 때, 모든 플레이어의 최종 점수를 출력.
🔍 풀이 방법
에라토스테네스의 체
⏳ 회고
N이 100000이라서 이분탐색을 생각했지만 가능은 하나, 이 방법이 더 효율적.