백준 알고리즘/다이나믹 프로그래밍75 백준 11051번 C++ #include#include#includeusing namespace std; int n, k;int combination[1001][1001]; int cal() {combination[0][0] = 1;combination[1][0] = 1;combination[1][1] = 1; for (int i = 2; i n >> k;cout 2019. 1. 21. 백준 11055번 C++ #include#include#includeusing namespace std; const int MAX = 1001; int n;int arr[MAX];int minsum[MAX]; int calminsum() {minsum[1] = arr[1]; for (int i = 2; i = 1; k--) {if (arr[k] n;for (int i = 1; i > arr[i];}cout 2019. 1. 21. 백준 1699번 C++ #include#include#includeusing namespace std; const int MAX = 100001; int n;int sumcount[MAX]; int minnum() { for (int i = 2; i = 1; j--){int mins = 1 + sumcount[i - (j*j)];if (result > mins) {result = mins;sumcount[i] = result;}}}return sumcount[n];} int main(void) {cin >> n; memset(sumcount, 0, sizeof(sumcount));for (int i = 1; pow(i, 2) 2019. 1. 21. 백준 11048번 C++ #include#include#includeusing namespace std; const int MAX = 1001; int n, m;int candy[MAX][MAX];int ans[MAX][MAX]; int calcandynum() { for (int i = 1; i n >> m; memset(candy, 0, sizeof(candy));memset(ans, 0, sizeof(ans));for (int i = 1; i candy[i][j];ans[i][j] = candy[i][j];}}cout 2019. 1. 18. 이전 1 ··· 13 14 15 16 17 18 19 다음