본문 바로가기

분류 전체보기77

[문제풀이] 7432번: 디스크 트리 [문제풀이] 7432번: 디스크 트리https://www.acmicpc.net/problem/7432 문제유형TRIE Solution123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109#include #include int N;typedef struct st{ int check; int isWord; struct st* next; struct st* child[80];}.. 2018. 7. 4.
[문제풀이] 5052번: 전화번호 목록 [문제풀이] 5052번: 전화번호 목록https://www.acmicpc.net/problem/5052 문제유형TRIE Solution123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111#include #include typedef struct tn{ int word; struct tn* child[10];}NODE;NODE root;char str[10001.. 2018. 7. 4.
[문제풀이] 6593번: 상범 빌딩 [문제풀이] 상범 빌딩https://www.acmicpc.net/problem/6593 문제유형BFS Solution123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135#include #define MAX 32#define CIR (.. 2018. 7. 4.
병합 정렬 (Merge Sort) Merge SortSample Code 1 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152void merge_sort(int s, int e){ int idxtmp, idx1, idx2, m; if (s == e) return; m = (s + e) / 2; merge_sort(s, m); merge_sort(m + 1, e); idx1 = s, idx2 = m + 1, idxtmp = s; while (idx1 2018. 7. 4.