题意:
给定一个字符串,只包含小写字母,求子串个数。
例子:
输入:aaabbaa
输出:5
(因为输入串中 包含 a,aa,aaa,b,bb 5个子串)
以下代码 在赛马网上 只过了17.5%,求路过大神 指点
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
string a;
int b[26]={0};
cin>>a;
// if(a=="")cout<<"99"<<en