摘要: 由于已经给出字符只有NC种,故可以把子串视为一个NC进制的数,以此构造hash函数就可以了 1 #include <set> 2 #include <map> 3 #include <cmath> 4 #include <queue> 5 #include <vector> 6 #include < 阅读全文
posted @ 2020-02-11 19:25 墨鳌 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 哈希,对于每个点哈希一次 哈希的方式:该点到联通分量边界(上下左右)的距离和 然后分别对两个图的n个点按hash值排序,判断是否相等即可 1 #include <set> 2 #include <map> 3 #include <cmath> 4 #include <queue> 5 #includ 阅读全文
posted @ 2020-02-11 13:43 墨鳌 阅读(174) 评论(0) 推荐(0) 编辑