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/1091
🧭 풀이 시간
50분
👀 체감 난이도
✏️ 문제 설명
초기 상태의 카드 배열을 알고 있는 상태에서
S[] 배열에 따라서 여러번 섞었을 때 (이 때 S[i] 는 i번째 위치의 카드가 S[i]로 섞여진다는 뜻)
P[] 배열에 맞게 섞이는 경우 섞은 횟수, 안되는 경우 -1을 출력하는 문제입니다.
문제 자체 설명이 난해해서 설명이 쉽지 않으니 링크 참고 바랍니다.
🔍 풀이 방법
처음 카드 배열을 cards로 한 뒤에
문제에 주어진 설명대로 섞은 후 P배열과 맞는지 비교했습니다.
⏳ 회고
문제 자체가 비문학 스럽게 작성되어 있어서 문제 이해하는데 30분 이상 걸린 것 같습니다.
그래도 이해가 안되서 질문게시판을 확인하고 풀었습니다.