728x90
머지소트
-
[알고리즘] 백준 1764번: 듣보잡 -C/C++알고리즘/백준 2019. 1. 9. 21:33
백준 1764번: 듣보잡 https://www.acmicpc.net/problem/1764 1. HASH(Single Linked List) 2. Merge Sort (라이브러리 사용하지 않고 직접 구현) #include #define HASH_MAX 10007 #define NODE_MAX 500001 #define NAME_MAX 500001 struct NODE { char name[21]; NODE* prev; } node[NODE_MAX]; int index = 0; NODE* hashTable[HASH_MAX]; char* DBJ[NAME_MAX]; char* tempDBJ[NAME_MAX]; void mystrcpy(char* dest, char* src) { while (*src != 0)..