题目链接
http://noi-test.zzstep.com/contest/0x10%E3%80%8C%E5%9F%BA%E6%9C%AC%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E3%80%8D%E4%BE%8B%E9%A2%98/1401%20%E5%85%94%E5%AD%90%E4%B8%8E%E5%85%94%E5%AD%90
分析
字符串哈希,预处理出每个前缀的哈希值,可 O ( 1 ) O(1) O(1) 求出子串哈希值。
AC代码
#include <cstdio>
inline int read() {
int num = 0;
char c = getchar();
while (c < '0' || c > '9') c