Skip to content

Conversation

@suyeun84
Copy link
Contributor

@suyeun84 suyeun84 commented Oct 2, 2025

🧷 문제 링크

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

🧭 풀이 시간

40분

👀 체감 난이도

✏️ 문제 설명

사탕의 칼로리와 가격이 주어질 때,
어떻게 하면 칼로리의 합이 가장 크게 되는지 구하기

🔍 풀이 방법

백팩 문제임
dp사용해서 각 사탕 종류가 추가될 때마다 dp배열을 m까지 설정해서 각 가격마다 얻을 수 있는 최대 칼로리로 갱신

⏳ 회고

무슨 부동소수점 때문에 nextDouble() * 100 + 0.5 이거 해야됨
어이없다

@suyeun84 suyeun84 self-assigned this Oct 2, 2025
@suyeun84 suyeun84 added success 👍 해설을 보지 않고 풀었을 때 hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때 labels Oct 2, 2025
@suyeun84 suyeun84 merged commit 6e86315 into main Oct 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때 success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants