12345678910111213141516171819202122232425262728293031323334353637383940#include #include #include using namespace std; class AbsHeap {private: int num;public: AbsHeap(int num) : num(num) {}; int getNum() { return this->num; }}; bool operator>(AbsHeap h1, AbsHeap h2) { if (abs(h1.getNum()) == abs(h2.getNum())) return h1.getNum() > h2.getNum(); else return abs(h1.getNum()) > abs(h2.getNum());} int..
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657#include #include using namespace std; bool bfs(int** arr, int size) { bool* visited = new bool[size] { true, }; queue q; q.push(0); while (!q.empty()) { int now = q.front(); q.pop(); if (now == size - 1) return true; for (int i = 0; i
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667#include #include #include using namespace std; int arr[100][100][100]{ 0, };int visited[100][100][100]{ 0, };queue order; int bfs(int sizeH, int sizeN, int sizeM, int nu) { int max = 1; while (!order.empty()) { tuple now = order.front(); order.pop(); nu++; max = arr[get(n..
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859#include #include using namespace std; int bfs(int** arr, int** visited, int size, int x, int y) { queue order; order.push({ x, y }); int num = 0; visited[x][y] = 1; while (!order.empty()) { pair now = order.front(); order.pop(); num++; if (now.first + 1 = 0 && arr[now.first - 1][now.seco..
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950#include #include using namespace std; int bfs(int** arr, int sizeX, int sizeY) { queue order; int** visited = new int* [sizeX]; for (int i = 0; i
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950#include #include #include using namespace std; void dfs(bool** arr, bool* visited, int size, int start) { printf("%d ", start); visited[start] = true; for (int i = 1; i 0) { int pos = order.front(); order.pop(); printf("%d ", pos); for (int i = 1; i
- Total
- Today
- Yesterday
- 백트래킹
- 완전탐색
- Dynamic Programming
- 알고리즘
- 프로그래머스
- 파이썬
- 오픈소스
- 플로이드 와셜
- 카카오
- 정렬
- 브루트포스
- 한화큐셀
- 이분탐색
- 컨트리뷰톤
- PyPy3
- 동적 계획법
- 1932
- BaekJoon
- 백준
- DP
- c
- LG
- c++
- webOS
- 구현
- BFS
- 코딩
- 피보나치
- DFS
- 인공지능
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |