随笔分类 -  字符串---哈希

摘要:题:https://ac.nowcoder.com/acm/contest/5667/A 题意:给定n个串,主要求每个串和n个中的每一个串的最大相同公共前后缀的长度,然后计算题目给式子 分析:对于n个串的后缀,我们考虑用哈希值来代表,最多共有1e6个值(sum(|si|)),预处理这部分,用map记 阅读全文
posted @ 2020-07-15 00:29 starve_to_death 阅读(238) 评论(0) 推荐(0)
摘要:#include<bits/stdc++.h> using namespace std; #define pb push_back typedef long long ll; typedef unsigned long long ull; const int M=1e5+5; const int P 阅读全文
posted @ 2020-07-14 23:51 starve_to_death 阅读(114) 评论(0) 推荐(0)