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/12795
🧭 풀이 시간
45분
👀 체감 난이도
✏️ 문제 설명
직선
y = ax + b를 좌표평면에 추가하면, 해당 직선으로 인해 나누어지는 두 반평면 중 (0, -INF)를 포함하는 반평면을 먹을 수 있다.직선을 추가하는 작업과, 특정 x좌표에서의 먹은 영역 중 y좌표 최댓값을 구하는 작업이 총 Q회 주어지면 작업을 처리해보자.
🔍 풀이 방법
직선 관리를 효율적으로 하기 위해, 볼록 껍질을 이용한 최적화를 적용
구간 [-1e12, 1e12]에 대해 Li-Chao 트리로 특정 구간에서 최대가 되는 직선들을 관리한다.
⏳ 회고
오랜만에 해서 가물가물하다