询问的字符串可能包含其它字符,因此你应该像这样进行哈希:
ull Hash(string s) { ull p = 0; for (ll i = 0; i < s.size(); ++ i ) { p = p * 13331 + s[i]; } return p; }