[20250911] BOJ / G4 / 고층 건물 / 이강현 #867
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/1027
🧭 풀이 시간
25분
👀 체감 난이도
✏️ 문제 설명
고층 건물들이 줄지어서 있음. 지붕과 지붕을 이었을때, 사이에 고층건물이 접하거나 겹치면 서로 못봄. 가장 많은 건물을 볼 수 있는 건물이 보는 건물의 수를 출력
🔍 풀이 방법
수학, 브루트포스
모든 건물 쌍에 대해 기울기 구하고 그 사이에 있는 건물들이 겹치는지만 파악하면됨.
⏳ 회고
모든 값이 max를 구하는지 사용되었는지와 double 형변환 잘해주는거 조심
기초적인 것을 놓쳐서 오래걸렸다.