哈希表
struct hash_table{
struct lb{
ll x, y;
int to;
} h[N];
int head[N], hc;
int k;
inline int key(ll x){
return x % 1145141;
}
inline void change(ll x, ll y){
k = key(x);
for(int i = head[k]; i; i = h[i].to){
if(x == h[i].x){
h[i].y = y;
return;
}
}
hc ++;
h[hc] = {x, y, head[k]};
head[k] = hc;
}
inline ll Find(ll x){
k = key(x);
for(int i = head[k]; i; i = h[i].to){
if(x == h[i].x) return h[i].y;
}
return 0;
}
}h;