struct Hash_map
{
static const int mask = 0x7fffff;
int p[8388608], q[8388608];
void clear()
{
for (int i = 0; i <= mask; ++i)
q[i] = 0;
}
int& operator [](int k)
{
int i;
for (i = k&mask; q[i] && p[i] != k; i = (i + 1)&mask);
p[i] = k;
return q[i];
}
};
wuwen
最新推荐文章于 2024-07-22 10:11:23 发布