躲猪猪
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.
时间限制:
空间限制:
题目背景
在小猪的世界里,有一种小猪们最爱玩的游戏——躲猪猪
题目描述
今天,喊来了朋友们一起玩躲猪猪,他躲进了一个字符串中,你需要在字符串中找到!由于的实力实在是太强了,所以他允许朋友们使用一次作弊器,对某一个位置的字符进行任意修改。你需要告诉的朋友们,他们最多能在字符串中找出多少子串
子串,计算机术语,串中任意个连续的字符组成的子序列称为该串的子串
注意:题目保证字符串中所有字符均为小写字母
输入格式
第一行,一个字符串
输出格式
一个整数,表示使用一次作弊器后,最多能找出的子串个数
样例输入1
piggy
样例输出1
0
样例输入2
pigqy
样例输出2
1
数据范围
| 测试点 | | | ------ | ----------- | | | | | | | | | |
8.18日竞赛3班训练
- Status
- Done
- Rule
- IOI
- Problem
- 4
- Start at
- 2025-8-18 18:00
- End at
- 2025-8-18 21:00
- Duration
- 3 hour(s)
- Host
- Partic.
- 11