분류 전체보기439 백준 5543번 C++ #include #include using namespace std; int hamburger[3];int beverage[2]; int mincost() {int minc = 987654321; for (int i = 0; i > hamburger[i];}for (int i = 0; i > beverage[i];}cout 2019. 2. 18. 백준 1904번 C++ #include using namespace std; const int MAX = 1000001;const int MOD = 15746;int n;int waycount[MAX]; int calway() {waycount[1] = 1;waycount[2] = 2; for (int i = 3; i > n;cout 2019. 2. 16. 백준 9252번 C++ #include #include #include #include using namespace std; const int MAX = 1001;string s1, s2;int cache[MAX][MAX];string ansstring; int LIS(int i, int j) {if (i == s1.size() || j == s2.size())return 0;int &answer = cache[i][j];if (cache[i][j] != -1)return cache[i][j]; return answer = max(LIS(i + 1, j), max(LIS(i, j + 1), LIS(i + 1, j + 1) + (s1[i] == s2[j])));} void calstring(int i, int j) {if (i .. 2019. 2. 16. 백준 1915번 C++ 2019. 2. 14. 이전 1 ··· 74 75 76 77 78 79 80 ··· 110 다음