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/16919
🧭 풀이 시간
40분
👀 체감 난이도
✏️ 문제 설명
2,3이 반복된다.
🔍 풀이 방법
처음 1초에만 아무것도 안하고 기다리므로 1초~4초까지는 모두 다른 경우가 나올 수 있다.
그러나, 이후 4개씩 반복되는 특징이 존재한다.
따라서 N이 5보다 큰 수가 들어오면 N%4+4를 통해서 일반화 시킬수 있다.
이후, 시간이 짝수이면 폭탄을 설치하고, 시간이 홀수이면 폭탄의 시간을 감소시키면서 2차원배열의 값을 변경해주었다.
⏳ 회고
처음에는 4개의 경우만 나오는줄 알았는데, R=2,C=2인 경우에는 성립하지 않았다.
다양한 입력을 넣어서 반례에 대비해야겠다.