#include <iostream>
unsigned int DJB2(std::string str) {
unsigned int hash = 5381;
for (int i = 0; i < str.size(); i++) {
hash = ((hash << 5) + hash) + str[i];
}
return hash;
}
int main() {
std::string str = "c c++";
unsigned int hash = DJB2(str);
std::cout << hash;
}
/*
run:
252817665
*/