[20251209] BOJ / G5 / 누가 이길까 / 이종환 #1622
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/28449
🧭 풀이 시간
25분
👀 체감 난이도
✏️ 문제 설명
첫째 줄에 HI팀의 인원 수
$N$ , ARC팀의 인원 수
$M$ 이 공백으로 구분되어 정수로 주어진다.
$(1 \leq N, M \leq 100,000)$
둘째 줄에 HI팀의 참가자의 코딩실력을 나타내는 길이
$N$ 수열
$a$ 가 공백으로 구분되어 정수로 주어진다.
$(1 \leq a_i \leq 100,000)$
셋째 줄에 ARC팀의 참가자의 코딩실력을 나타내는 길이
$M$ 수열
$b$ 가 공백으로 구분되어 정수로 주어진다.
첫째 줄에 HI팀 참가자의 승리 횟수, ARC팀 참가자의 승리 횟수, 무승부 횟수를 공백으로 구분하여 출력한다.
🔍 풀이 방법
애초에 점수가 10만점이 최고이기에, 각 팀마다, 각 점수를 받은 사람이 몇명인지 기록 후, 누적합 방식으로 비교하며 계산하면 간단하게 해결할 수 있다.
⏳ 회고