목록이분탐색 (1)
레야몬
1764번 듣보잡 - 해시, 정렬, 이분탐색
#include #include #define MAX_TABLE 1000003 // 소수 typedef unsigned long long ull; typedef struct _DIC { char name[21]; struct _DIC* next; } DIC; DIC HASH_TABLE[MAX_TABLE]; DIC ary[MAX_TABLE]; DIC* memo[MAX_TABLE]; ull hash(char* str) { ull hash = 5381; char c; while(c = *(str++)) hash = ((hash 0 && qr>=l) qr--; if(ql
알고리즘/백준
2022. 8. 24. 16:20