暴力的哈希,注意: 将一个串当作另一个串的前缀,需要乘上p[len],len=后面串的长度 这是自己的代码,拿数据在本地测A掉了,但是bz上wa了??bz换数据了难道?? #include<cstdio> #include<cstring> #define rep(i,x,y) for(register int i=x;i<=y;i++) using namespace std; ; typedef unsigned long long ull; int n,mid; cha…
During a discussion of problems at the Petrozavodsk Training Camp, Vova and Sasha argued about who of them could in 300 minutes find a pair of equal squares of the maximal size in a matrix of size N × M containing lowercase English letters. Squares c…
题目链接:https://ac.nowcoder.com/acm/contest/308/E 题意:中文题 见链接 题解:哈希预处理(三哈希模板) #include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define mst(a,b) memset((a),(b),sizeof(a)) #define mp(a,b) make_pair(a,b) #de…