[20251011] BOJ / G4 / 램프 / 한종욱 #1088
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/1034
🧭 풀이 시간
50분
👀 체감 난이도
✏️ 문제 설명
램프를 킬껀데, 중복으로 가능하다. 행의 최댓값은?
🔍 풀이 방법
열을 통째로 움직이기 때문에, 각 행의 램프 패턴을 map에 넣고 각자 확인한다.
0의 개수를 확인해서, K번 이하로 행을 켤 수 있는지 확인하고 해당 숫자와 K의 홀짝성을 확인해 타당하면 최댓값을 갱신한다.
⏳ 회고
행별로 패턴을 묶을 수 있다는 걸 생각하지 못했다.....