1234567891011121314151617181920212223242526#include #include #include using namespace std; int main() { cin.tie(NULL); ios::sync_with_stdio(false); unordered_map map; int N, M; cin >> N >> M; for (int i = 0; i > site >> pass; map.insert({ site, pass }); } for (int i = 0; i > site; cout
12345678910111213141516171819202122232425262728293031#include #include #include #include using namespace std; int main() { set n_set; list dup; int N, M; cin >> N >> M; for (int i = 0; i > str; n_set.insert(str); } for (int i = 0; i > str; if (n_set.find(str) != n_set.end()) dup.push_back(str); } dup.sort(); cout
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 #include #include #include using namespace std; int main() { string str; cin >> str; while (str.compare("0")) { string clone; clone += str; reverse(clone.begin(), clone.end()); if (!str.compare(clone.c_str())) cout
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..
- Total
- Today
- Yesterday
- Dynamic Programming
- 완전탐색
- BFS
- 구현
- 프로그래머스
- 백트래킹
- 이분탐색
- 컨트리뷰톤
- 코딩
- c++
- 파이썬
- DP
- 동적 계획법
- BaekJoon
- LG
- DFS
- 알고리즘
- 브루트포스
- 플로이드 와셜
- 한화큐셀
- PyPy3
- webOS
- c
- 오픈소스
- 피보나치
- 1932
- 인공지능
- 정렬
- 카카오
- 백준
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |