알고리즘74 BFS 개념 참고 : coding-factory.tistory.com/612 인접 행렬은 노드들 간의 연결 관계가 많을 때 인접 리스트는 노드들 간의 연결 관계가 적을 때 사용한다. Node가 N개이면 Edge의 최대 개수는 1+2+ ... + (N-1) = N(N-1)/2 2020. 12. 21. 백준 1764번 : 듣보잡 문제 링크 : www.acmicpc.net/problem/1764 풀이에 참고한 링크 : zerobell.tistory.com/9 blockdmask.tistory.com/178 내 풀이 (2020.12.21.) : #include #include #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); vector not_heard; vector not_seen; int N, M; cin >> N >> M; for (int i = 0; i > str; not_heard.push_back(str); } for (int i = 0; i < M; i+.. 2020. 12. 21. 백준 1874번 : 스택 수열 문제 링크 : www.acmicpc.net/problem/1874 풀이에 참고한 링크 : www.acmicpc.net/board/view/52749 내 풀이 (2020.12.18.) : #include #include #include using namespace std; int main() { stack stack; int n; cin >> n; vector target_list; int target_index = 0; for (int i = 0; i > num; target_list.push_back(num); } int input = 1; int max_num = 0; vector answer_list; bool flag = false; while (ta.. 2020. 12. 18. 백준 10845번 : 큐 문제 링크 : www.acmicpc.net/problem/10845 내 풀이 (2020.12.17.) : #include #include using namespace std; class Queue { deque queue; public: void push(int num) { this->queue.push_back(num); } void pop() { if (queue.size() == 0) { cout 2020. 12. 17. 이전 1 ··· 15 16 17 18 19 다음