분류 전체보기439 백준 6359번 C++ #include #include using namespace std; const int MAX = 101;int t,room;int roomnum[MAX]; int escape(int r) {memset(roomnum, 0, sizeof(roomnum)); for (int i = 1; i > room;cout 2019. 2. 13. 백준 1309번 C++ #include #include using namespace std; const int MAX = 100001;const int MOD = 9901;int n;long long lionnum[3][MAX]; int lionnumcal() {lionnum[0][1] = lionnum[1][1] = lionnum[2][1] = 1; for (int i = 2; i > n;memset(lionnum, 0, sizeof(lionnum));cout 2019. 2. 13. 백준 11054번 C++ #include #include using namespace std; const int MAX = 1001;int n;int arr[MAX];int lisnum[MAX]; int LIS(int k) {for (int i = 0; i arr[j] && lisnum[i] = k; i--) {lisnum[i] = 1;for (int j = n-1; j > i; j--) {if (arr[i] > arr[j] && lisnum[i] < lisnum[j] + 1)lisnum[i] = lisnum[j] + 1;}}return answer + lisnum[k] -.. 2019. 2. 13. 백준 1965번 C++ #include #include using namespace std; const int MAX = 1001;int n;int arr[MAX];int lisnum[MAX]; int LIS() {int maxnum = -1;for (int i = 0; i arr[j] && lisnum[i] > n;for (int i = 0; i > arr[i];}cout 2019. 2. 13. 이전 1 ··· 75 76 77 78 79 80 81 ··· 110 다음