[20260309] BOJ / G4 / 작업 / 이준희#2007
Merged
ShinHeeEul merged 1 commit intomainfrom Mar 9, 2026
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.
🧷 문제 링크
https://www.acmicpc.net/problem/2056
🧭 풀이 시간
40분
👀 체감 난이도
✏️ 문제 설명
작업의 갯수, 각 작업이 걸리는 시간 및 선행 작업들이 주어졌을 때
모든 작업이 끝날 수 있는 최소 시간을 구하는 문제입니다.
🔍 풀이 방법
처음 봤을 때는 위상정렬 후 계산하는 문제인 줄 알았으나
이미 입력받는대로 위상정렬이 자동으로 되어 있어서 dp를 이용해서 작업 시간을 계산했습니다.
작업 갯수만큼 dp 배열을 정의한 후
각 작업의 작업이 끝나는 시간을 계산하는 데 이 때 선행 작업 중 가장 늦게 끝나는 시간 + 현재 작업에 걸리는 시간으로 계산했습니다.
⏳ 회고
문제를 잘 읽는 것으로 위상정렬을 하지 않고 쉽게 풀 수 있었던 것 같습니다.