Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/22981
🧭 풀이 시간
30분
👀 체감 난이도
✏️ 문제 설명
사람은 N, 일은 K개, 사람당 작업속도 v가 주어질 때 사람을 두 팀으로 나누어 K개의 일을 하는데 걸리는 최소시간
팀의 작업속도는 팀 내 가장 작업속도가 느린 사람 x 팀원 수로 계산됨.
🔍 풀이 방법
작업속도를 정렬 후 작업 속도가 가장 느린 사람은 두 팀중 어느 하나에 속하게 되고 이때 이 팀의 작업 속도는 이 사람의 작업 속도에 종속됨. 따라서 다른 팀의 하한을 바꿔가면서 최댓값을 찾음.
⏳ 회고
값이 크다면 그냥 모든 변수를 long으로 바꾸는게 나을지도....
int x int의 오버플로우를 고려하지 못했음.