P6832 [Cnoi2020]子弦


P6832 [Cnoi2020]子弦
分析
单个字符的子串中出现次数最多的一定是所有子串中出现次数最多的。统计每个字符出现的次数,并取最大值。

#include
#include
#include
using namespace std;
int ans[30];
char s[10000010]; 
int main()
{
	scanf("%s",s);
	int len=strlen(s);
	for (int i=0;i