标签:opera 哈希 const logs href 结构 pre blog geo
struct hashv {
int len;
ull val;
hashv(char c) {
val = c, len = 1;
}
hashv() : len(0), val(0) {}
hashv operator+(hashv b)const {
hashv ret;
ret.len = len + b.len;
ret.val = val + cf[len]*b.val;
return ret;
}
bool operator==(hashv b)const {
return len == b.len && val == b.val;
}
};
用到的题目 bzoj 1014 火星人prefix
标签:opera 哈希 const logs href 结构 pre blog geo
原文地址:http://www.cnblogs.com/inone/p/7350979.html