Skip to content

Conversation

@03do-new30
Copy link
Contributor

🧷 문제 링크

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

🧭 풀이 시간

40분

👀 체감 난이도

✏️ 문제 설명

  • i번째 날에 먹는 특정 디저트의 만족감이 주어짐
  • 전날에 먹은 디저트를 또 먹으면 만족감이 반으로 감소함
  • 한 주기에 얻을 수 있는 최대 만족감을 구함

🔍 풀이 방법

  • DP
  • dp[day][dessert] dessert를 day일에 먹는 경우 최대 만족감
  • 전날에 같은 디저트를 먹은 경우, 전날에 다른 디저트를 먹은 경우로 나누어 생각

⏳ 회고

  • 첫 제출에 통과하지 못했는데, dp[1][dessert]의 값을 1일째에 먹는 해당 디저트의 만족감으로 초기화하는 걸 깜빡했다. 🤦‍♀️

@03do-new30 03do-new30 added the success 👍 해설을 보지 않고 풀었을 때 label Feb 19, 2025
@ShinHeeEul ShinHeeEul merged commit e8e21ef into main Feb 19, 2025
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