luogu P4323 [JSOI2016]独特的树叶
hash 的方式,我觉得这个是找了这么久最好写的hash了,貌似也不容易被卡。
Hash=(Hash[son1]+p)⨁(Hash[son2]+p)⨁……+size∗q+1
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long LL;
con...
原创
2019-08-22 22:32:05 ·
112 阅读 ·
0 评论