//二维hash
//相当于每个位置有两个权,行一个,列一个,然后推的方法和一维一样
//bzoj2462
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
using namespace std;
#define P1 131
#define P2 1331//行和列的模数不能相同,否则关于对角线对称的矩阵就有冲突
typedef unsigned int ull;
int n,m,a,b,q,tot,r,c;
ull p1[1010], p2[1010], sum[1010][1010];
char s[1010][1010];
ull hs[1000010];
void Hash(ull x)
{
hs[tot++] = x;
}
int main()
{
scanf("%d%d%d%d", &m, &n, &r
bzoj2462[二维hash/矩阵hash]
最新推荐文章于 2022-08-28 11:03:09 发布