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..
1234567891011121314151617181920212223242526272829303132333435363738394041424344#include #include #include #include using namespace std; int main(){ while (true) { stack stk; char str[100]; scanf("%[^\n]", str); int size = strlen(str); cin.ignore(); if (str[0] == '.' && size == 1) break; bool equal = true; for (size_t i = 0; i
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465#include #include using namespace std; int main() { int command; cin >> command; deque que; for (size_t i = 0; i > str; if (!str.compare("pop_front")) { int size = que.size(); if (size > 0) { cout
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051#include #include using namespace std; int main() { int command; cin >> command; queue que; for (size_t i = 0; i > str; if (!str.compare("pop")) { int size = que.size(); if (size > 0) { cout
- Total
- Today
- Yesterday
- 피보나치
- 백트래킹
- BFS
- 컨트리뷰톤
- 플로이드 와셜
- DFS
- 알고리즘
- 프로그래머스
- 구현
- c++
- webOS
- PyPy3
- 오픈소스
- c
- 완전탐색
- 브루트포스
- 코딩
- LG
- 정렬
- BaekJoon
- 파이썬
- 백준
- DP
- 인공지능
- 한화큐셀
- 카카오
- 이분탐색
- 1932
- Dynamic Programming
- 동적 계획법
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |