![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FwyDcZ%2FbtqCZxlSKMq%2FJJCxGrFIHMQyPnuCkw6xUK%2Fimg.png)
백준 11052번: 카드 구매하기
·
c++/백준
문제 링크 : https://www.acmicpc.net/problem/11052 알고리즘 문제는 DP 로 간단하게 해결가능 한 문제이다 .. 코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 #include #include using namespace std; int n; int card[1001]; int dp[10001]; int main() { cin.tie(NULL); ios::sync_with_stdio(false); cin >> n; for (int i = 1; i card[i]; for (int j = i; j