【模板】字符串哈希
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
如题,给定 个字符串(第 个字符串长度为 ,字符串内包含数字、大小写字母,大小写敏感),请求出 个字符串中共有多少个不同的字符串。
友情提醒:如果真的想好好练习哈希的话,请自觉。
输入格式
第一行包含一个整数 ,为字符串的个数。
接下来 行每行包含一个字符串,为所提供的字符串。
输出格式
输出包含一行,包含一个整数,为不同的字符串个数。
5
abc
aaaa
abc
abcc
12345
4
提示
数据范围
对于 的数据:,,。
对于 的数据:,,。
对于 的数据:,,。
样例说明
样例中第一个字符串 和第三个字符串 是一样的,所以所提供字符串的集合为 ,故共计 个不同的字符串。
拓展阅读
以下的一些试题从不同层面体现出了字符串哈希算法的正确性分析。
模板训练1
- Status
- Done
- Rule
- IOI
- Problem
- 12
- Start at
- 2025-7-7 8:00
- End at
- 2025-7-9 0:00
- Duration
- 40 hour(s)
- Host
- Partic.
- 22