[20251210] BOJ / P5 / Two Machines / 김민진#1635
Merged
ShinHeeEul merged 1 commit intomainfrom Dec 10, 2025
Merged
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.
🧷 문제 링크
Two Machines
🧭 풀이 시간
120분
👀 체감 난이도
✏️ 문제 설명
머신이 두 개 있고 N개의 작업이 있음
두 머신에서 각 작업을 수행하는 데 걸리는 시간이 주어짐
모든 작업을 전부 수행했을 때 최소 시간은?
🔍 풀이 방법
B 머신의 시간 구하는 건 여느 점화식처럼 구하면 되고
A 머신 시간은 인덱스 기준으로 구해야함
dp[N]에 N개의 작업을 모두 확인했을 때의 경우의 수들이 담겨있기 때문에 마지막에dp[N]확인하면서j와dp[N][j]값의 차이가 최소가 되는 시간을 구하면 됨jdp[N][j]중 큰 값이 정답⏳ 회고
A의 시간을 인덱스로 두는 건 또 신기한 방법이네..
베낭문제 같기도하고.. 1차원으로 줄일 수 있을 듯
dp 플레는 진짜 못풀겠다 골드로 단련 더 해야겟다............
산책이나 하러 가야지....................