[20251109] BOJ / G4 / 램프 / 설진영 #1363
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분
👀 체감 난이도
✏️ 문제 설명
N×M 격자의 램프가 있고, 각 열마다 스위치가 있어서 누르면 그 열 전체가 반전됨
K번 스위치를 눌러서 모든 램프가 켜진 행을 최대한 많이 만드는 문제
🔍 풀이 방법
같은 패턴의 행은 같은 스위치 조작으로 동시에 켜진다
0의 개수 = 필요한 스위치 횟수: 각 행을 켜려면 0인 위치의 스위치만 눌러야 함
같은 스위치를 짝수 번 누르면 원래대로
⏳ 회고
패턴찾기까지 생각보다 시간이 오래걸림..
그리고 뭔가 어디서 많이 풀어본 문제인데..