Skip to content

Conversation

@suyeun84
Copy link
Contributor

🧷 문제 링크

https://school.programmers.co.kr/learn/courses/30/lessons/389480

🧭 풀이 시간

50분

👀 체감 난이도

✏️ 문제 설명

두 도둑이 팀을 이루어 모든 물건을 훔치려고 할 때, 경찰에 잡히지 않도록 흔적을 최소화 해야함
A도둑이 훔치면 info[i][0]개의 A에 대한 흔적을 남김
B도둑이 훔치면 info[i][1]개의 B에 대한 흔적을 남김
각각 n, m 흔적보다 적게 남겨야하며
A도둑이 남긴 흔적의 누적 개수의 최솟값 구하기

🔍 풀이 방법

dp사용
dp배열에 a 도둑이 훔쳤을 때, b 도둑이 훔쳤을 때를 전부 돌면서 갱신해줌
이후에 a도둑의 최솟값 return하면됨

⏳ 회고

난 dp가 너무 어렵다

@suyeun84 suyeun84 self-assigned this Sep 19, 2025
@suyeun84 suyeun84 added the hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때 label Sep 19, 2025
@suyeun84 suyeun84 merged commit f056afd into main Sep 19, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants