12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152#include #include #include using namespace std; bool is_front(pair pair1, pair pair2) { for (size_t i = 0; i pair2.first[i]) return false; else if (pair1.first[i]
12345678910111213141516#include using namespace std; int main(){ int n, tmp = 1; cin >> n; int* arr = new int[n + 1] {0, }; for (size_t i = 1; i = j * j; j++) arr[i] = arr[i] > arr[i - j * j] + 1 ? arr[i - j * j] + 1 : arr[i]; } cout
12345678910111213141516#include using namespace std; int main(){ int n, tmp = 1; cin >> n; int* arr = new int[n + 1] {0, }; for (size_t i = 1; i = j * j; j++) arr[i] = arr[i] > arr[i - j * j] + 1 ? arr[i - j * j] + 1 : arr[i]; } cout
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263#include #include using namespace std; int main(){ int T; cin >> T; for (size_t i = 0; i > command >> n >> element; string tmp; deque deq; for (size_t j = 0; j 0) deq.push_back(tmp); tmp.clear(); } else { tmp.append(1, element[j]); } } bool order = true, error = false; for (size_t..
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 27 28 29 30 31 #include using namespace std; int main() { int N, M, min = 0, max = 0; scanf("%d %d", &N, &M); int* trees = new int[N]; for (size_t i = 0; i = M) { answer = mid > answer ? mid : answer; min = mid + 1; } else max = mid - 1; } printf("%d", answer); return 0; } Colored by Color Scripter cs 1654번 랜선 자르기와 똑같다.
12345678910111213141516171819202122232425262728293031323334353637#include #include using namespace std; int main(){ int test_case; cin >> test_case; for (size_t i = 0; i > N >> position; queue que; priority_queue priq; for (size_t j = 0; j > priority; que.push({ j, priority }); priq.push(priority); } int count = 0; while (!que.empty()) { int idx = que.front().first; int priority = que.front().se..
1234567891011121314151617181920212223242526272829#include int main(){ int K, N, ans = 0; scanf("%d %d", &K, &N); int* lan = new int[K]; unsigned long long max = 0; for (size_t i = 0; i ans ? mid : ans; min = mid + 1; } else max = mid - 1; } printf("%d", ans); return 0;}Colored by Color Scriptercs
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748#include #include using namespace std; int sub_arr(int** arr, int N, int M, int B, int height) { int minus = 0, plus = 0; for (size_t i = 0; i B + plus) return -1; else return plus * 2 + minus;} int main(){ int N, M, B; int min = 500, max = 0; scanf("%d %d %d", &N, &M, &B); int** height = new int*[N]; for (siz..
- Total
- Today
- Yesterday
- DFS
- 카카오
- webOS
- 피보나치
- 완전탐색
- 컨트리뷰톤
- 프로그래머스
- LG
- BaekJoon
- Dynamic Programming
- 브루트포스
- 동적 계획법
- 이분탐색
- BFS
- 백준
- 인공지능
- 알고리즘
- 오픈소스
- c++
- 정렬
- 백트래킹
- 한화큐셀
- 코딩
- 플로이드 와셜
- 파이썬
- PyPy3
- 구현
- DP
- 1932
- c
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 27 | 28 |
29 | 30 | 31 |