Skip to content

Conversation

@oncsr
Copy link
Contributor

@oncsr oncsr commented Jan 2, 2026

🧷 문제 링크

https://www.acmicpc.net/problem/34894

🧭 풀이 시간

10분

👀 체감 난이도

✏️ 문제 설명

길이 N인 문자열 s가 주어진다.
i번째 글자를 전광판에 띄우는 비용은 S[i]이다.
전광판에 "UOSPC"를 띄우는 최소 비용을 구해보자.

🔍 풀이 방법

dp[i][j] = i번째 글자까지 사용해서 UOSPC중 j번째 인덱스까지 완성하는 경우의 수로 정의한다.
s[i] == "UOSPC"[j]이면 dp[i][j] = min(dp[i][j], dp[i-1][j-1] + S[i]) 이다.

⏳ 회고

HNY

@oncsr oncsr self-assigned this Jan 2, 2026
@oncsr oncsr added the success 👍 해설을 보지 않고 풀었을 때 label Jan 2, 2026
@ShinHeeEul ShinHeeEul merged commit 29444b9 into main Jan 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants