Skip to content

Conversation

@suyeun84
Copy link
Contributor

🧷 문제 링크

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

🧭 풀이 시간

60분

👀 체감 난이도

✏️ 문제 설명

창영이가 정확히 K만큼의 카페인을 섭취하기 위해서 최소 몇 개의 커피를 마셔야 하는지 구하기

🔍 풀이 방법

dp 사용
각 커피에 대해서 dp의 coffee[i]~K를 돌면서 dp에 최소 커피 갯수 저장하기

⏳ 회고

if (coffee[i] > K) continue;
이거 안넣어줘서 계속 IndexOutOfBound 에러 뜸,,,,ㅋ,,,,, 범위 조심....

@ShinHeeEul ShinHeeEul merged commit 51e0f29 into main Feb 11, 2025
1 check passed
@suyeun84 suyeun84 added hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때 timeout ⌚ 목표 시간보다 오래걸렸을 때 labels Feb 11, 2025
Comment on lines +23 to +31
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

옹 이런 방법도... 배워갑니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때 timeout ⌚ 목표 시간보다 오래걸렸을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants