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/12919
🧭 풀이 시간
30분
👀 체감 난이도
✏️ 문제 설명
S에서 시작해서 규칙대로 문자열을 붙여서 T를 만들 수 있는지 확인하는 문제
규칙:
🔍 풀이 방법
정방향으로 만들면 경우의 수가 너무 많으니까
반대로 T에서 S로 줄여나감
끝이 'A'면 → 'A' 제거
시작이 'B'면 → 'B' 제거 후 문자열 뒤집음
DFS로 탐색하면서 길이 같아지면 문자열이 같은지 비교
하나라도 성공하면 1, 아니면 0 출력
⏳ 회고
이거 분명 비슷한거 풀었던 거 같은데...